man-pages/man8/ip-monitor.8.html
2021-03-31 01:06:50 +01:00

212 lines
4.4 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of IP-MONITOR</TITLE>
</HEAD><BODY>
<H1>IP-MONITOR</H1>
Section: Linux (8)<BR>Updated: 13 Dec 2012<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
ip-monitor, rtmon - state monitoring
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<P>
<BR>
<B>ip monitor</B> [ <B>all</B> |
<I>OBJECT-LIST</I> ] [
<B>file</B><I> FILENAME </I>
] [
<B>label</B>
] [
<B>all-nsid</B>
] [
<B>dev</B><I> DEVICE </I>
]
<P>
<P>
<A NAME="lbAD">&nbsp;</A>
<H2>OPTIONS</H2>
<P>
<DL COMPACT>
<DT id="1"><B>-t</B>,<B> -timestamp</B>
<DD>
Prints timestamp before the event message on the separated line in format:
<BR>&nbsp;&nbsp;&nbsp;&nbsp;Timestamp:&nbsp;&lt;Day&gt;&nbsp;&lt;Month&gt;&nbsp;&lt;DD&gt;&nbsp;&lt;hh:mm:ss&gt;&nbsp;&lt;YYYY&gt;&nbsp;&lt;usecs&gt;&nbsp;usec
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&lt;EVENT&gt;
<P>
<DT id="2"><B>-ts</B>,<B> -tshort</B>
<DD>
Prints short timestamp before the event message on the same line in format:
<BR>&nbsp;&nbsp;&nbsp;&nbsp;[&lt;YYYY&gt;-&lt;MM&gt;-&lt;DD&gt;T&lt;hh:mm:ss&gt;.&lt;ms&gt;]&nbsp;&lt;EVENT&gt;
<P>
</DL>
<A NAME="lbAE">&nbsp;</A>
<H2>DESCRIPTION</H2>
The
<B>ip</B>
utility can monitor the state of devices, addresses
and routes continuously. This option has a slightly different format.
Namely, the
<B>monitor</B>
command is the first in the command line and then the object list follows:
<P>
<B>ip monitor</B> [ <B>all</B> |
<I>OBJECT-LIST</I> ] [
<B>file</B><I> FILENAME </I>
] [
<B>label</B>
] [
<B>all-nsid</B>
] [
<B>dev</B><I> DEVICE </I>
]
<P>
<I>OBJECT-LIST</I>
is the list of object types that we want to monitor.
It may contain
<B>link</B>, <B>address</B>, <B>route</B>, <B>mroute</B>, <B>prefix</B>,
<B>neigh</B>, <B>netconf</B>, <B>rule</B> and <B>nsid</B>.
If no
<B>file</B>
argument is given,
<B>ip</B>
opens RTNETLINK, listens on it and dumps state changes in the format
described in previous sections.
<P>
<P>
If the
<B>label</B>
option is set, a prefix is displayed before each message to
show the family of the message. For example:
<P>
[NEIGH]10.16.0.112 dev eth0 lladdr 00:04:23:df:2f:d0 REACHABLE
[LINK]3: eth1: &lt;BROADCAST,MULTICAST&gt; mtu 1500 qdisc pfifo_fast state DOWN group default
<BR>&nbsp;&nbsp;&nbsp;&nbsp;link/ether&nbsp;52:54:00:12:34:57&nbsp;brd&nbsp;ff:ff:ff:ff:ff:ff
<P>
<P>
<P>
If the
<B>all-nsid</B>
option is set, the program listens to all network namespaces that have a
nsid assigned into the network namespace were the program is running.
A prefix is displayed to show the network namespace where the message
originates. Example:
<P>
[nsid 0]10.16.0.112 dev eth0 lladdr 00:04:23:df:2f:d0 REACHABLE
<P>
<P>
<P>
If the
<B>file</B>
option is given, the program does not listen on RTNETLINK,
but opens the given file, and dumps its contents. The file
should contain RTNETLINK messages saved in binary format.
Such a file can be generated with the
<B>rtmon</B>
utility. This utility has a command line syntax similar to
<B>ip monitor</B>.
Ideally,
<B>rtmon</B>
should be started before the first network configuration command
is issued. F.e. if you insert:
<P>
rtmon file /var/log/rtmon.log
<P>
in a startup script, you will be able to view the full history
later.
<P>
<P>
Nevertheless, it is possible to start
<B>rtmon</B>
at any time.
It prepends the history with the state snapshot dumped at the moment
of starting.
<P>
<P>
If the
<B>dev</B>
option is given, the program prints only events related to this device.
<P>
<A NAME="lbAF">&nbsp;</A>
<H2>SEE ALSO</H2>
<BR>
<B><A HREF="/cgi-bin/man/man2html?8+ip">ip</A></B>(8)
<P>
<A NAME="lbAG">&nbsp;</A>
<H2>AUTHOR</H2>
Original Manpage by Michail Litvak &lt;<A HREF="mailto:mci@owl.openwall.com">mci@owl.openwall.com</A>&gt;
<BR>
Manpage revised by Nicolas Dichtel &lt;<A HREF="mailto:nicolas.dichtel@6wind.com">nicolas.dichtel@6wind.com</A>&gt;
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="3"><A HREF="#lbAB">NAME</A><DD>
<DT id="4"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="5"><A HREF="#lbAD">OPTIONS</A><DD>
<DT id="6"><A HREF="#lbAE">DESCRIPTION</A><DD>
<DT id="7"><A HREF="#lbAF">SEE ALSO</A><DD>
<DT id="8"><A HREF="#lbAG">AUTHOR</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:06:12 GMT, March 31, 2021
</BODY>
</HTML>