Re: simple, but over-reboot network interfaces monitoring tool
- From: Gordon Henderson <gordon+usenet@xxxxxxxxxx>
- Date: Sat, 13 Oct 2007 08:24:35 +0000 (UTC)
In article <m2zlyontkx.fsf@xxxxxxxxx>, Pawel <paulino90@xxxxxxxxx> wrote:
Gordon Henderson <gordon+usenet@xxxxxxxxxx> writes:
Yes.1.3.6.1.2.1.2.2.1.11.1&1.3.6.1.2.1.2.2.1.17.1:public@localhost:
The cfgmaker program will create a configuration to let you graph bytes
in/out of Interfaces, but for packets, you need something like:
Target[net_eth0_pkt]:
MaxBytes[net_eth0_pkt]: 100000000
Options[net_eth0_pkt]: noinfo
#WithPeak[net_eth0_pkt]: dwmy
ShortLegend[net_eth0_pkt]: pkt/sec
Legend1[net_eth0_pkt]: Packets In
Legend2[net_eth0_pkt]: Packets Out
YLegend[net_eth0_pkt]: Packets/Sec
Title[net_eth0_pkt]: eth0 (Packets/Sec)
PageTop[net_eth0_pkt]: <H1>eth0 (Packets/Sec)</H1>
The last digit (1) in the 2 strings of numbers above (either side of
the &) refers to the interface number - it'll be the same as for the
bytes entry.
Gordon,
my mrtg.cnf now looks like following:
EnableIPv6: no
WorkDir: /home/mrtg/httpd
Target[localhost_2]:
1.3.6.1.2.1.2.2.1.11.2&1.3.6.1.2.1.2.2.1.17.2:Gdansk@localhost:
MaxBytes[localhost_2]: 100000000
Options[localhost_2]: noinfo
#WithPeak[localhost_2]: dwmy
ShortLegend[localhost_2]: pkt/sec
Legend1[localhost_2]: Packets In
Legend2[localhost_2]: Packets Out
YLegend[localhost_2]: Packets/Sec
Title[localhost_2]: eth0 (Packets/Sec)
PageTop[localhost_2]: <H1>eth0 (Packets/Sec)</H1>
..but I do not see any total bytes in/out counters. only bytes/sec, packets/sec.
Ahother thing I wonder what if I reboot machine. Will total bytes in/out
counters be properly updated (that is, added to those before reboot)?
MRTG won't give you total counts for intefaces, only counts over a
period of time. If it was giving total counts, the graphs would get
biger and bigger and bigger and ...
You can get the approximate data count by taking the averages on the
Interface over a period of time. This is reasobably accurate, so taking
the dailiy average speed (which MRTG gives you) and putting it through
some calculations you can get the daily traffic counts. The longer the
average period, the more accurate it is (eg. using the weekly count)
The interface counters are reset on a reboot, so unless you are sampling
them very frequently and logging it to disk, you're going to lose that
information. MRTG just needs to know the difference between 2 samples to
work out the speed, so a reboot isn't going to affect it.
Also note that MRTG will fail on very busy Gb links as the (32-bit)
counters will wrap more than once in a 5-minute period.
It's not difficult to get the raw numbers yourself - you could sample
them once a minute and write to a file, but you need to cope with the
counters wrapping round when they go over the 32-bit mark, and a reboot,
but I don't know off-hand any tools that might do this for you.
You can get the counts simply by grepping the output of ifconfig, or
from /proc/net/dev
Gordon
.
- Follow-Ups:
- References:
- simple, but over-reboot network interfaces monitoring tool
- From: Pawel
- Re: simple, but over-reboot network interfaces monitoring tool
- From: Pawel
- Re: simple, but over-reboot network interfaces monitoring tool
- From: Gordon Henderson
- Re: simple, but over-reboot network interfaces monitoring tool
- From: Pawel
- simple, but over-reboot network interfaces monitoring tool
- Prev by Date: Re: Recovering LVM etc after partition table overwritten
- Next by Date: Re: OT: Getting Quicken working
- Previous by thread: Re: simple, but over-reboot network interfaces monitoring tool
- Next by thread: Re: simple, but over-reboot network interfaces monitoring tool
- Index(es):
Relevant Pages
|
|