Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

how can I enable under Debian 6 to list the processes of a foreign user? I have the user nagios but this user can only list his own processes.


share|improve this question

check_procs command accepts a "-u USER" argument to list the processes for the specified user.

You have to edit you command.cfg (the place where your nagios command are defined), and add something like this:

define command{
    command_name    check_user_procs
    command_line    /usr/lib/nagios/plugins/check_procs -w '$ARG1$' -c '$ARG2$' -u '$ARG3$'

and create a service check for the user:

define service{
    use                             generic-service
    host_name                       YOUR-HOST-NAME   
    service_description             Total Processes
    check_command                   check_user_procs!250!400!USER_NAME_OR_ID

you have to replace USER_NAME_OR_ID withe the user info you are checking for.

The first two number specify the limits for warning and critical events.

share|improve this answer
Thx for your answer. This is not working if I execute check_procs as user nagios. Because ps aux also lists only own processes. It must be a system wide setting on Debian not nagios. – TheFox Apr 22 '12 at 11:38
This is just not true, actually... unless maybe you have selinux enabled, or something like that? You can add "-vv" to check_procs to make it show you exactly what "ps" command it's using. – Keith Apr 24 '12 at 17:54
It works on my Debian Squeeze box, you should check for apparmor or selinux on your box as Keith suggested. – Goran Jurić May 2 '12 at 15:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.