Number of connected ports

Unanswered Question
Aug 11th, 2010


I am working with couples of 3750 switches in different location, all centralized on a backbone 4506. I am trying to find a system to see every hour how many connected ports are in connected status. Any idea ?

So far I had the idea to schedule a show inter status every hours redirected to an excel file, then from there having another excel file who will look in the first one and count the number of connected in it every hour. But I have trouble figuring how to do this part automatically.

Thank you for your help.


I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Rollin Kibbe Mon, 08/16/2010 - 09:57

Hi JB:

Knowing what tools you have at your disposal would help.  Since the 3750 doesn't support EEM, getting the device to do something on its own isn't going to be possible.

The IF-MIB has the ifOperStatus object:  you could write a script that would walk the ifOperStatus, grep out the downs or grep to count the ups and do something with that.  That assumes that you have a Unix/Linux environment available, have Net-SNMP or something similar, and SNMP enabled on your switches.

If you wanted to stick with your "telnet in and run 'show int status | i Connected' and count" idea, you could use the expect package in a Unix/Linux distribution to script your logins, then grep -c to come up with a count.

There are a number of ways to approach this.  What do you have available to work with?


Rollin Kibbe

Network Management Systems Team

billetj09 Mon, 08/16/2010 - 22:34

Hi and thanks for your answer,

For my issue, I am working around. What I am doing at the moment is redirecting the output of show inter status to a CSV file on a windows machine every hour. Then on the machine I copy and rename that csv file in a different folder with the timestamp in the name. And I am working at the moment on an excel file to count and collect the information on those csv files.

I think that will be the easiest way then as I am not using tools doing that kind of job.

Thanks anyway.



This Discussion