mon.8 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. .\" -*- nroff -*-
  2. .\"
  3. .\" Copyright (c) 2001-2002 Willem Dijkstra
  4. .\" All rights reserved.
  5. .\"
  6. .\" Redistribution and use in source and binary forms, with or without
  7. .\" modification, are permitted provided that the following conditions
  8. .\" are met:
  9. .\"
  10. .\" - Redistributions of source code must retain the above copyright
  11. .\" notice, this list of conditions and the following disclaimer.
  12. .\" - Redistributions in binary form must reproduce the above
  13. .\" copyright notice, this list of conditions and the following
  14. .\" disclaimer in the documentation and/or other materials provided
  15. .\" with the distribution.
  16. .\"
  17. .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  18. .\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  19. .\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  20. .\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  21. .\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  22. .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  23. .\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  24. .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  25. .\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  26. .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
  27. .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  28. .\" POSSIBILITY OF SUCH DAMAGE.
  29. .\"
  30. .Dd April 5, 2002
  31. .Dt MON 8
  32. .Os
  33. .Sh NAME
  34. .Nm mon
  35. .Nd system monitor
  36. .Sh SYNOPSIS
  37. .Nm
  38. .Op Fl vd
  39. .Pp
  40. .Sh DESCRIPTION
  41. .Nm
  42. is a lightweight system monitor that measures cpu, memory, interface and disk
  43. statistics every 5 seconds. This information is then spooled to
  44. .Xr monmux 8
  45. for further processing.
  46. .Pp
  47. .Nm
  48. has been designed to inflict minimal performance and security impact on the system it monitors.
  49. .Xr monmux 8
  50. has performance impact proportional to the amount of streams it needs to manage. Ideally
  51. .Xr monmux
  52. should live on a different system and collect data from several
  53. .Nm
  54. instances in a LAN.
  55. .Lp
  56. .Nm
  57. needs
  58. .Ar kmem
  59. priviledges in order to obtain it's data.
  60. .Lp
  61. The options:
  62. .Bl -tag -width Ds
  63. .It Fl a
  64. Show version information.
  65. .It Fl d
  66. Stop
  67. .Nm
  68. from becoming a daemon and show debug information on stdout.
  69. .El
  70. .Sh CONFIGURATION
  71. .Nm
  72. obtains configuration data from
  73. .Pa /etc/mon.conf .
  74. The configuration file contains monitor stanzas that define what resources should be monitored and to which
  75. .Xr monmux 8
  76. the information should be streamed to.
  77. .Pp
  78. Multiple monitor statements to different muxes are allowed. Whitespace, newlines and text behind '#' are ignored. The format in BNF:
  79. .Pp
  80. .nf
  81. monitor-rule = "monitor" "{" resources "}" "stream" ["to"] host [ port ]
  82. resources = resource ["(" argument ")"] [ ","|" " resources ]
  83. resource = "cpu" | "mem" | "if" | "io"
  84. host = ip4addr | hostname
  85. port = [ "port" | ":" | "," ] portnumber
  86. argument = number | interfacename | diskname
  87. .fi
  88. .Sh EXAMPLE
  89. Here is an example
  90. .Ar mon.conf
  91. that monitors cpu, memory, interfaces xl0/de0/lo0/wi0, disks wd[0-3]/cd[0-1]
  92. and streams that information to localhost on port 2100.
  93. .Pp
  94. .nf
  95. monitor { cpu(0), mem, if(xl0), if(de0),
  96. if(lo0), if(wi0), io(wd0), io(wd1),
  97. io(wd2), io(wd3), io(cd0), io(cd1),
  98. io(ccd0)} stream to 127.0.0.1 2100
  99. .fi
  100. .Sh SIGNALS
  101. .Bl -tag -width Ds
  102. .It SIGHUP
  103. Causes
  104. .Nm
  105. to read
  106. .Pa /etc/mon.conf .
  107. .Nm
  108. will keep the old configuration if errors occured during parsing of the configuration file.
  109. .Sh FILES
  110. .Bl -tag -width Ds
  111. .It Pa /var/run/mon.pid
  112. Contains the program id of the
  113. .Nm
  114. daemon.
  115. .It Pa /etc/mon.conf
  116. .Nm
  117. system wide configuration file.
  118. .El
  119. .Sh BUGS
  120. Every monitored resource mentioned
  121. .Pa /etc/mon.conf
  122. gets queried. Mentioning, for example, cpu(0) twice for different muxes will result in two distinct cpu(0) measurement actions.
  123. .Pp
  124. .Nm
  125. does not check whether resources mentioned in
  126. .Pa /etc/mon.conf
  127. exist.
  128. .Sh AUTHOR
  129. Willem Dijkstra <wpd@xs4all.nl>
  130. .Sh SEE ALSO
  131. .Xr monmux 8