]> git.proxmox.com Git - mirror_iproute2.git/blob - man/man8/ip-monitor.8
ipmonitor: Mention "nexthop" object in help and man page
[mirror_iproute2.git] / man / man8 / ip-monitor.8
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 ", " prefix ", "
58 .BR neigh ", " netconf ", " rule ", " nsid " and " nexthop "."
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
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
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
92 .P
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
99 .B rtmon
100 utility. This utility has a command line syntax similar to
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
115 Nevertheless, it is possible to start
116 .B rtmon
117 at any time.
118 It prepends the history with the state snapshot dumped at the moment
119 of starting.
120
121 .P
122 If the
123 .BI dev
124 option is given, the program prints only events related to this device.
125
126 .SH SEE ALSO
127 .br
128 .BR ip (8)
129
130 .SH AUTHOR
131 Original Manpage by Michail Litvak <mci@owl.openwall.com>
132 .br
133 Manpage revised by Nicolas Dichtel <nicolas.dichtel@6wind.com>