Debian Codegraph @

upstream/debian-unstable/man8/ip-monitor.8

raw
1 .TH IP\-MONITOR 8 "13 Dec 2012" "iproute2" "Linux"
2 .SH "NAME"
3 ip-monitor, rtmon \- state monitoring
4 .SH "SYNOPSIS"
5 .sp
6 .ad l
7 .in +8
8 .ti -8
9 .BR "ip monitor" " [ " all " |"
10 .IR OBJECT-LIST " ] ["
11 .BI file " FILENAME "
12 ] [
13 .BI label
14 ] [
15 .BI all-nsid
16 ] [
17 .BI dev " DEVICE "
18 ]
19 .sp
20
21 .SH OPTIONS
22
23 .TP
24 .BR "\-t" , " \-timestamp"
25 Prints timestamp before the event message on the separated line in format:
26 Timestamp: <Day> <Month> <DD> <hh:mm:ss> <YYYY> <usecs> usec
27 <EVENT>
28
29 .TP
30 .BR "\-ts" , " \-tshort"
31 Prints short timestamp before the event message on the same line in format:
32 [<YYYY>-<MM>-<DD>T<hh:mm:ss>.<ms>] <EVENT>
33
34 .SH DESCRIPTION
35 The
36 .B ip
37 utility can monitor the state of devices, addresses
38 and routes continuously. This option has a slightly different format.
39 Namely, the
40 .B monitor
41 command is the first in the command line and then the object list follows:
42
43 .BR "ip monitor" " [ " all " |"
44 .IR OBJECT-LIST " ] ["
45 .BI file " FILENAME "
46 ] [
47 .BI label
48 ] [
49 .BI all-nsid
50 ] [
51 .BI dev " DEVICE "
52 ]
53
54 .I OBJECT-LIST
55 is the list of object types that we want to monitor.
56 It may contain
57 .BR link ", " address ", " route ", " mroute ", " maddress ", " acaddress ", "
58 .BR prefix ", "neigh ", " netconf ", " rule ", " stats ", " nsid " and "
59 .BR nexthop "."
60 If no
61 .B file
62 argument is given,
63 .B ip
64 opens RTNETLINK, listens on it and dumps state changes in the format
65 described in previous sections.
66
67 .P
68 If the
69 .BI label
70 option is set, a prefix is displayed before each message to
71 show the family of the message. For example:
72 .sp
73 .in +2
74 [NEIGH]10.16.0.112 dev eth0 lladdr 00:04:23:df:2f:d0 REACHABLE
75 [LINK]3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast state DOWN group default
76 link/ether 52:54:00:12:34:57 brd ff:ff:ff:ff:ff:ff
77 .in -2
78 .sp
79
80 .P
81 If the
82 .BI all-nsid
83 option is set, the program listens to all network namespaces that have a
84 nsid assigned into the network namespace were the program is running.
85 A prefix is displayed to show the network namespace where the message
86 originates. Example:
87 .sp
88 .in +2
89 [nsid 0]10.16.0.112 dev eth0 lladdr 00:04:23:df:2f:d0 REACHABLE
90 .in -2
91 .sp
92
93 .P
94 If the
95 .BI file
96 option is given, the program does not listen on RTNETLINK,
97 but opens the given file, and dumps its contents. The file
98 should contain RTNETLINK messages saved in binary format.
99 Such a file can be generated with the
100 .B rtmon
101 utility. This utility has a command line syntax similar to
102 .BR "ip monitor" .
103 Ideally,
104 .B rtmon
105 should be started before the first network configuration command
106 is issued. F.e. if you insert:
107 .sp
108 .in +8
109 rtmon file /var/log/rtmon.log
110 .in -8
111 .sp
112 in a startup script, you will be able to view the full history
113 later.
114
115 .P
116 Nevertheless, it is possible to start
117 .B rtmon
118 at any time.
119 It prepends the history with the state snapshot dumped at the moment
120 of starting.
121
122 .P
123 If the
124 .BI dev
125 option is given, the program prints only events related to this device.
126
127 .SH SEE ALSO
128 .br
129 .BR ip (8)
130
131 .SH AUTHOR
132 Original Manpage by Michail Litvak <[email protected]>
133 .br
134 Manpage revised by Nicolas Dichtel <[email protected]>