Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .