Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][tlug] MRTG (was: Re: bandwidth statistic generaing program?)
- Date: Fri, 16 Aug 2002 13:27:00 +0200
- From: Tobias Diedrich <td@example.com>
- Subject: [tlug] MRTG (was: Re: bandwidth statistic generaing program?)
- References: <F173mIvijyoLTsTmaz600005520@example.com> <E17faJR-0001Aj-00@example.com>
- User-agent: Mutt/1.4i
Jonathan Byrne wrote: > MRTG will talk to anything that speaks SNMP. Most routers and similar > devices do, but it's not limited to that. Anything can speak SNMP, and It even works without, you can use a script to provide the data: /etc/mrtg.cfg: |###################################################################### |# Multi Router Traffic Grapher -- Sample Configuration File |###################################################################### |# This file is for use with mrtg-2.5.4c | |# Global configuration |WorkDir: /var/www/router/mrtg |WriteExpires: Yes | |Title[^]: Traffic Analysis for | |Title[ppp0]: router ADSL connection |PageTop[ppp0]: <H1>Traffic analysis for ppp0</H1> |Target[ppp0]: `/usr/local/bin/routerstats` |MaxBytes1[ppp0]: 96000 |MaxBytes2[ppp0]: 16000 |WithPeak[ppp0]: wmy /usr/local/bin/routerstats: |#!/bin/sh |IN=`cat /proc/net/dev | awk 'index($1,"ppp0") != 0 { print substr($0,8) }' | awk '{ print $1}'` |OUT=`cat /proc/net/dev | awk 'index($1,"ppp0") != 0 { print substr($0,8) }' | awk '{ print $9}'` |if [ "$IN" = "" ]; then IN="0"; fi |if [ "$OUT" = "" ]; then OUT="0"; fi |echo "$IN" |echo "$OUT" |uptime |hostname And I know my usage of awk is awkward here (^__-) (It has been quite some time since I wrote that script...) -- Tobias PGP: 0x9AC7E0BC This mail is made of 100% recycled bits Now playing: Anri - Voice to Voice
- Follow-Ups:
- Re: [tlug] MRTG (was: Re: bandwidth statistic generaing program?)
- From: Josh Glover
- References:
- Re: [tlug] bandwidth statistic generaing program?
- From: Jean-Christian Imbeault
- Re: [tlug] bandwidth statistic generaing program?
- From: Jonathan Byrne
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] [REMINDER] 8/16 TLUG nomikai meeting
- Next by Date: Re: [tlug] MRTG (was: Re: bandwidth statistic generaing program?)
- Previous by thread: Re: [tlug] bandwidth statistic generaing program?
- Next by thread: Re: [tlug] MRTG (was: Re: bandwidth statistic generaing program?)
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links