Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a command I can type from the command line to tell if there is a physical cable plugged into a network port?

share|improve this question
add comment

2 Answers

Solaris 10:

# dladm show-dev
nxge0           link: down      speed: 0     Mbps       duplex: unknown
nxge1           link: up        speed: 1000  Mbps       duplex: full

OpenSolaris/OpenIndiana/Solaris 11:

# dladm show-phys
LINK         MEDIA                STATE      SPEED  DUPLEX    DEVICE
rtls0        Ethernet             up         100    full      rtls0
rtls1        Ethernet             down       0      unknown   rtls1
share|improve this answer
add comment

kstat -p :::link_up

will show if the card is active as the OS sees it -- or not. It is possible to be "plugged in" and not configured or the connection has problems, so this is not goof proof.

share|improve this answer
    
Thanks, both of those do the trick –  Craig Sep 22 '10 at 13:13
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.