[nsp] Graphing packet loss
Sharan Harkisoon
sharan at sharktek.net
Fri Nov 21 12:03:11 EST 2003
I made a perl script to do this, works great.
#!/usr/bin/perl
$ip=@ARGV[0];
$result=`ping $ip -c 6 -s 128 -w 10`;
@result= split(/\n/,$result);
foreach $loop (@result) {
$loop=~ /, (\d+)\%/;
$loss=$1;
}
print "$loss\n";
print "$loss\n";
print "$loss\n";
print "$loss\n";
####mrtg script##
Target[router]: `/etc/opt/mrtg/scripts/packetloss 172.20.6.2`
Options[router]: growright, gauge, noo, noinfo, nolegend, nopercent
Title[router]: Router Packet Loss
Unscaled[router]: dwmy
MaxBytes[router]: 100
WithPeak[router]: dwmy
YLegend[router]: Packet loss %
ShortLegend[router]: %
LegendI[router]: : <!>
Directory[router]: packetloss
PageTop[router]: <H1>Packet Loss: Router</H1>
----- Original Message -----
From: "Hank Nussbacher" <hank at att.net.il>
To: <cisco-nsp at puck.nether.net>
Sent: Friday, November 21, 2003 4:33 AM
Subject: [nsp] Graphing packet loss
> We would like to graph the percentage pkt loss per line via MRTG polling
> of Cisco routers (7200s and 7500s). I would think that
> (ifOutDisards+ifOutErrors)/ifOutUcastPkts
> (ifInDiscards+ifInErrors)/ifInUcastpkts
> should give the needed result. But others are not sure. We run
> policy-map shaping on some of the lines and some of the class maps rate
> limit p2p things like Kazaa and Gnutella. That would cause an OutDiscard
> probably. So perhaps adding in Discards is not wise? But if an FE is
> rate limited to 45Mb/sec and the shaping is causing discards, those I
> would want to see.
>
> And what could cause an iFInDiscard?
>
> Or is there some better algorithm (specific MIBs plz) people use for
> calculating pkt loss?
>
> Thanks,
> -Hank
>
> _______________________________________________
> cisco-nsp mailing list cisco-nsp at puck.nether.net
> https://puck.nether.net/mailman/listinfo/cisco-nsp
> archive at http://puck.nether.net/pipermail/cisco-nsp/
>
More information about the cisco-nsp
mailing list