[mrtg] Re: # of hosts on the network

Alex van den Bogaerdt alex at mail.hollandcasino.nl
Tue Jan 25 12:44:25 MET 2000


Levente Nagy wrote:
> 
> To schedule network maintenance easier and more userfriendly I decided to
> collect some data on the hosts connected to my (switched) network.
> My idea is very simple and I guess the idea is not mine either.
> I would like to have graphial statistics via MRTG collected from our
> Catalyst 5000's (and a 6000) on the number of
> connected/notconnected pors. Is there an easy and simple way to
> make it?
> I found one similar solution on MRTG's website but that is based on a UNIX
> server and its finger so that is no good for me.
> 
> Anyone "wearing the same pair of shoes"? - as we say in Hungarian.
> 

Not exactly what you are looking for but it may help:

try snmpwalk on 1.3.6.1.4.1.9.5.1.3.1.1.15, it shows you the port
status per module:

<spaces and leading zero's filtered out by me>

enterprises.9.5.1.3.1.1.15.1 =  Hex:221 
enterprises.9.5.1.3.1.1.15.2 =  Hex:233 
enterprises.9.5.1.3.1.1.15.3 =  Hex:2222222222222 
enterprises.9.5.1.3.1.1.15.4 =  Hex:2222222222221221122221221 
enterprises.9.5.1.3.1.1.15.5 =  Hex:2111212222111122122222211 
enterprises.9.5.1.3.1.1.15.6 =  Hex:2222111221122222122111212 
enterprises.9.5.1.3.1.1.15.7 =  Hex:2222222111222222221211222 
enterprises.9.5.1.3.1.1.15.8 =  Hex:2121121221222212111211221 
enterprises.9.5.1.3.1.1.15.9 =  Hex:2222212121212111212212122 
enterprises.9.5.1.3.1.1.15.10 = Hex:2221222221211222222222222 
enterprises.9.5.1.3.1.1.15.11 = Hex:2222221222221122112212222 
enterprises.9.5.1.3.1.1.15.12 = Hex:22 

This shows module 1 trough 12.  Example for module 4:

               1         2
     0123456789012345678901234
     -------------------------
     2222222222221221122221221

Module is active (number 0)
Active ports: 1..11,13,14,17,,20,22,23
Inactive ports: 12,15,16,21,24
None are defective, administratively down, etcetera.

If you receive the snmp output, strip the module status,
count the number of status 02, you should have what you need.

The real output for module 4 looks like:
(I wrapped the line but it is really one line)

enterprises.9.5.1.3.1.1.15.4 =  Hex: 02 02 02 02 02 02 02 02 02 02 02
02 01 02 02 01 01 02 02 02 02 01 02 02 01 

It should be easy to count each " 02" value but the first.

Regards,
-- 
   __________________________________________________________________
 / alex at slot.hollandcasino.nl                  alex at ergens.op.het.net \
| work                                                         private |
| My employer is capable of speaking therefore I speak only for myself |
+----------------------------------------------------------------------+

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:mrtg-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/mrtg



More information about the mrtg mailing list