grep '' /sys/class/net/eth*/carrier /sys/class/net/eth*/operstate
carrier
is 1
if the cable is connected and there's a signal, and it's 0
otherwise (or access to the carrier
gives an Invalid argument
error).operstate
is up
or down
according to whether the interface is brought up or not.
Recent comments
2 years 26 weeks ago
3 years 47 weeks ago
3 years 47 weeks ago
3 years 49 weeks ago
3 years 50 weeks ago
4 years 5 weeks ago
4 years 5 weeks ago
4 years 5 weeks ago
4 years 5 weeks ago
4 years 5 weeks ago