• Overview
  • Deploying MCollective
  • Configuration / Deployment Topics
  • Use and Administer MCollective
  • Write Agent Plugins
  • Write Clients and Applications
  • Write Other Plugins
  • Plugin Directory
  • Internals
  • Older and Non-Recommended Information

MCollective Plugin: Process Management Agent


An agent that can be used for process management like the Unix pgrep, kill and pkill

WARNING: You should use the kill and pkill actions with extreme caution, you can do extensive damage to the availability of your infrastructure using these.



There is a bundled pgrep utility:

% mc-pgrep ruby

 * [ ============================================================> ] 48 / 48

32470 root        92.805MB  ruby /usr/sbin/mcollectived --pid=/var/run/mcollectived.pid

 1997 root        40.539MB  /usr/bin/ruby /usr/sbin/puppetd --onetime
12316 root        25.676MB  ruby /usr/sbin/mcollectived --pid=/var/run/mcollectived.pid


   ---- process list stats ----
        Matched hosts: 48
    Matched processes: 111
        Resident Size: 771.502MB
         Virtual Size: 9.318GB

The process agent can return vast amounts of information, here is init on one machine:

        :cmdline=>"init [3]",
        :environ=>{"TERM"=>"linux", "HOME"=>"/"},

For this reason you need to be careful about large pgrep’s over large infrastructures the resulting data that needs to be transfered and processed on your machine can be staggering, each node will return as much as half a MB of serialized data.

The kill and pkill commands are not documented here and is in general not recommended to use.

See an issue? Please file a JIRA ticket in our [DOCUMENTATION] project
Puppet sites use proprietary and third-party cookies. By using our sites, you agree to our cookie policy.