chmorin wrote: » What do you mean by 'in use'? The odds that a node plugged into the network is not sending something over the network periodically is very slim. What exactly are you trying to find out? There are ways to count the types of data being sent over a link, and view the results. But doing this in a switching environment is probably a bad idea for the CPU's sake.
NullCode wrote: » I hope these can help you: #sh int <interface> counters #sh int <int> | i packets
tiersten wrote: » I assume your problem is that you're looking for ports on your switch which have a combination of nothing on a port, something active on a port and something on a port but its completely off at the moment? If so then you're just going to have to look at the counters. If they're all 0s and you haven't reset them recently then there isn't anything on that port and its not been used since the last time its been reset. If however, you're trying to find ports which are connected to something but it isn't being used then you're going to have to look at the counter values and use your best judgement as I doubt they'll be 0.
Akiii wrote: » Yes something like that. I was just trying to find a better solution to go over the counters on the interfaces 1 by 1.
tiersten wrote: » Script it using Tcl if your switch supports it or do it via SNMP externally using whatever your favourite scripting language is.
Akiii wrote: » thanks I'll look after it!
snmpwalk -v2c -c <your RO SNMP community here> <your switch IP here> 1.3.6.1.2.1.31.1.1.1.6 IF-MIB::ifHCInOctets.1 = Counter64: 110975266 IF-MIB::ifHCInOctets.2 = Counter64: 0 IF-MIB::ifHCInOctets.3 = Counter64: 0 IF-MIB::ifHCInOctets.4 = Counter64: 0 IF-MIB::ifHCInOctets.5 = Counter64: 0 IF-MIB::ifHCInOctets.6 = Counter64: 0 IF-MIB::ifHCInOctets.7 = Counter64: 0 IF-MIB::ifHCInOctets.8 = Counter64: 0 IF-MIB::ifHCInOctets.9 = Counter64: 0 IF-MIB::ifHCInOctets.10 = Counter64: 0 IF-MIB::ifHCInOctets.11 = Counter64: 0 IF-MIB::ifHCInOctets.12 = Counter64: 0 IF-MIB::ifHCInOctets.13 = Counter64: 15099319 IF-MIB::ifHCInOctets.14 = Counter64: 0 IF-MIB::ifHCInOctets.15 = Counter64: 0 IF-MIB::ifHCInOctets.16 = Counter64: 0 IF-MIB::ifHCInOctets.17 = Counter64: 0 IF-MIB::ifHCInOctets.18 = Counter64: 0 IF-MIB::ifHCInOctets.19 = Counter64: 0 IF-MIB::ifHCInOctets.20 = Counter64: 0 IF-MIB::ifHCInOctets.21 = Counter64: 0 IF-MIB::ifHCInOctets.22 = Counter64: 0 IF-MIB::ifHCInOctets.23 = Counter64: 0 IF-MIB::ifHCInOctets.24 = Counter64: 0 IF-MIB::ifHCInOctets.25 = Counter64: 0 IF-MIB::ifHCInOctets.26 = Counter64: 0 IF-MIB::ifHCInOctets.28 = Counter64: 107823705
snmpwalk -v2c -c <your RO SNMP community here> <your switch IP here> 1.3.6.1.2.1.31.1.1.1.1 IF-MIB::ifName.1 = STRING: Fa0/1 IF-MIB::ifName.2 = STRING: Fa0/2 IF-MIB::ifName.3 = STRING: Fa0/3 IF-MIB::ifName.4 = STRING: Fa0/4 IF-MIB::ifName.5 = STRING: Fa0/5 IF-MIB::ifName.6 = STRING: Fa0/6 IF-MIB::ifName.7 = STRING: Fa0/7 IF-MIB::ifName.8 = STRING: Fa0/8 IF-MIB::ifName.9 = STRING: Fa0/9 IF-MIB::ifName.10 = STRING: Fa0/10 IF-MIB::ifName.11 = STRING: Fa0/11 IF-MIB::ifName.12 = STRING: Fa0/12 IF-MIB::ifName.13 = STRING: Fa0/13 IF-MIB::ifName.14 = STRING: Fa0/14 IF-MIB::ifName.15 = STRING: Fa0/15 IF-MIB::ifName.16 = STRING: Fa0/16 IF-MIB::ifName.17 = STRING: Fa0/17 IF-MIB::ifName.18 = STRING: Fa0/18 IF-MIB::ifName.19 = STRING: Fa0/19 IF-MIB::ifName.20 = STRING: Fa0/20 IF-MIB::ifName.21 = STRING: Fa0/21 IF-MIB::ifName.22 = STRING: Fa0/22 IF-MIB::ifName.23 = STRING: Fa0/23 IF-MIB::ifName.24 = STRING: Fa0/24 IF-MIB::ifName.25 = STRING: Gi0/1 IF-MIB::ifName.26 = STRING: Gi0/2 IF-MIB::ifName.27 = STRING: Nu0 IF-MIB::ifName.28 = STRING: Vl1
Forsaken_GA wrote: » I'm sure you've probably already figured this out, but I'll say it anyway - You should really do a port audit and figure out what's in use for real and what's not, and turn down any ports not actually in use. This is better from a security standpoint, and it'd also make finding a free port alot easier.