hrSWRunPerfCPU - 5.4.3 vs 5.7.2

Vincent Newell <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <CAFMTCMYCVMamkk+TzYTrLhDcnZC0Kz5mWCN2FK_KfBh4dgRTBg@mail.gmail.com>
Greetings,

I have a small LAN of four systems for which I would like to monitor
specific processes' CPU and Memory utilization.  I am able to determine the
PID and host on which each process is running so I would like to use SNMP
to make the actual queries for resource utilization.  For Ubuntu 12.04 with
net-snmp 5.4.3, I wrote some software to find all of the processes (using
ROS), and dispatch SNMP queries and track performance using
HOST-RESOURCES-MIB::hrSWRunPerfCPU.<pid> and
HOST-RESOURCES-MIB::hrSWRunPerfMem.  Each data point combines a timestamp
with an identifier and the encoded varbind.  The data is passed through
some complicated system and, long story short, ends up in graphite.  Using
the nonNegativeDerivative and scaleToSeconds functions, I created a CPU
graph to track all of the processes.  Computation-heavy single-threaded
processes were hovering around 100%, so I think I did everything right.

I recently upgraded the systems to 14.04 and net-snmp 5.7.2 and noticed
that my data points were alternating between 0 and 200% ... I took a closer
look by launching 'yes' in the background, and comparing 5.4.3 and 5.7.2
with:

watch -d "snmpget -v2c -c public localhost
HOST-RESOURCES-MIB::hrSWRunPerfCPU.6650"

I found that net-snmp 5.4.3 would update every time I made the request,
net-snmp 5.7.2 was behaving more like a step function, updating.  I used
strace and fond that net-snmp 5.4.3 reads /proc/6650/stat each time it's
queried while 5.7.2 will read the entire /proc/*/stat table every 30
seconds, and return the latest value that it reads.  That made sense
because my original query interval was 15 seconds, so I would see zero
change in the hrSWRunPerfCPU every other time I queried.

Is there any way I can get net-snmp 5.7.2's process table to actually check
the procfs rather than reading from memory?

Regards,
Vince

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk

_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.