Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow process monitoring #215

Closed
ranjib opened this issue Sep 21, 2015 · 6 comments
Closed

Allow process monitoring #215

ranjib opened this issue Sep 21, 2015 · 6 comments

Comments

@ranjib
Copy link
Contributor

ranjib commented Sep 21, 2015

Gathering stats about a particular process' memory, cpu consumption is easy, less invasive and generic way of monitoring any system. It will be nice to have a plugin that allows users to specify a process via pidfile or executable name and gathers it memory, cpu consumption data.
This is very similar to Nagios' check_procs

@sparrc
Copy link
Contributor

sparrc commented Sep 21, 2015

This is definitely something that we need, thanks for making an issue to track it

@ranjib
Copy link
Contributor Author

ranjib commented Sep 21, 2015

@sparrc i can take a stab at it. It will be nice to capture all the details (if you have anything specific in mind). I am thinking of how to specify the expected process, i.e. via pid file or via executable path or via dbus calls.

@sparrc
Copy link
Contributor

sparrc commented Sep 21, 2015

@ranjib That would be great and much appreciated!

As for the filtering, I would say that we probably just want all (or at least most) of the same filters that the nagios check_procs plugin has:

Filters:
 -s, --state=STATUSFLAGS
   Only scan for processes that have, in the output of `ps`, one or
   more of the status flags you specify (for example R, Z, S, RS,
   RSZDT, plus others based on the output of your 'ps' command).
 -p, --ppid=PPID
   Only scan for children of the parent process ID indicated.
 -z, --vsz=VSZ
   Only scan for processes with VSZ higher than indicated.
 -r, --rss=RSS
   Only scan for processes with RSS higher than indicated.
 -P, --pcpu=PCPU
   Only scan for processes with PCPU higher than indicated.
 -u, --user=USER
   Only scan for processes with user name or ID indicated.
 -a, --argument-array=STRING
   Only scan for processes with args that contain STRING.
 --ereg-argument-array=STRING
   Only scan for processes with args that contain the regex STRING.
 -C, --command=COMMAND
   Only scan for exact matches of COMMAND (without path).
 -k, --no-kthreads
   Only scan for non kernel threads (works on Linux only).

@gotyaoi
Copy link
Contributor

gotyaoi commented Sep 21, 2015

I would definitely appreciate a plugin like this. Another source of inspiration might be the processes plugin from collectd, which by default records the number of processes grouped by state, and then will provide more information about processes specified by name or regex. https://collectd.org/wiki/index.php/Plugin:Processes

@ranjib
Copy link
Contributor Author

ranjib commented Oct 4, 2015

@sparrc i have few question regarding the measurement we want to get out of this plugin. If we filter processes or rss/vms values, what are the metrics/measurements we want to publish? Total number of processes? Do we want total value of RSS/VMS by all processes filtered by the criteria ?
Following is a feature request from #235

  • total number of system processes/threads (by state - runnable,sleeping,zombie)

@sparrc
Copy link
Contributor

sparrc commented Oct 13, 2015

closing this one as fixed by the procstat plugin, will use #235 to track the total processes count

@sparrc sparrc closed this as completed Oct 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants