I'm aware that I can use ethtool eth0|eth1|eth2 to check the existence of a NIC.
But I wonder where the files are on the machine that contain information of an existing interface, as I need to use the Ruby language to check for available NICs.
Tell me more
×
Unix & Linux Stack Exchange is a question and answer site for
users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.
|
|
||||
|
|
|
There is /proc/net/dev, but I am sure there is an actual Ruby API to do this correctly. see http://curioushq.blogspot.com/2011/04/listing-all-network-interfacesdevices.html |
|||
|
|
|
Call |
|||
|
|