Home : Computers : Linux : Man Pages : ip-monitor

ip-monitor


SYNOPSIS

       ip monitor [ all | OBJECT-LIST ] [ file FILENAME ] [ all-nsid ]


OPTIONS

       -t, -timestamp
              Prints timestamp before the event message on the separated line
              in format:
                  Timestamp: <Day> <Month> <DD> <hh:mm:ss> <YYYY> <usecs> usec
                  <EVENT>

       -ts, -tshort
              Prints short timestamp before the event message on the same line
              in format:
                  [<YYYY>-<MM>-<DD>T<hh:mm:ss>.<ms>] <EVENT>


DESCRIPTION

       The ip utility can monitor the state of devices, addresses and routes
       continuously. This option has a slightly different format.  Namely, the
       monitor command is the first in the command line and then the object
       list follows:

       ip monitor [ all | OBJECT-LIST ] [ file FILENAME ] [ all-nsid ]

       OBJECT-LIST is the list of object types that we want to monitor.  It
       may contain link, address, route, mroute, prefix, neigh, netconf and
       nsid.  If no file argument is given, ip opens RTNETLINK, listens on it
       and dumps state changes in the format described in previous sections.

       If the all-nsid 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:

         [nsid 0]10.16.0.112 dev eth0 lladdr 00:04:23:df:2f:d0 REACHABLE

       If the file option is given, the program does not listen on RTNETLINK,
       but opens the given file, and dumps its contents. The file should con-
       tain RTNETLINK messages saved in binary format.  Such a file can be
       generated with the rtmon utility. This utility has a command line syn-
       tax similar to ip monitor.  Ideally, rtmon should be started before the
       first network configuration command is issued. F.e. if you insert:

               rtmon file /var/log/rtmon.log

       in a startup script, you will be able to view the full history later.


iproute2 13 Dec 2012 IP-MONITOR(8)



Subscribe to us on YouTube