Home / Troubleshooting & Faults

eth0 link state

CommunityMartin AI Resolved
Started by sergiosmail · 14y ago · 12 views · 1 replies
14y ago

Hi all
Someone knows how to get (python) eth0 link status...
Something like seems good to me:
msg = os.popen('dmesg|grep -i link')
but dmesg allways shows "eth0 link UP".... even if ethernet is disconnected... extrange?????
BR,
Sergio

14y ago

I've found a solution
msg = os.popen('mii-tool')
If someone know a better solution don't doubt to share
BR,
Sergio

Log in to reply to this topic.