IOS Question regarding the tracking of sent/received data over an interface..

My home ISP (Time Warner) is starting to roll out service changes in which monitoring of data usage will ensue with overage charging (I've not decided if I'll ditch them just yet). To that end, I was wondering if the IOS software (like in my 1841 router) allows me to monitor incoming/outgoing traffic (in bytes) and read them via SNMP and also to reset them to zero when requested (also via SNMP) -- like at the end of the month. I did some googling around but didn't see anything obvious and thought I'd ask.. Thanks!

Reply to
Rick F
Loading thread data ...

You must not have searched very hard because this is very easy and very common You need to grab the SNMP MIB-II statistics. There are many utilities that can grab the statistics, but it is not very common to clear them. If you pull the statistics, the bytes in/out is the difference from the last time you read them.

You can also see you input and output bytes in the CLI with the command "show interface xxxx". You can clear the counters with "clear counters"

Reply to
Thrill5

Rick F schrieb:

maybe give traffstats

formatting link
or cacti, mrtg, ... a try

Reply to
klaus zerwes

As described this is straightforward - almost.

The counters are 32 bit counters and so wrap and 4G 'n' a bit. There may be 64 bit snmp counters on your platform ...HC... if I recall correctly but maybe not. The HC counters are definitely on the big switches (6500) bit I am not sure about routers. Ideally you need an snmp app that magically deals with the wrap.

Additionally the snmp counters cannot be reset - as far as I know. The "sh int" counters can be reset at any time with clear counters.

There seems a decent chance that a Netflow collector will deal with it all nicely. Netflow stats are reasonably described on the cisco web site.

As far as I know the snmp counters cannot be reset.

Reply to
bod43

.

Thanks everyone.. I'll look into what you suggest.. I've currently got Cacti running but don't have it talking yet to the router to get stats via SNMP...

Reply to
Rick F

There are only one set of counters, and if you issue a "clear counters" it will affect the the counters collected via SNMP. One of the reasons you should NOT clear the counters unless you really, really have to if you collecting stats via SNMP.

As described this is straightforward - almost.

The counters are 32 bit counters and so wrap and 4G 'n' a bit. There may be 64 bit snmp counters on your platform ...HC... if I recall correctly but maybe not. The HC counters are definitely on the big switches (6500) bit I am not sure about routers. Ideally you need an snmp app that magically deals with the wrap.

Additionally the snmp counters cannot be reset - as far as I know. The "sh int" counters can be reset at any time with clear counters.

There seems a decent chance that a Netflow collector will deal with it all nicely. Netflow stats are reasonably described on the cisco web site.

As far as I know the snmp counters cannot be reset.

Reply to
Thrill5

I've never seen 'clear counters' affect the SNMP counters ever?

That would really disrupt all SNMP graphing of data, and we do a ton of that on many devices on hundreds and hundreds of interfaces monitored. Have done that for years and years, and never had a problem.

Reply to
Doug McIntyre

I'm probably wrong on this on, I'm only the engineer not the one doing the monitoring. The guys who do the monitoring have told us engineers that we should not clear counters when trying to debug problems because it affects the numbers polled by SNMP.

Reply to
Thrill5

It's years since I needed to do "clear counters" but it was always the case that SNMP was not affected. Unless your monitoring guys have some esoteric knowledge I'd hazard that they're wrong.

Sam

Reply to
Sam Wilson

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.