>> -----Urspr�ngliche Nachricht----- >> Von: frank [mailto:[EMAIL PROTECTED] >> Gesendet: Dienstag, 26. April 2005 23:59 >> An: Mohr James >> Cc: [email protected] >> Betreff: Re: Calculationg CPU usage using ssCpuRawIdle <SNIP> >> >> Tho since then, I've abandoned that method. Instead I use a >> small perl >> script called by SNMP's "exec" handler. The script runs vmstat for 2 >> cycles and reaps the percentages listed (from the second >> line) without any >> extra math being done. I find this to be more accurate, tho <SNIP>
I didn't know what you meant by 'SNMP's "exec" handler' so I have been doing a little research. I must say that I almost wet myself when I read what it could do. Wow! (I Both the EXAMPLE.conf and the O'Reilly SNMP book seem to imply that you have to do an snmpwalk to get the correct value. However, this is only to figure out the relationship between the name of the external application and the output. For example, between extEntry.extNames.1 and extEntry.extOutput.1. So I do a walk of the OID, looking for the known name (i.e. shelltest), get the table offset (i.e. 1) and then look at the value of extEntry.extOutput.1 to see the output of the script. Is that right so far? So, using the cpu usage example you had, I that script called "read_cpu" that simply outputs the %-CPU usage as a number. I can walk the oid looiking for "read_cpu", get the table offset then read extEntry.extOutput. Thus the values that I read via SNMP will match top and the other tools, So, I don't have to read any of the "raw" or calculate anything, and my boss will be happy. Regards, Jim Mohr ------------------------------------------------------- This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes! http://ads.osdn.com/?ad_ids93&alloc_id281&op=click _______________________________________________ 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
