Graph CPU usage of OpenBSD part 2

Graph CPU usage of OpenBSD part 2

Post by Marc » Fri, 11 Apr 2003 20:24:09



Hello,

I am currently setting up cacti to graph the CPU usage of OpenBSD
getting the values via the following 4 SNMP OIDs:

enterprises.ucdavis.systemStats.ssCpuRawUser.0 = Counter32: 282871
enterprises.ucdavis.systemStats.ssCpuRawNice.0 = Counter32: 6471
enterprises.ucdavis.systemStats.ssCpuRawSystem.0 = Counter32: 2666371
enterprises.ucdavis.systemStats.ssCpuRawIdle.0 = Counter32: 655155796

I've already configured that to monitor a Linux server using the same
method (SNMP) and that works perfect, so now I also wanted to monitor an
OpenBSD server. For that I configured exactly the same infos in cacti
(also RRD config) but unfortunately I get some strange values.

This OpenBSD server is used as a firewall and thus hasn't much load on
it, usually all the time 99% idle, except for backups or such kinds of
events.

Now on the graph I get 127 % idle, which sounds very strange ! Is there
maybe something that I don't know in monitoring CPU usage on OpenBSD
which is different from Linux ?

If you need more infos like dumps from the RRA content or RRD
configurations just let me know I will then provide them.

Regards

 
 
 

Graph CPU usage of OpenBSD part 2

Post by Bartosz Czup » Sat, 12 Apr 2003 05:36:19


Quote:> Now on the graph I get 127 % idle, which sounds very strange ! Is there
> maybe something that I don't know in monitoring CPU usage on OpenBSD
> which is different from Linux ?

I had just the same. The reason is that snmp is buggy - it gives some
strange results and leads to much higer load. It is much better to use
system tools like vmstat - a simple script with something like: vmstat | awk
'{print $19}' should be good enough.

 
 
 

Graph CPU usage of OpenBSD part 2

Post by Marc » Sat, 12 Apr 2003 16:20:53



> I had just the same. The reason is that snmp is buggy - it gives some
> strange results and leads to much higer load. It is much better to use
> system tools like vmstat - a simple script with something like: vmstat | awk
> '{print $19}' should be good enough.

Ah that's a bug ok, I was already thinking I wasn't even able to set up
correctly RRDTool. Well I guess a simple upgrade of the UCD-SNMP package
should fix that hopefully. I think that I will wait for my OpenBSD 3.3
CDs and hopefully they did a new package of UCD-SNMP.

I don't really want to use the output of vmstat first of all because
it's much more inprecise than taking the raw counter from SNMP, as
RRDTool can use floating numbers let's take advantage of it and use them.

Also I am not sure about what does really represent the line which is
printed when I just issue the vmstat command, is that the stats since
the machine booted or what exactly ?

Regards

 
 
 

Graph CPU usage of OpenBSD part 2

Post by Andrea Mistral » Sat, 12 Apr 2003 16:32:01



> Hello,

> I am currently setting up cacti to graph the CPU usage of OpenBSD
> getting the values via the following 4 SNMP OIDs:

> enterprises.ucdavis.systemStats.ssCpuRawUser.0 = Counter32: 282871
> enterprises.ucdavis.systemStats.ssCpuRawNice.0 = Counter32: 6471
> enterprises.ucdavis.systemStats.ssCpuRawSystem.0 = Counter32: 2666371
> enterprises.ucdavis.systemStats.ssCpuRawIdle.0 = Counter32: 655155796

Well, to monitor CPU usage on OpenBSD I use

UCD-SNMP-MIB::ssCpuUser.0 = INTEGER: 0
UCD-SNMP-MIB::ssCpuSystem.0 = INTEGER: 0
UCD-SNMP-MIB::ssCpuIdle.0 = INTEGER: 99

Sorry for the odd output, but I'm using net-snmp 5.0 on my workstation,
on OpenBSD I use ucd-snmp right out of ports :)

Andrea