Use Perl module to monitor CPU usage

Zhi-Wei Lu <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Hi,

I try to monitor CPU usages for a bunch of Linux systems.
I try to get two sets of rawCpuUser, rawCpuSystem, and rawCpuIdle
values 1 or 2 seconds apart using Net-SNMP perl module, what would be
technique to do so? I can only get one set of data as soon as I
open the session with "$session = new SNMP::Session ...".  Do I need to
close the current session and start another session to get the new data?

I was invoking a script from snmpd (script is basically something  
like  vmstat 1 2) to grab the CPU status.  I try to conform to the  
policy of Redhat Linux default targeted Selinux, Selinux would not  
allow snmpd to invoke external script by default and I am not sure  
how I can tweak the Selinux policy to relax the
restriction yet.

Thank you very much for your help.

Zhi-Wei Lu
Institue for Data Analysis and Visualization (IDAV)
UC Davis                     Phone:    (530) 752-0494
Davis, CA 95616        Fax:         (530) 752-8894



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
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.