logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

ip-monitor.8 (3026B)


  1. .TH IP\-MONITOR 8 "13 Dec 2012" "iproute2" "Linux"
  2. .SH "NAME"
  3. ip-monitor, rtmon \- state monitoring
  4. .SH "SYNOPSIS"
  5. .sp
  6. .ad l
  7. .in +8
  8. .ti -8
  9. .BR "ip monitor" " [ " all " |"
  10. .IR OBJECT-LIST " ] ["
  11. .BI file " FILENAME "
  12. ] [
  13. .BI label
  14. ] [
  15. .BI all-nsid
  16. ] [
  17. .BI dev " DEVICE "
  18. ]
  19. .sp
  20. .SH OPTIONS
  21. .TP
  22. .BR "\-t" , " \-timestamp"
  23. Prints timestamp before the event message on the separated line in format:
  24. Timestamp: <Day> <Month> <DD> <hh:mm:ss> <YYYY> <usecs> usec
  25. <EVENT>
  26. .TP
  27. .BR "\-ts" , " \-tshort"
  28. Prints short timestamp before the event message on the same line in format:
  29. [<YYYY>-<MM>-<DD>T<hh:mm:ss>.<ms>] <EVENT>
  30. .SH DESCRIPTION
  31. The
  32. .B ip
  33. utility can monitor the state of devices, addresses
  34. and routes continuously. This option has a slightly different format.
  35. Namely, the
  36. .B monitor
  37. command is the first in the command line and then the object list follows:
  38. .BR "ip monitor" " [ " all " |"
  39. .IR OBJECT-LIST " ] ["
  40. .BI file " FILENAME "
  41. ] [
  42. .BI label
  43. ] [
  44. .BI all-nsid
  45. ] [
  46. .BI dev " DEVICE "
  47. ]
  48. .I OBJECT-LIST
  49. is the list of object types that we want to monitor.
  50. It may contain
  51. .BR link ", " address ", " route ", " mroute ", " prefix ", "
  52. .BR neigh ", " netconf ", " rule ", " stats ", " nsid " and " nexthop "."
  53. If no
  54. .B file
  55. argument is given,
  56. .B ip
  57. opens RTNETLINK, listens on it and dumps state changes in the format
  58. described in previous sections.
  59. .P
  60. If the
  61. .BI label
  62. option is set, a prefix is displayed before each message to
  63. show the family of the message. For example:
  64. .sp
  65. .in +2
  66. [NEIGH]10.16.0.112 dev eth0 lladdr 00:04:23:df:2f:d0 REACHABLE
  67. [LINK]3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast state DOWN group default
  68. link/ether 52:54:00:12:34:57 brd ff:ff:ff:ff:ff:ff
  69. .in -2
  70. .sp
  71. .P
  72. If the
  73. .BI all-nsid
  74. option is set, the program listens to all network namespaces that have a
  75. nsid assigned into the network namespace were the program is running.
  76. A prefix is displayed to show the network namespace where the message
  77. originates. Example:
  78. .sp
  79. .in +2
  80. [nsid 0]10.16.0.112 dev eth0 lladdr 00:04:23:df:2f:d0 REACHABLE
  81. .in -2
  82. .sp
  83. .P
  84. If the
  85. .BI file
  86. option is given, the program does not listen on RTNETLINK,
  87. but opens the given file, and dumps its contents. The file
  88. should contain RTNETLINK messages saved in binary format.
  89. Such a file can be generated with the
  90. .B rtmon
  91. utility. This utility has a command line syntax similar to
  92. .BR "ip monitor" .
  93. Ideally,
  94. .B rtmon
  95. should be started before the first network configuration command
  96. is issued. F.e. if you insert:
  97. .sp
  98. .in +8
  99. rtmon file /var/log/rtmon.log
  100. .in -8
  101. .sp
  102. in a startup script, you will be able to view the full history
  103. later.
  104. .P
  105. Nevertheless, it is possible to start
  106. .B rtmon
  107. at any time.
  108. It prepends the history with the state snapshot dumped at the moment
  109. of starting.
  110. .P
  111. If the
  112. .BI dev
  113. option is given, the program prints only events related to this device.
  114. .SH SEE ALSO
  115. .br
  116. .BR ip (8)
  117. .SH AUTHOR
  118. Original Manpage by Michail Litvak <mci@owl.openwall.com>
  119. .br
  120. Manpage revised by Nicolas Dichtel <nicolas.dichtel@6wind.com>