Page 1 of 1
CPU and memory utilization by particular process on Linux
Posted: Wed Mar 11, 2020 5:19 am
by ArutwarS
Hello,
We want to monitor the CPU and memory utilization by particular process on Linux environment.
I have tried getting cpu and memory utilization by using plugin check_snmp_process_wizard.pl.
[tcadmin@1691398-prd-tc1 bin]$ /usr/local/nagios/libexec/check_snmp_process_wizard.pl -H <host_ip> -C public -r -n tcadmin -m 100,200
I am getting error ERROR: Alarm signal (Nagios time-out).
Can you please explain where I am going wrong.
Re: CPU and memory utilization by particular process on Linu
Posted: Wed Mar 11, 2020 4:40 pm
by scottwilkerson
Is this server using SNMP version 2c?
Try
Code: Select all
/usr/local/nagios/libexec/check_snmp_process_wizard.pl -H <host_ip> -C public -r -n tcadmin -m 100,200 -2
Re: CPU and memory utilization by particular process on Linu
Posted: Wed Mar 11, 2020 4:52 pm
by jdunitz
Do you have an SNMP daemon listening on the machines you want to monitor? And do you have the snmpd.conf file on those machines configured correctly?
This may help, if you haven't seen it:
https://assets.nagios.com/downloads/nag ... g-SNMP.pdf
This machine we have has the SNMPd running:
Code: Select all
# /usr/local/nagios/libexec/check_snmp_process_wizard.pl -H 192.168.0.4 -C community -r -n sshd -m 100,200 -2
1 process named sshd (> 0), Mem : 5.2Mb OK
This one does not:
Code: Select all
[root@localhost scripts]# /usr/local/nagios/libexec/check_snmp_process_wizard.pl -H 192.168.0.2 -C community -r -n sshd -m 100,200 -2
ERROR: Alarm signal (Nagios time-out)
If you do have the daemon running, but the protocol version doesn't match, you're pointed to the wrong port, the community string isn't right, or something is blocking SNMP traffic, you might still get that error.
Does that help?
Re: CPU and memory utilization by particular process on Linu
Posted: Thu Mar 12, 2020 6:57 am
by ArutwarS
Hello,
Thanks for the document provided. I have installed snmp by the steps mentioned in document. I have installed snmp v2c.
firewall is inactive. snmpd.service demon is active and running.
still I am getting same error "
ERROR: Alarm signal (Nagios time-out)"
Code: Select all
[root@1691398-prd-tc1 libexec]# /usr/local/nagios/libexec/check_snmp_process_wizard.pl -H <linux_host_ip> -C public -r -n top -m 100,200 -2
ERROR: Alarm signal (Nagios time-out)
Code: Select all
[root@1691398-prd-tc1 libexec]# /usr/local/nagios/libexec/check_snmp_process_wizard.pl -H <linux_host_ip> -C community -r -n top -m 100,200 -2
ERROR: Alarm signal (Nagios time-out)
Code: Select all
[root@1691398-prd-tc1 snmp]# cat snmpd.conf
rocommunity Str0ngC0mmunity <Nagios_Ip>
Re: CPU and memory utilization by particular process on Linu
Posted: Thu Mar 12, 2020 9:03 pm
by Box293
You can perform an nmap scan to see if that port is open to that server. Run this command on your XI server:
Where xxx is the address of the SNMP device.