1IP-MONITOR(8)                        Linux                       IP-MONITOR(8)
2
3
4

NAME

6       ip-monitor, rtmon - state monitoring
7

SYNOPSIS

9       ip monitor [ all | OBJECT-LIST ] [ file FILENAME ] [ label ] [ all-nsid
10               ] [ dev DEVICE ]
11
12
13

OPTIONS

15       -t, -timestamp
16              Prints timestamp before the event message on the separated line
17              in format:
18                  Timestamp: <Day> <Month> <DD> <hh:mm:ss> <YYYY> <usecs> usec
19                  <EVENT>
20
21
22       -ts, -tshort
23              Prints short timestamp before the event message on the same line
24              in format:
25                  [<YYYY>-<MM>-<DD>T<hh:mm:ss>.<ms>] <EVENT>
26
27

DESCRIPTION

29       The ip utility can monitor the state of devices, addresses and routes
30       continuously. This option has a slightly different format.  Namely, the
31       monitor command is the first in the command line and then the object
32       list follows:
33
34       ip monitor [ all | OBJECT-LIST ] [ file FILENAME ] [ label ] [ all-nsid
35       ] [ dev DEVICE ]
36
37       OBJECT-LIST is the list of object types that we want to monitor.  It
38       may contain link, address, route, mroute, prefix, neigh, netconf, rule,
39       nsid and nexthop.  If no file argument is given, ip opens RTNETLINK,
40       listens on it and dumps state changes in the format described in previ‐
41       ous sections.
42
43
44       If the label option is set, a prefix is displayed before each message
45       to show the family of the message. For example:
46
47         [NEIGH]10.16.0.112 dev eth0 lladdr 00:04:23:df:2f:d0 REACHABLE
48         [LINK]3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast state
49         DOWN group default
50             link/ether 52:54:00:12:34:57 brd ff:ff:ff:ff:ff:ff
51
52
53
54       If the all-nsid option is set, the program listens to all network name‐
55       spaces that have a nsid assigned into the network namespace were the
56       program is running.  A prefix is displayed to show the network name‐
57       space where the message originates. Example:
58
59         [nsid 0]10.16.0.112 dev eth0 lladdr 00:04:23:df:2f:d0 REACHABLE
60
61
62
63       If the file option is given, the program does not listen on RTNETLINK,
64       but opens the given file, and dumps its contents. The file should con‐
65       tain RTNETLINK messages saved in binary format.  Such a file can be
66       generated with the rtmon utility. This utility has a command line syn‐
67       tax similar to ip monitor.  Ideally, rtmon should be started before the
68       first network configuration command is issued. F.e. if you insert:
69
70               rtmon file /var/log/rtmon.log
71
72       in a startup script, you will be able to view the full history later.
73
74
75       Nevertheless, it is possible to start rtmon at any time.  It prepends
76       the history with the state snapshot dumped at the moment of starting.
77
78
79       If the dev option is given, the program prints only events related to
80       this device.
81
82

SEE ALSO

84       ip(8)
85
86

AUTHOR

88       Original Manpage by Michail Litvak <mci@owl.openwall.com>
89       Manpage revised by Nicolas Dichtel <nicolas.dichtel@6wind.com>
90
91
92
93iproute2                          13 Dec 2012                    IP-MONITOR(8)
Impressum