IP-MONITOR(8)
โจ IP-MONITOR(8) โจ ๐ NAME
okay so the manual name here is ip-monitor, also known as rtmon, and it's all about ๐ฆ state monitoring ๐ฆ. bestie, this is the tool that watches devices, addresses and routes changing in real time ๐
๐ SYNOPSIS ๐
ip monitor [ all | OBJECT-LIST ] [ file FILENAME ] [ label ] [ all-nsid
] [ dev DEVICE ]
๐ OPTIONS ๐
-t,-timestampโ okay this one is giving timestamps ๐ฐ๏ธ It prints a timestamp before the event message, on its own separate line, in this format:
Timestamp: <Day> <Month> <DD> <hh:mm:ss> <YYYY> <usecs> usec
<EVENT>
-ts,-tshortโ the short-and-sweet version โจ This prints a short timestamp on the same line as the event message, like this:
[<YYYY>-<MM>-<DD>T<hh:mm:ss>.<ms>] <EVENT>
๐ธ DESCRIPTION ๐ธ
okay so the ip utility can monitor the state of devices, addresses and routes continuously ๐ซถ this option is lowkey a different vibe from the rest of the commands. the monitor command has to come first on the command line, and then the object list follows:
ip monitor [ all | OBJECT-LIST ] [ file FILENAME ] [ label ] [ all-nsid
] [ dev DEVICE ]
OBJECT-LIST is the list of object types you want to keep an eye on ๐ it can contain link, address, route, mroute, maddress, acaddress, prefix, neigh, netconf, rule, stats, nsid and nexthop. if you don't give a file argument, ip opens RTNETLINK, listens to it, and dumps state changes in the format we talked about earlier ๐
if the label option is set, a prefix shows up before each message to tell you the family of the message ๐ท๏ธ for example:
[NEIGH]10.16.0.112 dev eth0 lladdr 00:04:23:df:2f:d0 REACHABLE
[LINK]3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast state
DOWN group default
link/ether 52:54:00:12:34:57 brd ff:ff:ff:ff:ff:ff
if the all-nsid option is set, the program listens to every network namespace that has an nsid assigned into the network namespace where the program is running ๐ a prefix shows which network namespace the message came from. 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 ๐
โโ๏ธ instead it opens the given file and dumps its contents. the file should contain RTNETLINK messages saved in binary format ๐ง you can make one with the rtmon utility, which has a command line syntax 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'll be able to view the full history later ๐
that said, it's totally possible to start rtmon at any time ๐ it prepends the history with the state snapshot dumped at the moment it starts.
if the dev option is given, the program only prints events related to that device ๐ฏ
๐ฆ SEE ALSO ๐ฆ
๐ AUTHOR ๐
Original Manpage by Michail Litvak <mci@owl.openwall.com> Manpage revised by Nicolas Dichtel <nicolas.dichtel@6wind.com>
bestie that's the whole tea โ๐ iproute2, last updated 13 Dec 2012, IP-MONITOR(8) forever and ever ๐ โจ
๐ฆ where this page comes from
- alpine 3.22: iproute2-doc 6.15.0-r0 ยท GPL-2.0-or-later
- alpine 3.23: iproute2-doc 6.17.0-r0 ยท GPL-2.0-or-later
- alpine 3.24: iproute2-doc 7.0.0-r0 ยท GPL-2.0-or-later
- arch rolling: iproute2 7.2.0-1
- arch rolling: iproute2 7.3.0-1 ยท GPL-2.0-or-later
- centos-stream 10: iproute 7.0.0-2.el10 ยท GPL-2.0-or-later AND NIST-PD
- centos-stream 9: iproute 6.17.0-3.el9 ยท GPL-2.0-or-later AND NIST-PD
- debian trixie: iproute2 6.15.0-1 ยท GPL-2.0-only
- fedora 43: iproute 6.14.0-2.fc43 ยท GPL-2.0-or-later AND NIST-PD
- fedora 44: iproute 6.17.0-2.fc44 ยท GPL-2.0-or-later AND NIST-PD
- nixos 26.05: iproute2 7.0.0
- nixpkgs unstable: iproute2 7.2.0
- ubuntu questing: iproute2 6.16.0-1ubuntu2
- ubuntu questing: iproute2 6.16.0-1ubuntu2.1 ยท GPL-2.0-only
- ubuntu questing: iproute2 6.16.0-1ubuntu2.2
- ubuntu resolute: iproute2 6.19.0-1ubuntu1 ยท GPL-2.0-only
- ubuntu resolute: iproute2 6.19.0-1ubuntu1.1 ยท GPL-2.0-only
- ubuntu stonking: iproute2 7.2.0-1ubuntu1 ยท GPL-2.0-only
- ๐ girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms