Re: [Nagios-users] Rép. : RE: [Nagios-users]Is there a way to check the cpu %?
Marcel Mitsuto Fucatu Sugano
msugano at uolinc.com
Fri May 5 17:47:28 CEST 2006
On Fri, 2006-05-05 at 16:18 +0200, Thibault Genessay wrote:
> Serveur-Faucon Surveillance wrote:
> > Unfortunatly, check_load only show the load and not the cpu utilisation, the equivalent of typing "w" in shell. What I am looking for is more something like "top". See below I have copy the result of "top".
> >
> > load = number of tasks in the queue and running (average)
> > cpu utilisation = % of cpu in use.
> >
> > Here is the result of top.
> > --- top ---
> > 09:48:53 up 310 days, 17:31, 1 user, load average: 0.76, 0.51, 0.52
> > 65 processes: 58 sleeping, 7 running, 0 zombie, 0 stopped
> > CPU0 states: 48.0% user 4.0% system 0.0% nice 0.0% iowait 46.0% idle
> > CPU1 states: 48.0% user 0.1% system 0.0% nice 0.0% iowait 50.0% idle
> >
> You can get this info with
> top -b -n 1
> Then you can awk, grep or pythonize the output to get whatever you need
>
> However, I do not recommend this method as it is both slow and heavy in
> resources usage. Furthermore, those CPU loads are instantaneous values
> that represent only 1 second (or any delay top uses to compute those
> numbers), and thus can be aberrant regarding what the CPU has during all
> the time it was not checked for; i.e. if your check_interval is 5
> minutes you should not take a random, 1 second long sample in a 5 min
> period but an average value computed over the 5 minutes.
> > You can get the first line of infos with check_load and check_uptime (contrib)
> > The second with check_proc
> >
> > But currently I don't see any way of getter the other lines.
sysstat package, using sar command, solves the issue.
HTH,
Marcel
> >
> Have a look check_snmp_load.pl and its *netsc *option for the -T
> argument (see http://www.manubulon.com/nagios/snmp_load.html)
> This might be what you are looking for.
>
AVISO: A informação contida neste e-mail, bem como em qualquer de seus anexos, é CONFIDENCIAL e destinada ao uso exclusivo do(s) destinatário(s) acima referido(s), podendo conter informações sigilosas e/ou legalmente protegidas. Caso você não seja o destinatário desta mensagem, informamos que qualquer divulgação, distribuição ou cópia deste e-mail e/ou de qualquer de seus anexos é absolutamente proibida. Solicitamos que o remetente seja comunicado imediatamente, respondendo esta mensagem, e que o original desta mensagem e de seus anexos, bem como toda e qualquer cópia e/ou impressão realizada a partir destes, sejam permanentemente apagados e/ou destruídos. Informações adicionais sobre nossa empresa podem ser obtidas no site http://sobre.uol.com.br/.
NOTICE: The information contained in this e-mail and any attachments thereto is CONFIDENTIAL and is intended only for use by the recipient named herein and may contain legally privileged and/or secret information. If you are not the e-mail´s intended recipient, you are hereby notified that any dissemination, distribution or copy of this e-mail, and/or any attachments thereto, is strictly prohibited. Please immediately notify the sender replying to the above mentioned e-mail address, and permanently delete and/or destroy the original and any copy of this e-mail and/or its attachments, as well as any printout thereof. Additional information about our company may be obtained through the site http://www.uol.com.br/ir/.
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list