1IFDATA(1) moreutils IFDATA(1)
2
3
4
6 ifdata - get network interface info without parsing ifconfig output
7
9 ifdata [options] {iface}
10
12 ifdata can be used to check for the existence of a network interface,
13 or to get information about the interface, such as its IP address.
14 Unlike ifconfig or ip, ifdata has simple to parse output that is
15 designed to be easily used by a shell script.
16
18 -h
19 Print out a help summary.
20
21 -e
22 Test to see if the interface exists, exit nonzero if it does not.
23
24 -p
25 Prints out the whole configuration of the interface.
26
27 -pe
28 Prints "yes" or "no" if the interface exists or not.
29
30 -pa
31 Prints the IPv4 address of the interface.
32
33 -pn
34 Prints the netmask of the interface.
35
36 -pN
37 Prints the network address of the interface.
38
39 -pb
40 Prints the broadcast address of the interface.
41
42 -pm
43 Prints the MTU of the interface.
44
45 Following options are Linux only.
46
47 -ph
48 Prints the hardware address of the interface. Exit with a failure
49 exit code if there is not hardware address for the given network
50 interface.
51
52 -pf
53 Prints the flags of the interface.
54
55 -si
56 Prints out all the input statistics of the interface.
57
58 -sip
59 Prints the number of input packets.
60
61 -sib
62 Prints the number of input bytes.
63
64 -sie
65 Prints the number of input errors.
66
67 -sid
68 Prints the number of dropped input packets.
69
70 -sif
71 Prints the number of input fifo overruns.
72
73 -sic
74 Print the number of compressed input packets.
75
76 -sim
77 Prints the number of input multicast packets.
78
79 -so
80 Prints out all the output statistics of the interface.
81
82 -sop
83 Prints the number of output packets.
84
85 -sob
86 Prints the number of output bytes.
87
88 -soe
89 Prints the number of output errors.
90
91 -sod
92 Prints the number of dropped output packets.
93
94 -sof
95 Prints the number of output fifo overruns.
96
97 -sox
98 Print the number of output collisions.
99
100 -soc
101 Prints the number of output carrier losses.
102
103 -som
104 Prints the number of output multicast packets.
105
106 -bips
107 Prints the number of bytes of incoming traffic measured in one
108 second.
109
110 -bops
111 Prints the number of bytes of outgoing traffic measured in one
112 second.
113
115 Benjamin BAYART
116
117
118
119moreutils 2006-03-07 IFDATA(1)