Here is a perl script based on a bash script written by Dave C. at PathWay Computing that will allow you to use cricket to monitor a HiperARC TC at either the chassis, card, or span level. There is some cleanup work left to be done on it, but it is usable as posted. I'll post updates as they are appropriate. If anyone has any comments/etc on this code, please let me know. Joshua Coombs jcoombs@gwi.net GWI Networking <--------hiperget----------> #!/usr/bin/perl # # Script to walk through SNMP tree and add up total # active modems on a particular chassis, card or span. # # Created 4-17-01 by Joshua Coombs and Ed Howe # Based on a bash script by Dave C. # If using E1's vs T1s, change channels to 30 $chanels = 23; $snmpget = '/usr/local/bin/snmpget'; # Should not need to make any changes below here. # $usage = "./hiperget hostname comminuty-string [card-number] [span-number]\n"; $hostname = $ARGV[0]; $community = $ARGV[1]; $card = $ARGV[2]; $span = $ARGV[3]; if ( !($hostname) || !($community) ) { die ($usage); } if ($ARGV[4] ne "") { die ("Modem level reporting not implimented yet.\n"); } # No card specified. Report stats for the whole chassis, # then exit. # if ($card eq "") { $inuse = `$snmpget $hostname $community .1.3.6.1.4.1.429.4.2.1.10.0 | awk \'\{\ print \$4\ \}\'`; print "$inuse"; exit(0); } # No span specified. Report stats for a card, # then exit. # if ($span eq "") { $inuse = `$snmpget $hostname $community .1.3.6.1.4.1.429.4.10.35.1.3.${card} | awk \'\{\ print \$3\ \}\'`; print "$inuse"; exit(0); } # Card and Span specified. Calculate start position # in MIB tree. # $spanstart = 970 + ($card * 256) + ($span *31); $counterend = $spanstart + $chanels; $inuse = 0; $temp = 0; # Report stats on a span. # while ($spanstart != $counterend) { $temp = `$snmpget $hostname $community .1.3.6.1.4.1.429.4.10.1.1.18.${spanstart} | grep -v \'\=\ \"\"\' | wc -l`; chomp ($temp); $inuse = $temp + $inuse; $spanstart = $spanstart + 1; } print "$inuse\n"; - To unsubscribe to usr-tc, send an email to "majordomo@xmission.com" with "unsubscribe usr-tc" in the body of the message. For information on digests or retrieving files and old messages send "help" to the same address. Do not use quotes in your message.