Blame man/man8/ip-monitor.8

Packit Service 3880ab
.TH IP\-MONITOR 8 "13 Dec 2012" "iproute2" "Linux"
Packit Service 3880ab
.SH "NAME"
Packit Service 3880ab
ip-monitor, rtmon \- state monitoring
Packit Service 3880ab
.SH "SYNOPSIS"
Packit Service 3880ab
.sp
Packit Service 3880ab
.ad l
Packit Service 3880ab
.in +8
Packit Service 3880ab
.ti -8
Packit Service 3880ab
.BR "ip monitor" " [ " all " |"
Packit Service 3880ab
.IR OBJECT-LIST " ] ["
Packit Service 3880ab
.BI file " FILENAME "
Packit Service 3880ab
] [
Packit Service 3880ab
.BI label
Packit Service 3880ab
] [
Packit Service 3880ab
.BI all-nsid
Packit Service 3880ab
] [
Packit Service 3880ab
.BI dev " DEVICE "
Packit Service 3880ab
]
Packit Service 3880ab
.sp
Packit Service 3880ab
Packit Service 3880ab
.SH OPTIONS
Packit Service 3880ab
Packit Service 3880ab
.TP
Packit Service 3880ab
.BR "\-t" , " \-timestamp"
Packit Service 3880ab
Prints timestamp before the event message on the separated line in format:
Packit Service 3880ab
    Timestamp: <Day> <Month> 
<hh:mm:ss> <YYYY> <usecs> usec
Packit Service 3880ab
    <EVENT>
Packit Service 3880ab
Packit Service 3880ab
.TP
Packit Service 3880ab
.BR "\-ts" , " \-tshort"
Packit Service 3880ab
Prints short timestamp before the event message on the same line in format:
Packit Service 3880ab
    [<YYYY>-<MM>-
T<hh:mm:ss>.<ms>] <EVENT>
Packit Service 3880ab
Packit Service 3880ab
.SH DESCRIPTION
Packit Service 3880ab
The
Packit Service 3880ab
.B ip
Packit Service 3880ab
utility can monitor the state of devices, addresses
Packit Service 3880ab
and routes continuously. This option has a slightly different format.
Packit Service 3880ab
Namely, the
Packit Service 3880ab
.B monitor
Packit Service 3880ab
command is the first in the command line and then the object list follows:
Packit Service 3880ab
Packit Service 3880ab
.BR "ip monitor" " [ " all " |"
Packit Service 3880ab
.IR OBJECT-LIST " ] ["
Packit Service 3880ab
.BI file " FILENAME "
Packit Service 3880ab
] [
Packit Service 3880ab
.BI label
Packit Service 3880ab
] [
Packit Service 3880ab
.BI all-nsid
Packit Service 3880ab
] [
Packit Service 3880ab
.BI dev " DEVICE "
Packit Service 3880ab
]
Packit Service 3880ab
Packit Service 3880ab
.I OBJECT-LIST
Packit Service 3880ab
is the list of object types that we want to monitor.
Packit Service 3880ab
It may contain
Packit Service 3880ab
.BR link ", " address ", " route ", " mroute ", " prefix ", "
Packit Service 3880ab
.BR neigh ", " netconf ", "  rule " and " nsid "."
Packit Service 3880ab
If no
Packit Service 3880ab
.B file
Packit Service 3880ab
argument is given,
Packit Service 3880ab
.B ip
Packit Service 3880ab
opens RTNETLINK, listens on it and dumps state changes in the format
Packit Service 3880ab
described in previous sections.
Packit Service 3880ab
Packit Service 3880ab
.P
Packit Service 3880ab
If the
Packit Service 3880ab
.BI label
Packit Service 3880ab
option is set, a prefix is displayed before each message to
Packit Service 3880ab
show the family of the message. For example:
Packit Service 3880ab
.sp
Packit Service 3880ab
.in +2
Packit Service 3880ab
[NEIGH]10.16.0.112 dev eth0 lladdr 00:04:23:df:2f:d0 REACHABLE
Packit Service 3880ab
[LINK]3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast state DOWN group default
Packit Service 3880ab
    link/ether 52:54:00:12:34:57 brd ff:ff:ff:ff:ff:ff
Packit Service 3880ab
.in -2
Packit Service 3880ab
.sp
Packit Service 3880ab
Packit Service 3880ab
.P
Packit Service 3880ab
If the
Packit Service 3880ab
.BI all-nsid
Packit Service 3880ab
option is set, the program listens to all network namespaces that have a
Packit Service 3880ab
nsid assigned into the network namespace were the program is running.
Packit Service 3880ab
A prefix is displayed to show the network namespace where the message
Packit Service 3880ab
originates. Example:
Packit Service 3880ab
.sp
Packit Service 3880ab
.in +2
Packit Service 3880ab
[nsid 0]10.16.0.112 dev eth0 lladdr 00:04:23:df:2f:d0 REACHABLE
Packit Service 3880ab
.in -2
Packit Service 3880ab
.sp
Packit Service 3880ab
Packit Service 3880ab
.P
Packit Service 3880ab
If the
Packit Service 3880ab
.BI file
Packit Service 3880ab
option is given, the program does not listen on RTNETLINK,
Packit Service 3880ab
but opens the given file, and dumps its contents. The file
Packit Service 3880ab
should contain RTNETLINK messages saved in binary format.
Packit Service 3880ab
Such a file can be generated with the
Packit Service 3880ab
.B rtmon
Packit Service 3880ab
utility. This utility has a command line syntax similar to
Packit Service 3880ab
.BR "ip monitor" .
Packit Service 3880ab
Ideally,
Packit Service 3880ab
.B rtmon
Packit Service 3880ab
should be started before the first network configuration command
Packit Service 3880ab
is issued. F.e. if you insert:
Packit Service 3880ab
.sp
Packit Service 3880ab
.in +8
Packit Service 3880ab
rtmon file /var/log/rtmon.log
Packit Service 3880ab
.in -8
Packit Service 3880ab
.sp
Packit Service 3880ab
in a startup script, you will be able to view the full history
Packit Service 3880ab
later.
Packit Service 3880ab
Packit Service 3880ab
.P
Packit Service 3880ab
Nevertheless, it is possible to start
Packit Service 3880ab
.B rtmon
Packit Service 3880ab
at any time.
Packit Service 3880ab
It prepends the history with the state snapshot dumped at the moment
Packit Service 3880ab
of starting.
Packit Service 3880ab
Packit Service 3880ab
.P
Packit Service 3880ab
If the
Packit Service 3880ab
.BI dev
Packit Service 3880ab
option is given, the program prints only events related to this device.
Packit Service 3880ab
Packit Service 3880ab
.SH SEE ALSO
Packit Service 3880ab
.br
Packit Service 3880ab
.BR ip (8)
Packit Service 3880ab
Packit Service 3880ab
.SH AUTHOR
Packit Service 3880ab
Original Manpage by Michail Litvak <mci@owl.openwall.com>
Packit Service 3880ab
.br
Packit Service 3880ab
Manpage revised by Nicolas Dichtel <nicolas.dichtel@6wind.com>