]>
Commit | Line | Data |
---|---|---|
cbe195dc | 1 | .TH IP\-MONITOR 8 "13 Dec 2012" "iproute2" "Linux" |
2a9721f1 | 2 | .SH "NAME" |
b8d59e1e | 3 | ip-monitor, rtmon \- state monitoring |
2a9721f1 SH |
4 | .SH "SYNOPSIS" |
5 | .sp | |
6 | .ad l | |
7 | .in +8 | |
8 | .ti -8 | |
e895ae0b | 9 | .BR "ip monitor" " [ " all " |" |
49572501 KR |
10 | .IR OBJECT-LIST " ] [" |
11 | .BI file " FILENAME " | |
093b7646 | 12 | ] [ |
2503247d ND |
13 | .BI label |
14 | ] [ | |
449b824a ND |
15 | .BI all-nsid |
16 | ] [ | |
093b7646 | 17 | .BI dev " DEVICE " |
49572501 | 18 | ] |
2a9721f1 SH |
19 | .sp |
20 | ||
79aa79d0 VK |
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 | ||
2a9721f1 SH |
34 | .SH DESCRIPTION |
35 | The | |
36 | .B ip | |
37 | utility can monitor the state of devices, addresses | |
a89d5329 | 38 | and routes continuously. This option has a slightly different format. |
2a9721f1 SH |
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 " |" | |
49572501 KR |
44 | .IR OBJECT-LIST " ] [" |
45 | .BI file " FILENAME " | |
093b7646 | 46 | ] [ |
2503247d ND |
47 | .BI label |
48 | ] [ | |
449b824a ND |
49 | .BI all-nsid |
50 | ] [ | |
093b7646 | 51 | .BI dev " DEVICE " |
49572501 | 52 | ] |
2a9721f1 SH |
53 | |
54 | .I OBJECT-LIST | |
55 | is the list of object types that we want to monitor. | |
56 | It may contain | |
cbe195dc | 57 | .BR link ", " address ", " route ", " mroute ", " prefix ", " |
d652ccbf | 58 | .BR neigh ", " netconf ", " rule " and " nsid "." |
2a9721f1 SH |
59 | If no |
60 | .B file | |
61 | argument is given, | |
62 | .B ip | |
63 | opens RTNETLINK, listens on it and dumps state changes in the format | |
64 | described in previous sections. | |
65 | ||
2503247d ND |
66 | .P |
67 | If the | |
68 | .BI label | |
69 | option is set, a prefix is displayed before each message to | |
70 | show the family of the message. For example: | |
71 | .sp | |
72 | .in +2 | |
73 | [NEIGH]10.16.0.112 dev eth0 lladdr 00:04:23:df:2f:d0 REACHABLE | |
74 | [LINK]3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast state DOWN group default | |
75 | link/ether 52:54:00:12:34:57 brd ff:ff:ff:ff:ff:ff | |
76 | .in -2 | |
77 | .sp | |
78 | ||
449b824a ND |
79 | .P |
80 | If the | |
81 | .BI all-nsid | |
82 | option is set, the program listens to all network namespaces that have a | |
83 | nsid assigned into the network namespace were the program is running. | |
84 | A prefix is displayed to show the network namespace where the message | |
85 | originates. Example: | |
86 | .sp | |
87 | .in +2 | |
88 | [nsid 0]10.16.0.112 dev eth0 lladdr 00:04:23:df:2f:d0 REACHABLE | |
89 | .in -2 | |
90 | .sp | |
91 | ||
2a9721f1 | 92 | .P |
49572501 KR |
93 | If the |
94 | .BI file | |
95 | option is given, the program does not listen on RTNETLINK, | |
96 | but opens the given file, and dumps its contents. The file | |
97 | should contain RTNETLINK messages saved in binary format. | |
98 | Such a file can be generated with the | |
2a9721f1 | 99 | .B rtmon |
a89d5329 | 100 | utility. This utility has a command line syntax similar to |
2a9721f1 SH |
101 | .BR "ip monitor" . |
102 | Ideally, | |
103 | .B rtmon | |
104 | should be started before the first network configuration command | |
105 | is issued. F.e. if you insert: | |
106 | .sp | |
107 | .in +8 | |
108 | rtmon file /var/log/rtmon.log | |
109 | .in -8 | |
110 | .sp | |
111 | in a startup script, you will be able to view the full history | |
112 | later. | |
113 | ||
114 | .P | |
49572501 | 115 | Nevertheless, it is possible to start |
2a9721f1 SH |
116 | .B rtmon |
117 | at any time. | |
118 | It prepends the history with the state snapshot dumped at the moment | |
119 | of starting. | |
120 | ||
093b7646 | 121 | .P |
122 | If the | |
123 | .BI dev | |
124 | option is given, the program prints only events related to this device. | |
125 | ||
2a9721f1 SH |
126 | .SH SEE ALSO |
127 | .br | |
128 | .BR ip (8) | |
129 | ||
130 | .SH AUTHOR | |
131 | Original Manpage by Michail Litvak <mci@owl.openwall.com> | |
2503247d ND |
132 | .br |
133 | Manpage revised by Nicolas Dichtel <nicolas.dichtel@6wind.com> |