[Nagiosplug-help] Nagios SNMP help for CPU utilization

Mohanty, Amitabh (Corporate, consultant) amitabh.mohanty at corporate.ge.com
Mon Feb 14 07:15:18 CET 2005


Thanks Patrick. I will include these in my script.

Regards,
Amitabh

-----Original Message-----
From: Patrick Proy [mailto:nagios-user at proy.org]
Sent: Friday, February 11, 2005 10:56 AM
To: Mohanty, Amitabh (Corporate, consultant);
nagiosplug-help at lists.sourceforge.net
Subject: RE: [Nagiosplug-help] Nagios SNMP help for CPU utilization


OK, let's do a little math : 

At time T0, you query the four values A1,B1,C1,D1 for the four counters
(ssCpuRawUser, ssCpuRawNice, ssCpuRawSystem, ssCpuRawIdle) 

At T0 + N seconds, query A2,B2,C2,D2
Then to get the Idle% of the cpu (during those N seconds) : Idle % =
(D2-D1)*100/(A2+B2+C2+D2-A1-B1-C1-D1)

If you want instant value then N=5seconds : then you don't even have to
store the values.
Else N=300 seconds for 5 minutes average : you must store the values.

Patrick Proy
nagios AT proy.org 

-----Message d'origine-----
De : nagiosplug-help-admin at lists.sourceforge.net
[mailto:nagiosplug-help-admin at lists.sourceforge.net] De la part de Mohanty,
Amitabh (Corporate, consultant)
Envoyé : vendredi 11 février 2005 16:33
À : Patrick Proy; nagiosplug-help at lists.sourceforge.net
Objet : RE: [Nagiosplug-help] Nagios SNMP help for CPU utilization

Hi,
  I am sorry.. did not get you. Do I have to store subsequent values in two
variables values of snmpget and subtract?
Then what is the value I need to divide with the out put of subtraction?

 The OID I am using for is getting the CPU usage is an average one. For
example using the OID I get the average CPU idle value of 62%, but if I log
on to the server I get the CPU idle value of 90% idle and I get an alert on
Nagios as our warning threshold is 70% (if it falls below 70% it sends an
alert). Hope this make you understand. Please correct me if I am doing
anything wrong.
 Appreciate your help..

Thanks,
Amitabh
-----Original Message-----
From: Patrick Proy [mailto:nagios-user at proy.org]
Sent: Friday, February 11, 2005 10:22 AM
To: Mohanty, Amitabh (Corporate, consultant);
nagiosplug-help at lists.sourceforge.net
Subject: RE: [Nagiosplug-help] Nagios SNMP help for CPU utilization


That's easy : just store the counter values, make a substraction and divide
by all the values. You will need to write a script for this... 
Why do you need instant CPU BTW ?

Patrick
nagios AT proy.org




-----Message d'origine-----
De : nagiosplug-help-admin at lists.sourceforge.net
[mailto:nagiosplug-help-admin at lists.sourceforge.net] De la part de Mohanty,
Amitabh (Corporate, consultant) Envoyé : vendredi 11 février 2005 15:17 À :
Patrick Proy; nagiosplug-help at lists.sourceforge.net
Objet : RE: [Nagiosplug-help] Nagios SNMP help for CPU utilization

Hi Patrick,
  Thanks for your quick response. I think I can use snmpget (in linux)
instead and add that command in a shell script and call the script in
Nagios. But do you know how can I convert the counter values (ssCpuRawUser,
ssCpuRawNice, ssCpuRawSystem, ssCpuRawIdle) to the percentage of CPU
utilization?

Thanks,
Amitabh

-----Original Message-----
From: Patrick Proy [mailto:nagios-user at proy.org]
Sent: Friday, February 11, 2005 8:25 AM
To: Mohanty, Amitabh (Corporate, consultant);
nagiosplug-help at lists.sourceforge.net
Subject: RE: [Nagiosplug-help] Nagios SNMP help for CPU utilization


Hi,

If you want real-time value, you must get the counters (ssCpuRawUser,
ssCpuRawNice, ssCpuRawSystem, ssCpuRawIdle) instead.
But you won't be able to use check_snmp....

Patrick
nagios AT proy.org

-----Message d'origine-----
De : nagiosplug-help-admin at lists.sourceforge.net
[mailto:nagiosplug-help-admin at lists.sourceforge.net] De la part de Mohanty,
Amitabh (Corporate, consultant) Envoyé : jeudi 10 février 2005 17:24 À :
nagiosplug-help at lists.sourceforge.net
Objet : [Nagiosplug-help] Nagios SNMP help for CPU utilization

Hi,
  I am using Nagios snmp plugin (NetSNMP) for monitoring the cpu usage of
remote servers (Running Red Hat Linux). The output I am getting is the
average value  instead of the real-time value (i.e. output of the top
command). I am using the following command. 
  I would appreciate if someone can help me out on this.

./check_snmp -H <host_name> -C <community_name> -o
.1.3.6.1.4.1.2021.11.9.0,.1.3.6.1.4.1.2021.11.10.0,.1.3.6.1.4.1.2021.11.11.0

Thanks,
Amitabh Mohanty
GE - CIS (Corporate Communications)
Tel: 203-944-6411 Dialcomm: 8*233-6411
Mobile: 203-223-9200
Email: amitabh.mohanty at corporate.ge.com 



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide Read honest & candid reviews
on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=ick
_______________________________________________
Nagiosplug-help mailing list
Nagiosplug-help at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
::: Please include plugins version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide Read honest & candid reviews
on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=ick
_______________________________________________
Nagiosplug-help mailing list
Nagiosplug-help at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
::: Please include plugins version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide Read honest & candid reviews
on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=ick
_______________________________________________
Nagiosplug-help mailing list
Nagiosplug-help at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
::: Please include plugins version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Help mailing list