SNMP: Number of active ports

Hi all,

does anyone know a MIB/OID for the number of connected ports on a cisco switch (e.g. 2950G), the number of green lights on the panel?

Thanks!

-- Bruno

Reply to
Bruno
Loading thread data ...

Bruno as far as I remember - no but (assuming that you have a unix box) you can snmpwalk thru the status of the ports then pipe it to the "grep" and calculate it with "wc -l"

hope this helps Roman Nakhmanson

Reply to
Roman Nakhmanson

-Number- of connections is not in the standard MIBs.

You can walk the ifOperStatus subtree and count the ones that are up .

Reply to
Walter Roberson

BTW... it doesn't take a unix box. I've done it from Unix, Apple Macintosh, Linux AND Windows... It just takes an IP stack and snmp programs like snmpwalk, snmpget, snmpset etc.

J.Cottingim

Reply to
jcottingim

On the Mac with OS9, and in Windows, how did you pipe the output of the programs to grep and wc ?

The responder wasn't saying you couldn't get at the information from other boxes: the respondant was talking about processing the information after it was fetched.

Reply to
Walter Roberson

Searching Google for "grep for windows" or "wc for windows" returns plenty of options.

Reply to
BernieM

Besides being able to grep, awk, sed, and a whole host of other "unix" like utilities on the Macintosh... There's no reason you can't use Perl to parse out what you need. (yes, Perl runs on the Mac)

In short, there's no OS that I'm aware of that can't do what Bruno was asking for. - including "processing the information after it's fetched".

In fact, I would lay odds that someone has already written a publicly available Perl script to do exactly what Bruno was asking for.

Try googling for something like: perl snmp ifOperStatus

J.Cottingim

Reply to
jcottingim

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.