Relevance - does Linux system has eth0 interface?

Dear BigFix Masters,
Could you please help me with the subject.

I have an idea (to look under “/sys/devices/”), but I am concerned that my relevance is taking a loooong time to run. Is there a better way to do it?

Q: exists folder “eth0” of (descendant folders of folder “/sys/devices/” )
A: True
T: 17706522

The corresponding Linux command runs much faster (about 0.05s):
[root@mysystem ~]# time find “/sys/devices/” -type d -name “eth0”
/sys/devices/pci0000:00/0000:00:16.0/0000:0b:00.0/net/eth0

real 0m0.027s
user 0m0.015s
sys 0m0.012s
[root@mysystem ~]#

Thank you,
Aleksandr

Not sure of your version of Linux / BESClient but this Relevance should be platform agnostic.

[root@mysystem ~]# /opt/BESClient/bin/qna

Q: names of adapters of network
A: bond0
A: eth0
A: eth1
A: lo
T: 365

Q: properties of type "network adapter"
A: address of <network adapter>: ipv4 address
A: cidr address of <network adapter>: string
A: cidr string of <network adapter>: string
A: loopback of <network adapter>: boolean
A: mac address of <network adapter>: string
A: multicast support of <network adapter>: boolean
A: name of <network adapter>: string
A: friendly name of <network adapter>: string
A: subnet address of <network adapter>: ipv4 address
A: subnet mask of <network adapter>: ipv4 address
A: up of <network adapter>: boolean
A: ipv4 interfaces of <network adapter>: network adapter interface
A: ipv6 interfaces of <network adapter>: network adapter interface
A: ipv4or6 interfaces of <network adapter>: network adapter interface
T: 387
4 Likes

Thank you, this is great! I hoped for something like that :slight_smile:

1 Like