Checking CPU Utilization
Mooney, Ryan
ryan.mooney at pnl.gov
Tue Jan 20 00:50:50 CET 2004
Most of this is available via an SNMP agent (all on some OS/SNMP agent combos). This obviously requires setting more stuff up :) If linux (or most other un*x's) see www.net-snmp.org, I've found the free implementation to be superior to most vendors implementations for a lot of things (although you'll likely loose vendor specific mibs unless they support smux/agentx and you feel motivated to make that work).
Nagios has an snmp plugin for gathering data this way, and for mrtg its native.
For %CPU used you may (depending on what you care about) want to measure system vs user utilization as independent variables (depending on what sort of data your interested in); I believe that you can graph two variables stacked on one chart (I know you can w/ cricket - I haven't used mrtg in so long I forget :).
Also I wouldn't necessarily trust load averages (well or any of this data :) to be as meaning as you might like without taking it in context. As noted in other posts %CPU utilized is interesting, but doesn't really tell you if the machine is overloaded, load avg is SUPPOSED to tell you this, and often does, but falls short of being meaningful in some edge cases (occasionally causing much needless panic and alarm :) On linux (2.5, not sure on 2.6) (and some other un*x like OS's) load average is biased heavily by the number of "runnable" processes - I've seen instances where the machine had quite high load averages, but wasn't really doing anything much (due for example to kernel modules that showed as runnable but are blocked for some legitimate reason - the lustre fs does this rather spectacularly, although I've seen other instances - yes even in userland).
Not saying don't use any of this, more data is always good, just that you might want to be careful about drawing to many conclusions about the results without examining the other dependant variables :)
> -----Original Message-----
> From: rob at capband.net [mailto:rob at capband.net]
> Sent: Monday, January 19, 2004 2:49 PM
> To: Mark Reis; nagios-users at lists.sourceforge.net;
> nagios-users at lists.sourceforge.net
> Subject: Re: [Nagios-users] Checking CPU Utilization
>
>
> > I'm looking for a light weight command which will return current cpu
> > percentages and then quits like uptime, but with
> percentages and not load?
> > What I'd ideally like to do is to combine this tool with
> NRPE and mrtg so I
> > can graph the %CPU usage on compute servers our students
> use to run jobs.
>
> If your OS supports it, "sar" is the answer. There's cpusar,
> mpsar, etc., that aggregate stats on cpu, mem usage, disk
> usage, io percent, wait percent, etc. Also, "sar" by itself
> will spit back cpu usage on an hourly and 15 minute basis for
> off- and on-work hours (i.e. every 15 minutes between 8-5,
> hourly otherwise). A handy utility.
>
>
> -------------------------------------------------------
> The SF.Net email is sponsored by EclipseCon 2004
> Premiere Conference on Open Tools Development and Integration
> See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
> http://www.eclipsecon.org/osdn
> _______________________________________________
> 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
>
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
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