Page 1 of 1

nproc utilization

Posted: Mon Jun 03, 2019 3:54 am
by anthonywong
Hi Support,
Our client has a request to monitor nproc value for Oracle user. Following is the command that generated those output.Basically they want to do Oracle process count as per below command output. Is there any process count in Nagios monitoring that we can configure?

[unixsa@PG480 ~]$ ps h -Led -o user | sort | uniq -c | sort -n
1 dbus
1 ntp
1 rpc
1 rpcuser
2 avahi
4 haldaemon
5 oracle1
6 sisips
7 unixsa
9 nagios
10 atosmon
31 splunk
102 itrs
852 root
1299 oracle
[unixsa@PG480 ~]$ ps h -Lu oracle |wc -l
1290

Thanks and Regards,
Anthony

Re: nproc utilization

Posted: Mon Jun 03, 2019 11:02 am
by npolovenko
Hello, @anthonywong. Check_procs plugin would be my first recommendation.

This command will show all processes that contain "oracle" in their name, and return Critical if there are between 5 and 10 processes found:

Code: Select all

/usr/local/nagios/libexec/check_procs -C oracle -c 5:10
This command will check for all processes that are running under the nagios user, and return Critical if there are between 5 and 10 processes found:

Code: Select all

/usr/local/nagios/libexec/check_procs -u nagios -c 5:10
You can also do a combination of these two commands:

Code: Select all

/usr/local/nagios/libexec/check_procs -u nagios -C oracle -c 5:10