]> git.proxmox.com Git - mirror_iproute2.git/blame - man/man8/ip-monitor.8
iplink_bond: add support for ad_actor and port_key options
[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
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"
23Prints 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"
29Prints 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
33The
34.B ip
35utility can monitor the state of devices, addresses
a89d5329 36and routes continuously. This option has a slightly different format.
2a9721f1
SH
37Namely, the
38.B monitor
39command 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
49is the list of object types that we want to monitor.
50It may contain
cbe195dc 51.BR link ", " address ", " route ", " mroute ", " prefix ", "
d652ccbf 52.BR neigh ", " netconf ", " rule " and " nsid "."
2a9721f1
SH
53If no
54.B file
55argument is given,
56.B ip
57opens RTNETLINK, listens on it and dumps state changes in the format
58described in previous sections.
59
60.P
49572501
KR
61If the
62.BI file
63option is given, the program does not listen on RTNETLINK,
64but opens the given file, and dumps its contents. The file
65should contain RTNETLINK messages saved in binary format.
66Such a file can be generated with the
2a9721f1 67.B rtmon
a89d5329 68utility. This utility has a command line syntax similar to
2a9721f1
SH
69.BR "ip monitor" .
70Ideally,
71.B rtmon
72should be started before the first network configuration command
73is issued. F.e. if you insert:
74.sp
75.in +8
76rtmon file /var/log/rtmon.log
77.in -8
78.sp
79in a startup script, you will be able to view the full history
80later.
81
82.P
49572501 83Nevertheless, it is possible to start
2a9721f1
SH
84.B rtmon
85at any time.
86It prepends the history with the state snapshot dumped at the moment
87of starting.
88
093b7646 89.P
90If the
91.BI dev
92option 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
99Original Manpage by Michail Litvak <mci@owl.openwall.com>