From: jar_at_pcuf.fi
Date: 2002-06-17 19:58:36 UTC
Yes it is MRTG.
#!/usr/bin/perl
#
my($machine);
#
$ssh = "/usr/bin/ssh -x";
#
if (scalar(@ARGV) < 1)
{
print("USAGE: linkquality.pl {machine}\n");
exit(-1);
}
#
if ($ARGV[0] ne '' && $ARGV[0] ne '#')
{
$machine = $ARGV[0];
}
#
$getquality = `$ssh $machine "/usr/local/bin/wlan.pl"`;
#
exit(0);
3. To mrtg.cfg you can put something like this.
Target[machine_link0]: `/etc/mrtg/linkquality.pl machine`
AbsMax[machine_link0]: 92
MaxBytes[machine_link0]: 30
YTics[machine_link0]: 9
YTicsFactor[machine_link0]: 1.0
Options[machine_link0]: gauge, nopercent, growright, integer, withzeroes
Unscaled[machine_link0]: dwmy
YLegend[machine_link0]: Quality/92
ShortLegend[machine_link0]:.
LegendO[machine_link0]: LegendI[machine_link0]: Link Quality: Legend2[machine_link0]: Link Quality Legend4[machine_link0]: Maximal 5 Minute Link QualityTitle[machine_link0]: Link Quality for machine PageTop[machine_link0]: <H1>Link Quality for machine</H1> <TABLE>
<TR><TD>System:</TD><TD> Machine </TD></TR> <TR><TD>Maintainer:</TD><TD> Admin</TD></TR> <TR><TD>Description:</TD><TD> Link Quality</TD></TR> <TR><TD>Type:</TD><TD> 11Mb/s WLAN </TD></TR></TABLE>