The only script I have every found in the contrib. for 3com will give you total modem usage per box, not per DSP card, so that's why I wrote this script. We have boxes with mixed PRI numbers in them and needed to separate the totals. Mark Green Apple Inc ----- Original Message ----- From: "Charles Sprickman" <spork@inch.com> To: "Green Apple Network Info" <netinfo@greenapple.com> Cc: "Usr-Tc@Lists. Xmission. Com" <usr-tc@lists.xmission.com> Sent: Monday, November 19, 2001 11:10 PM Subject: Re: [USR-TC] MRTG Sript for individual DSP card modem utilization.
Hi,
Also, if you have the mrtg source around, check the contrib directory. There's scripts in their for dsp's and T1 cards that do this quite nicely...
Charles
| Charles Sprickman | Internet Channel | INCH System Administration Team | (212)243-5200 | spork@inch.com | access@inch.com
On Mon, 19 Nov 2001, Green Apple Network Info wrote:
Hello All, Since I've gotten nurmerous requests for this, here is the perl script I have for per DSP card modem usage. Read the script for more info. Let me know if works for you. I called it dsp.pl.
------------------------------------------------------------ #!/usr/bin/perl
# dsp.pl # # Usage dsp.pl community@IP@slot# # Example dsp.pl mypublic@192.168.1.3@7 # # Created by Mark Starr (mstarr@greenapple.com) # returns: # Modems in use (value1) # DSP card capacity (value2) # Assumes 23 channels are available
# Points to lib installed with MRTG. Modify as needed use lib "/usr/local/mrtg/current/lib/mrtg2"; use BER; use SNMP_util; use SNMP_Session;
my($community,$router,$slot) = split /\@/, $ARGV[0];
foreach ($i = 1;$i <= 23; $i++) { $mib1 = "enterprises.429.1.28.2.1.3."; $mib2 = "025."; $mib = $mib1.$slot.$mib2.$i;
($value) = snmpget("$community\@$router","$mib"); if ($value eq 5) { $value1=($value1+1); $value2=($value2+1); } else { $value2=($value2+1); } }
if( $value1 eq ''){$value1 = 0 }; if( $value2 eq ''){$value2 = 0 }; print "$value1\n"; print "$value2\n"; ----------------------------------------------------------------------
Mark Green Apple Inc
_______________________________________________ USR-TC mailing list USR-TC@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/usr-tc