I need to check the change in the status of eth connection ( link up and link down ) by program ( using c or perl ). Now I using the keepalive way, but i sometime loose the notification. Inside the messages files I see the kernel notification of 'eth0 link down' and this note are always correct so I looking for a way, maybe a syscall, to check for the eth status.
|
feedback
|
|
If you want to check the link status (carrier), you can check the file:
This will show 1 (link is up) or 0 (link is down). | |||||
feedback
|
|
Just as a workaround for RH73 (please don't ask me why I have a bunch of RH73 boxes to hand, in 2010):
| |||
|
feedback
|
|
Thanks MadHatter I have still considered the use of mii-tool utility, bu unlikely I found one limit, it works only on real device. mii-tool utility give not valid status for virtual devices , like tun, as required by openvpn. And this limt also limit it's usage, so I can't use it as a solution wich should works well both with real and virtual devices. BTW: I'm am enzo2 , tough now I'm connected with a different username. | |||
|
feedback
|