ifdata(1) moreutils ifdata(1)

ifdata - get network interface info without parsing ifconfig output


ifdata
[options] {iface}

ifdata can be used to check for the existence of a network interface, or to get information about the interface, such as its IP address. Unlike ifconfig or ip, ifdata has simple to parse output that is designed to be easily used by a shell script.

Print out a help summary.
Test to see if the interface exists, exit nonzero if it does not.
Prints out the whole configuration of the interface.
Prints "yes" or "no" if the interface exists or not.
Prints the IPv4 address of the interface.
Prints the netmask of the interface.
Prints the network address of the interface.
Prints the broadcast address of the interface.
Prints the MTU of the interface.

Following options are Linux only.

Prints the hardware address of the interface. Exit with a failure exit code if there is not hardware address for the given network interface.
Prints the flags of the interface.
Prints out all the input statistics of the interface.
Prints the number of input packets.
Prints the number of input bytes.
Prints the number of input errors.
Prints the number of dropped input packets.
Prints the number of input fifo overruns.
Print the number of compressed input packets.
Prints the number of input multicast packets.
Prints out all the output statistics of the interface.
Prints the number of output packets.
Prints the number of output bytes.
Prints the number of output errors.
Prints the number of dropped output packets.
Prints the number of output fifo overruns.
Print the number of output collisions.
Prints the number of output carrier losses.
Prints the number of output multicast packets.
Prints the number of bytes of incoming traffic measured in one second.
Prints the number of bytes of outgoing traffic measured in one second.

Benjamin BAYART

2006-03-07 moreutils