]>
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 | |
49572501 KR |
9 | .BR "ip " " [ " |
10 | .IR ip-OPTIONS " ]" | |
11 | .BR "monitor" " [ " all " |" | |
12 | .IR OBJECT-LIST " ] [" | |
13 | .BI file " FILENAME " | |
093b7646 | 14 | ] [ |
15 | .BI dev " DEVICE " | |
49572501 | 16 | ] |
2a9721f1 SH |
17 | .sp |
18 | ||
79aa79d0 VK |
19 | .SH OPTIONS |
20 | ||
21 | .TP | |
22 | .BR "\-t" , " \-timestamp" | |
23 | Prints timestamp before the event message on the separated line in format: | |
24 | Timestamp: <Day> <Month> <DD> <hh:mm:ss> <YYYY> <usecs> usec | |
25 | <EVENT> | |
26 | ||
27 | .TP | |
28 | .BR "\-ts" , " \-tshort" | |
29 | Prints short timestamp before the event message on the same line in format: | |
30 | [<YYYY>-<MM>-<DD>T<hh:mm:ss>.<ms>] <EVENT> | |
31 | ||
2a9721f1 SH |
32 | .SH DESCRIPTION |
33 | The | |
34 | .B ip | |
35 | utility can monitor the state of devices, addresses | |
a89d5329 | 36 | and routes continuously. This option has a slightly different format. |
2a9721f1 SH |
37 | Namely, the |
38 | .B monitor | |
39 | command is the first in the command line and then the object list follows: | |
40 | ||
41 | .BR "ip monitor" " [ " all " |" | |
49572501 KR |
42 | .IR OBJECT-LIST " ] [" |
43 | .BI file " FILENAME " | |
093b7646 | 44 | ] [ |
45 | .BI dev " DEVICE " | |
49572501 | 46 | ] |
2a9721f1 SH |
47 | |
48 | .I OBJECT-LIST | |
49 | is the list of object types that we want to monitor. | |
50 | It may contain | |
cbe195dc | 51 | .BR link ", " address ", " route ", " mroute ", " prefix ", " |
d652ccbf | 52 | .BR neigh ", " netconf ", " rule " and " nsid "." |
2a9721f1 SH |
53 | If no |
54 | .B file | |
55 | argument is given, | |
56 | .B ip | |
57 | opens RTNETLINK, listens on it and dumps state changes in the format | |
58 | described in previous sections. | |
59 | ||
60 | .P | |
49572501 KR |
61 | If the |
62 | .BI file | |
63 | option is given, the program does not listen on RTNETLINK, | |
64 | but opens the given file, and dumps its contents. The file | |
65 | should contain RTNETLINK messages saved in binary format. | |
66 | Such a file can be generated with the | |
2a9721f1 | 67 | .B rtmon |
a89d5329 | 68 | utility. This utility has a command line syntax similar to |
2a9721f1 SH |
69 | .BR "ip monitor" . |
70 | Ideally, | |
71 | .B rtmon | |
72 | should be started before the first network configuration command | |
73 | is issued. F.e. if you insert: | |
74 | .sp | |
75 | .in +8 | |
76 | rtmon file /var/log/rtmon.log | |
77 | .in -8 | |
78 | .sp | |
79 | in a startup script, you will be able to view the full history | |
80 | later. | |
81 | ||
82 | .P | |
49572501 | 83 | Nevertheless, it is possible to start |
2a9721f1 SH |
84 | .B rtmon |
85 | at any time. | |
86 | It prepends the history with the state snapshot dumped at the moment | |
87 | of starting. | |
88 | ||
093b7646 | 89 | .P |
90 | If the | |
91 | .BI dev | |
92 | option is given, the program prints only events related to this device. | |
93 | ||
2a9721f1 SH |
94 | .SH SEE ALSO |
95 | .br | |
96 | .BR ip (8) | |
97 | ||
98 | .SH AUTHOR | |
99 | Original Manpage by Michail Litvak <mci@owl.openwall.com> |