1

Topic: eth0 link state

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

Last edited by sergiosmail (2012-02-02 13:23:59)

2

Re: eth0 link state

I've found a solution

    msg = os.popen('mii-tool')


If someone know a better solution don't doubt to share

BR,
Sergio