Re: monitoring cisco via snmpget
- From: roberson@xxxxxxxxxxxx (Walter Roberson)
- Date: Fri, 14 Jul 2006 19:40:57 GMT
In article <1152902870.874534.65330@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
<davide.papagno@xxxxxxxxx> wrote:
I need to monitor my cisco 2600 router with simple snmp cli command.
I just wanna know if is this the correct way:
fastethernet input and output traffic
I use:
snmpget -v 2c -c public -Oqv router IF-MIB::ifInOctets.2
snmpget -v 2c -c public -Oqv router IF-MIB::ifOutOctets.2
Those look plausible. Myself, usually use the numeric OID instead
of the MIB name, in order to avoid the overhead of parsing the MIB
files each time the command fires up. Also, you should likely be able
to poll both values with a single snmpget command, which would
reduce overhead.
what I get is:
3143069294
3275366667
are they bytes?
How can I have in kb/s?
To get kb/s you need to record the time you took each sample,
do a difference in octets between the recordings, divide by the
time difference, and convert from octets to kilooctets.
I have to type this command every 60 seconds for 2 hours, is it
dangerous for my router?
If your router is highly loaded already it could cause problems.
I just tryied mrtg, infovista and others.. but I really need every one
minute monitor statistics.
If I recall correctly, mrtg will (with minor configuration) take
1 minute readings. *Possibly* you might have to make a small change
to it to keep a full two hours around instead of summarizing it.
One issue you should think about a bit, is that if the interfaces
are fast interface or are highly loaded, the traffic counters you
are polling might overflow -- they are only 32 bit counters.
[Cisco generally provides 64 bit counters as well as 32 bit counters,
but we'd need more information about your IOS release to know whether
you have that support or not. ] Thus, your calculation routines
should not merely take the difference in counters: they should
check to see if the new counter appears to be less than the old one,
and if so then assume that the new counter is 2^32 higher than it
appears. Then you just have to worry about restarts and interface
counter clearing, and about the possibility of having more than
2^32 octets of traffic in one minute (which corresponds to about
1/2 gigabit per second.)
.
- References:
- monitoring cisco via snmpget
- From: davide . papagno
- monitoring cisco via snmpget
- Prev by Date: Re: monitoring cisco via snmpget
- Next by Date: Re: monitoring cisco via snmpget
- Previous by thread: Re: monitoring cisco via snmpget
- Index(es):
Relevant Pages
|
|