[root@grid003f ecn]# more queuedepth.pl #!/usr/bin/perl #This program allows to monitor the current queue and the mean queue of the DSDEIS router interfaces; open(LIST, ">/home/tcptest/ecn/currentQ.list") || die "cannot open /home/tcptest/ecn/currentQ.list for writing"; open(LISTA, ">/home/tcptest/ecn/meanQ.lista") || die "cannot open /home/tcptest/ecn/meanQ.lista for writing"; for ($count=1; $count <= ($ARGV[0]/2); $count++) { $SnmpCurrQ= `/usr/bin/snmpwalk 131.154.99.206 public .1.3.6.1.4.1.9.9.166.1.18.1.1.1`; $SnmpMeanQ= `/usr/bin/snmpwalk 131.154.99.206 public .1.3.6.1.4.1.9.9.166.1.10.1.1.2`; if ($SnmpCurrQ=~ /Gauge32: (\d+)/) { print LIST "$1\n"; } if ($SnmpMeanQ=~ /= (\d+)/) { print LISTA "$1\n"; } sleep(2); } close (LIST); close (LISTA);