I am having a bit of a brain freeze. I would like to know the command that displays the link status when a network cable is unplugged from the switch port. What is the command name?
Cisco Command to display link status
ciscocisco-ioscliswitch
Related Solutions
To extend my comment, these switches don't have any pollable environment sensors. Only WS-C3524-PWR-XL-EN model has pollable fan sensor.
They've been completely out of support since 2007 and you'll never get newer software than WC17 which you are running.
We are having difficulties finding people who'll accept them free from us, so we usually just trash them. If I'd have XL switches and no budget I'd upgrade them to 3550, which is also EOL, but much superior switch and can be acquired for 50USD/pcs. 3550 runs modern IOS, 12.2(55)SE8 but technically is out of SW maintenance.
With 3550 you'd at least get MST, QinQ, L2PT, SSH, proper storm-control, IP routing, QoS, ACLs, SPAN.
Have you looked at this OID ?
Specific Object Information
Object clsPortLedStatus
OID 1.3.6.1.4.1.9.5.11.1.7.1.1.3
Type INTEGER
Permission read-only
Status current
Values 1 : unknown
2 : on
3 : off
MIB CISCO-RHINO-MIB
Description "Indicates the status of the LED.
Unknown(1) indicates either the LED status is
not supported or the status is none of the
defined."
And the related :
Specific Object Information
Object clsPortLedType
OID 1.3.6.1.4.1.9.5.11.1.7.1.1.2
Type INTEGER
Permission read-only
Status current
Values 1 : ledTx
2 : ledRx
3 : ledLink
4 : led100Mbps
5 : ledRxLoss
6 : ledRxFullOut
7 : ledRxSync
8 : ledFullDuplex
9 : ledOptDetect
Unfortunately the supported images/platforms are very limited : http://tools.cisco.com/ITDIT/MIBS/AdvancedSearch?MibSel=4682
I would say fake it, for link activity.
Poll interface stats (bytes or frames or packets in or out) and make the light in your application blink as long as either is increasing.
(Though I suppose technically some control traffic might or might not cause the physical LED to blink - for example, do BPDUs alone count towards link activity ? I do not know - I can check later, if you'd like.)
I searched and browsed the SNMP Object Navigator (http://tools.cisco.com/Support/SNMP/do/BrowseOID.do?local=en) last night for you, but found nothing suitable (not to say it doesn't exist), and any potentially interesting ones were marked as inaccessible ("Permission not-accessible").
If you're feeling especially crafty, and want the utmost accuracy, you could probably setup an ambient light sensor / "light to frequency converter" in front of each crucial port LED, and code to have that info passed to your application.
But that's not scalable, so it's probably easier to fake it.
EDIT, ROUND 2 !
How about :
"This object is used to indicate the current color of a LED."
Object c2900PortVisualIndicator
OID 1.3.6.1.4.1.9.9.87.1.4.1.1.24
Type INTEGER
Permission read-only
Status current
Values 1 : notused
2 : black
3 : amber
4 : green
MIB CISCO-C2900-MIB
Description "This object is used to indicate the current color of
a LED. If a LED is flashing, the value of this object will
represent the color of the LED at that instant in time.
The following conventions indicate port status:
Link healthy returns green(4)
Link activity usually green(4), but may return black(2).
Link faulty alternating green(4)/amber(3)
Port disabled returns amber(3)"
Object ceExtEntityLEDColor
OID 1.3.6.1.4.1.9.9.195.1.3.1.2
Type INTEGER
Permission read-only
Status mandatory
Values 1 : off
2 : green
3 : amber
4 : red
MIB CISCO-ENTITY-EXT-MIB-V1SMI
Description The color of the LED.
"An integer value that describes the color of the display"
Type CDisplayColor
Status current
Values 1 : unknown
2 : white
3 : red
4 : green
5 : yellow
6 : amber
7 : blue
8 : greenAndAmber
MIB CISCO-ENTITY-DISPLAY-MIB
Description "An integer value that describes the color of the display.
'greenAndAmber' - Indicates that the display color toggles between green and amber."
As well as,
mrStackUnitBasePortVisualIndicatorGreenMap,
mrStackUnitBasePortVisualIndicatorAmberMap,
mrStackUnitExpansionPortVisualIndicatorGreenMap,
mrStackUnitExpansionPortVisualIndicatorAmberMap, and
mrStackUnitActivityVisualIndicator
all under mrStackUnitEntry.
For ATM :
ciscoAtmIfXmitLed
ciscoAtmIfRecvLed
ciscoAtmIfCdLed
Finally, this nugget, from "CISCO-WIRELESS-EXP-MIB" :
"When the CISCO-LED-MIB.my becomes available and supports the functionality the LED group needs, the LED group will be migrated into that."
Apparently mention of a MIB that never came to be.
Best Answer
The easiest way on Cisco switches is:
This will show you the link status for all ports The 45xx line has also some additional useful commands:
which will show you the last time the link was active. Also you can use (it is disruptive for the port):
and then
This will give you an approximation of the length of the attached cable