[rrd-users] Storing snmpget results in an array
Stephen Cheung
stephen.cheung at hds.com
Tue Jul 22 14:52:00 MEST 2003
Hi all,
I've read through the manuals and mailing lists, but didn't find anything.
I'm trying to do the following:
code to get snmp data values:
$var = `snmpget -Ov myipaddress public OID.0` (1,2,....etc)
I can get single values and assign it to a variable. No problems.
To get all values for that object, I can leave out the last value and get a
list
snmpget -Ov myaddaddress public OID
This command returns (say 1000) items in a list of values when run at a
command prompt.
C:\snmp>perl script.pl
0
0
0
0
4
6
etc
How can I enter this list into a perl array, so that when I perform the rrd
update command, I can enter certain single element out of the array? Is this
possible?
eg rrdtool update myrrd.rrd N:$var[0]
Do I use something like snmputil perl module?
Thanks
Steve
--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
More information about the rrd-users
mailing list