The ip utility allows the continuous monitoring of the state of devices, addresses, and routes. This option has a different format in that the command monitor is first on the command line, followed by the object list.
ip monitor [ file FILE ] [ all OBJECT-LIST ]
OBJECT-LIST is the list of object types that you want to monitor. It may contain link, address , and route . If no file argument is given, ip opens RTNETLINK , listens to it, and dumps the state changes in the format, as described in the previous sections.
If a filename is given, ip does not listen to RTNETLINK but opens the file that is assumed to contain RTNETLINK messages saved in binary format and dumps them. Such a history file can be generated with the utility rtmon . This utility has a command-line syntax similar to ip monitor . Ideally, rtmon should be started before the first network configuration command is issued. It is possible to start rtmon at any time, as it prepends the history with the system state snapshot dumped at the moment of startup.
Top |