<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: Arial; font-size: 12pt; color: #000000'>I love how I can scour the internet for 2 weeks trying to find the answer and all I had to do was ask the right people. That worked, thank you very much.<br><br>Now, for the n00b questions. SNMP is worse than programming to me, it doesn't make sense and I am way too ADD to be able to sit down and figure it out.<br><br>Where can I find these OIDs? I have Zimbra on that same machine and I'd like to monitor much more stuff.<br><br>I noticed that the title reads "2 CPUs". Is it a problem that the machine only has one CPU? I tacked the same method on to localhost which is a dual core and the graphs look the same so I'm curious as to which line stands for what.<br><br>----- Original Message -----<br>From: "Max Hetrick" <maxhetrick@verizon.net><br>To: mrtg@lists.oetiker.ch<br>Sent: Thursday, September 24, 2009 6:18:43 AM GMT -06:00 US/Canada Central<br>Subject: Re: [mrtg] Monitoring CPU Utilization on a CentOS Machine<br><br>Matt Baer wrote:<br>> Hello.<br>> <br>> I'm having some issues getting the CPU utilization for any machine. For <br>> testing purposes, I'll only include one machine here. It is a single <br>> core CPU running CentOS. The machine that MRTG is running on is Ubuntu <br>> 9.04 Desktop and it's using MRTGv2.16.2. Here the relevant portion of <br>> my mrtg.cfg file:<br>> <br>> LoadMIBs: /usr/share/snmp/mibs/UCD-SNMP-MIB.txt<br>> Target[mailserv.cpu]:ssCpuRawUser.0&ssCpuRawUser.0:public@10.0.0.10 + <br>> ssCpuRawSystem.0&ssCpuRawSystem.0:public@10.0.0.10 + <br>> ssCpuRawNice.0&ssCpuRawNice.0:pub$<br>> MaxBytes[mailserv.cpu]: 100<br>> Title[mailserv.cpu]: CPU LOAD<br>> PageTop[mailserv.cpu]: <H1>Active CPU Load %</H1><br>> Unscaled[mailserv.cpu]: ymwd<br>> ShortLegend[mailserv.cpu]: %<br>> YLegend[mailserv.cpu]: CPU Utilization<br>> Legend1[mailserv.cpu]: Active CPU in % (Load)<br>> Legend2[mailserv.cpu]:<br>> Legend3[mailserv.cpu]:<br>> Legend4[mailserv.cpu]:<br>> LegendI[mailserv.cpu]: Active<br>> LegendO[mailserv.cpu]:<br>> Options[mailserv.cpu]: growright,nopercent,gauge<br>> <br>> I have tried many many many different changes to this but they all <br>> warrant the same results. I get a graph, but nothing populates within <br>> the graph. I notice that I'm getting things in the /var/mail/root. <br>> Here is my latest excerpt from that:<br>> <br>> Unknown SNMP var ssCpuRawUser.0<br>> at /usr/bin/mrtg line 2207<br>> Unknown SNMP var ssCpuRawUser.0<br>> at /usr/bin/mrtg line 2207<br>> 2009-09-24 00:35:01: WARNING: Expected a number but got '11:49:28'<br>> 2009-09-24 00:35:01: WARNING: Expected a number but got 'nas2'<br>> Unknown SNMP var ssCpuRawSystem.0<br>> at /usr/bin/mrtg line 2207<br>> Unknown SNMP var ssCpuRawSystem.0<br>> at /usr/bin/mrtg line 2207<br>> 2009-09-24 00:35:01: WARNING: Expected a number but got '11:49:28'<br>> 2009-09-24 00:35:01: WARNING: Expected a number but got 'nas2'<br>> Unknown SNMP var ssCpuRawNice.0<br>> at /usr/bin/mrtg line 2207<br>> Unknown SNMP var ssCpuRawNice.0<br>> at /usr/bin/mrtg line 2207<br>> 2009-09-24 00:35:01: WARNING: Expected a number but got '11:49:28'<br>> 2009-09-24 00:35:01: WARNING: Expected a number but got 'nas2'<br>> Unknown SNMP var ssCpuRawUser.0<br>> at /usr/bin/mrtg line 2207<br>> Unknown SNMP var ssCpuRawUser.0<br>> at /usr/bin/mrtg line 2207<br>> 2009-09-24 00:35:01: WARNING: Expected a number but got '34 days, 7:01:39'<br>> 2009-09-24 00:35:01: WARNING: Expected a number but got 'mail.server.com'<br>> Unknown SNMP var ssCpuRawSystem.0<br>> at /usr/bin/mrtg line 2207<br>> Unknown SNMP var ssCpuRawSystem.0<br>> at /usr/bin/mrtg line 2207<br>> 2009-09-24 00:35:01: WARNING: Expected a number but got '34 days, 7:01:39'<br>> 2009-09-24 00:35:01: WARNING: Expected a number but got 'mail.server.com'<br>> Unknown SNMP var ssCpuRawNice.0<br>> at /usr/bin/mrtg line 2207<br>> Unknown SNMP var ssCpuRawNice.0<br>> at /usr/bin/mrtg line 2207<br>> 2009-09-24 00:35:01: WARNING: Expected a number but got '34 days, 7:01:39'<br>> 2009-09-24 00:35:13: ERROR: Target[localhost.cpu][_IN_] ' <br>> $target->[18]{$mode} + $target->[19]{$mode} + $target->[20]{$mode} ' <br>> (warn): Use of uninitialized value in addition (+) at (eval 54) line 1.<br>> 2009-09-24 00:35:13: ERROR: Target[localhost.cpu][_OUT_] ' <br>> $target->[18]{$mode} + $target->[19]{$mode} + $target->[20]{$mode} ' <br>> (warn): Use of uninitialized value in addition (+) at (eval 55) line 1.<br>> 2009-09-24 00:35:13: ERROR: Target[mailserv.cpu][_IN_] ' <br>> $target->[22]{$mode} + $target->[23]{$mode} + $target->[24]{$mode} ' <br>> (warn): Use of uninitialized value in addition (+) at (eval 58) line 1.<br>> 2009-09-24 00:35:13: ERROR: Target[mailserv.cpu][_OUT_] ' <br>> $target->[22]{$mode} + $target->[23]{$mode} + $target->[24]{$mode} ' <br>> (warn): Use of uninitialized value in addition (+) at (eval 59) line 1.<br>> <br>> As I'm sure you've noticed, it's almost as iff ssCpuRawUser.0 returns <br>> 'uptime'. I cannot find an answer that works anywhere. Does anyone <br>> have a fix for this?<br><br>Have you tried the actual OID path? I'm graphing a CPU load in CentOS 4 <br>with the following:<br><br>Target[machine_1]: <br>1.3.6.1.4.1.2021.11.50.0&1.3.6.1.4.1.2021.11.50.0:public@machine + <br>1.3.6.1.4.1.2021.11.52.0&.1.3.6.1.4.1.2021.11.52.0:public@machine + <br>.1.3.6.1.4.1.2021.11.51.0&.1.3.6.1.4.1.2021.11.51.0:public@machine<br>MaxBytes[machine_1]: 100<br>Title[machine_1]: CPU LOAD<br>PageTop[machine_1]: <H1>Active CPU Load % (2 CPUs)</H1><br>Unscaled[machine_1]: ymwd<br>ShortLegend[machine_1]: %<br>YLegend[machine_1]: CPU Utilization<br>Legend1[machine_1]: Active CPU in % (Load)<br>Legend2[machine_1]:<br>Legend3[machine_1]:<br>Legend4[machine_1]:<br>LegendI[machine_1]: Active<br>LegendO[machine_1]:<br>Options[machine_1]: growright,nopercent<br><br>Try it out with the actual OID here and see what you get.<br><br>Regards,<br>Max<br><br>_______________________________________________<br>mrtg mailing list<br>mrtg@lists.oetiker.ch<br>https://lists.oetiker.ch/cgi-bin/listinfo/mrtg<br></div></body></html>