Bandwidth monitoring summary
Mark Purcell
mark at purcell.homeip.net
Sat Oct 6 21:09:30 EST 2001
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Sat, 6 Oct 2001 18:52, Darrell Burkey wrote:.
> Unfortunately, I'm not as interested in monitoring flow as I am in
> capturing the volume over a period of time such as ipac does.
You maybe interested but I have hacked mrtg to calculate and display the
volume over its standard day, week, month and year graphics. At least I
find it handy to keep under the ADSL 3Gb limit..
Anyway have a look at:
http://purcell.homeip.net/mrtg/purcell.homeip.net.2.html for the end result..
The patch is as follows, I did submit this upstream at one stage,but it never
really stuck..
Mark
purcell:/usr/bin# diff -u mrtg.orig mrtg
- --- mrtg.orig Sun Apr 8 23:42:27 2001
+++ mrtg Sat Oct 6 21:02:33 2001
@@ -931,6 +931,12 @@
'w' => 'week',
'm' => 'month',
'y' => 'year');
+
+ my %dys = ('d' => 1,
+ 'w' => 7,
+ 'm' => 30,
+ 'y' => 365);
+
my $InCo;
$$rcfg{'rgb1'}{$router} = "" unless defined $$rcfg{'rgb1'}{$router};
@@ -989,7 +995,10 @@
print HTML "
<!-- Begin $sample{$peri} -->
<HR>
- -".&$LOC("<B>$sample{$peri}").&$LOC(" Average)</B><BR>")."
+".&$LOC("<B>$sample{$peri}").&$LOC(" Average)
+ $InCo " .int($$avin{$peri}{$router}*0.086400*$dys{$peri})." Mb/$full{$peri}
+ $OutCo " .int($$avout{$peri}{$router}*0.086400*$dys{$peri})."
Mb/$full{$peri}
+ </B><BR>")."
<IMG VSPACE=10 WIDTH=$gifw HEIGHT=$gifh ALIGN=TOP
SRC=\"$dirrel$$cfg{imagehtml}$$rcfg{directory_web}{$router}$router-$full{$peri}.${main::GRAPHFMT}\"
ALT=\"$full{$peri}\">
<TABLE CELLPADDING=0 CELLSPACING=0>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE7vuZroCzanz0IthIRAohOAJoDDidaM97DaDvQoPsn64nDRC7HRgCgnaqI
iIpzbKx5sR5SJ/w/o3VWasM=
=8d2D
-----END PGP SIGNATURE-----
More information about the linux
mailing list