Process Monitoring on Windows & Unix Systems

Monitor Process Count on Windows, Linux/Unix hosts using SNMP

USAGE: ./checkProcessesviaSNMP.sh <community-string> <remote-host> <process-names> <warning> <critical> <type>
root@jserver-VirtualBox:# 
root@jserver-VirtualBox:# 
root@jserver-VirtualBox:# time ./checkProcessesviaSNMP.sh monitoringtest dgphx002.phx.kinglazy.dev magent 1 0 down
OK: [ 1 ] running [ magent ] process(es). Memory.Used = [ 4.363MB ]. Installed Memory = [ 3.744GB ]. PCT used by process(es) = [ 0.114% ]. Threshold = [ W=1 / C=1 ]. System.INFO = [ Linux 2.6.32-358.el6.x86_64 #1 SMP Tue Jan 29 11:47:41 EST 2013 x86_64 ].

real    0m0.247s
user    0m0.056s
sys     0m0.007s

root@jserver-VirtualBox:# 
root@jserver-VirtualBox:#
[root@jserver-VirtualBox ~]$ 
[root@jserver-VirtualBox ~]$ 
[root@jserver-VirtualBox ~]$ time ./checkProcessesviaSNMP.sh monitoringtest dgphx002.phx.kinglazy.dev magent 0 2 up
WARNING: [ 1 ] running [ magent ] process(es). Memory.Used = [ 4.363MB ]. Installed Memory = [ 3.744GB ]. PCT used by process(es) = [ 0.114% ]. Threshold = [ W=0 / C=2 ]. System.INFO = [ Linux 2.6.32-358.el6.x86_64 #1 SMP Tue Jan 29 11:47:41 EST 2013 x86_64 ].

real    0m0.265s
user    0m0.054s
sys     0m0.010s
[root@jserver-VirtualBox ~]$ 
[root@jserver-VirtualBox ~]$ 
[root@jserver-VirtualBox ~]$ time ./checkProcessesviaSNMP.sh monitoringtest dgphx002.phx.kinglazy.dev magent 0 0 up
CRITICAL: [ 1 ] running [ magent ] process(es). Memory.Used = [ 4.363MB ]. Installed Memory = [ 3.744GB ]. PCT used by process(es) = [ 0.114% ]. Threshold = [ W=0 / C=0 ]. System.INFO = [ Linux 2.6.32-358.el6.x86_64 #1 SMP Tue Jan 29 11:47:41 EST 2013 x86_64 ].

real    0m0.241s
user    0m0.058s
sys     0m0.005s
[root@jserver-VirtualBox ~]$ 
[root@jserver-VirtualBox ~]$ 
[root@jserver-VirtualBox ~]$ time ./checkProcessesviaSNMP.sh monitoringtest dgphx002.phx.kinglazy.dev magent 4 2 up
ERROR: WARNING THRESHOLD [ 4 ] CANNOT BE GREATER THAN CRITICAL THRESHOLD [ 2 ]!

real    0m0.007s
user    0m0.004s
sys     0m0.000s
[root@jserver-VirtualBox ~]$ 
[root@jserver-VirtualBox ~]$ 
[root@jserver-VirtualBox ~]$ time ./checkProcessesviaSNMP.sh monitoringtest dgphx002.phx.kinglazy.dev magent 2 3 up
OK: [ 1 ] running [ magent ] process(es). Memory.Used = [ 4.363MB ]. Installed Memory = [ 3.744GB ]. PCT used by process(es) = [ 0.114% ]. Threshold = [ W=2 / C=3 ]. System.INFO = [ Linux 2.6.32-358.el6.x86_64 #1 SMP Tue Jan 29 11:47:41 EST 2013 x86_64 ].

real    0m0.258s
user    0m0.061s
sys     0m0.006s