]> git.proxmox.com Git - mirror_iproute2.git/blame - man/man8/ip-monitor.8
ipmonitor: Mention "nexthop" object in help and man page
[mirror_iproute2.git] / man / man8 / ip-monitor.8
CommitLineData
cbe195dc 1.TH IP\-MONITOR 8 "13 Dec 2012" "iproute2" "Linux"
2a9721f1 2.SH "NAME"
b8d59e1e 3ip-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"
25Prints 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"
31Prints 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
35The
36.B ip
37utility can monitor the state of devices, addresses
a89d5329 38and routes continuously. This option has a slightly different format.
2a9721f1
SH
39Namely, the
40.B monitor
41command 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
55is the list of object types that we want to monitor.
56It may contain
cbe195dc 57.BR link ", " address ", " route ", " mroute ", " prefix ", "
9bd498bf 58.BR neigh ", " netconf ", " rule ", " nsid " and " nexthop "."
2a9721f1
SH
59If no
60.B file
61argument is given,
62.B ip
63opens RTNETLINK, listens on it and dumps state changes in the format
64described in previous sections.
65
2503247d
ND
66.P
67If the
68.BI label
69option is set, a prefix is displayed before each message to
70show 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
80If the
81.BI all-nsid
82option is set, the program listens to all network namespaces that have a
83nsid assigned into the network namespace were the program is running.
84A prefix is displayed to show the network namespace where the message
85originates. 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
93If the
94.BI file
95option is given, the program does not listen on RTNETLINK,
96but opens the given file, and dumps its contents. The file
97should contain RTNETLINK messages saved in binary format.
98Such a file can be generated with the
2a9721f1 99.B rtmon
a89d5329 100utility. This utility has a command line syntax similar to
2a9721f1
SH
101.BR "ip monitor" .
102Ideally,
103.B rtmon
104should be started before the first network configuration command
105is issued. F.e. if you insert:
106.sp
107.in +8
108rtmon file /var/log/rtmon.log
109.in -8
110.sp
111in a startup script, you will be able to view the full history
112later.
113
114.P
49572501 115Nevertheless, it is possible to start
2a9721f1
SH
116.B rtmon
117at any time.
118It prepends the history with the state snapshot dumped at the moment
119of starting.
120
093b7646 121.P
122If the
123.BI dev
124option 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
131Original Manpage by Michail Litvak <mci@owl.openwall.com>
2503247d
ND
132.br
133Manpage revised by Nicolas Dichtel <nicolas.dichtel@6wind.com>