I'm doing something similar for examining octets on multiple routers and I have the same worry. I've been working on forking a new process for each device and that would solve the problem, but its not working yet. Mind you if you have a lot of devices you could be looking at quite a few child processes which might chew up quite a bit of RAM.
If I get mine done and working I'll make sure to contact you, but my programming time is pretty tight lately so if your Perl is up to it try that idea. Jason... -----Original Message----- From: Cassie Bezuidenhout [mailto:[EMAIL PROTECTED] Sent: Thursday, December 18, 2003 11:50 PM To: [email protected] Subject: [rrd-users] QOS Help Content-Type: text/plain Hi All I created the attached script to pull information from our internet router to get values for passing through to RRD. In principal it works but it is extremely slow and I am a bit worried about the order. I need the script to complete both walks before moving on to the second device as the same values might appear. Currently the attached script walks through and gives me the results, but it is taking far too long. Any help would be much appreciated.... #!/usr/local/lib/perl BEGIN { open (STDERR, ">/usr/local/nmis/cbwfq/error.txt"); } use lib "/usr/local/nmis/lib"; use SNMP::Util; $SNMP::Util::Max_log_level = 'debug'; use BER; #use SNMP_util "0.90"; use SNMP_util; $BER::pretty_print_timeticks = 0; # Uptime in absolute value @IP_array = ('my-ip-one',' my-ip-two ',' my-ip-three '); $community = 'my-community'; $first = '1.3.6.1.4.1.9.9.166.1.7.1.1.1'; $second = '1.3.6.1.4.1.9.9.166.1.5.1.1.2'; foreach $IP (@IP_array) { @Config1 = (&snmpwalk("[EMAIL PROTECTED]", $first)); foreach $Config1 (@Config1) { ($oid1, $Config1) = split(':', $Config1, 2); # print "$oid1 = $Config1\n"; @Config2 = (&snmpwalk("[EMAIL PROTECTED]", $second)); foreach $Config2 (@Config2) { ($oid2, $Config2) = split(':', $Config2, 2); # print "$oid2 = $Config2\n"; if ($oid1 == $Config2) { print "$Config1 = $oid2\n"; } } } } Cassie Bezuidenhout * +27 11 256-0531 * +27 83 677 0767 * [EMAIL PROTECTED] -- Attached file removed by Ecartis and put at URL below -- -- Type: image/jpeg -- Size: 3k (4088 bytes) -- URL : http://www.ee.ethz.ch/~slist/p/11-image001.jpg -- Attached file removed by Ecartis and put at URL below -- -- Type: image/jpeg -- Size: 2k (3024 bytes) -- URL : http://www.ee.ethz.ch/~slist/p/02-image002.jpg -- Unsubscribe mailto:[EMAIL PROTECTED] Help mailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi -- Unsubscribe mailto:[EMAIL PROTECTED] Help mailto:[EMAIL PROTECTED] Archive http://www.ee.ethz.ch/~slist/rrd-users WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
