symon.8 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  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 SYMON 8
  32. .Os
  33. .Sh NAME
  34. .Nm symon
  35. .Nd system monitor
  36. .Sh SYNOPSIS
  37. .Nm
  38. .Op Fl vd
  39. .Op Fl f Ar filename
  40. .Pp
  41. .Sh DESCRIPTION
  42. .Nm
  43. is a lightweight system monitor that measures cpu, memory, debug,
  44. process, interface and disk statistics every 5 seconds. This information
  45. is then spooled to
  46. .Xr symux 8
  47. for further processing.
  48. .Pp
  49. .Nm
  50. has been designed to inflict minimal performance and security impact on
  51. the system it monitors.
  52. .Xr symux 8
  53. has performance impact proportional to the amount of streams it needs to
  54. manage. Ideally
  55. .Xr symux
  56. should live on a different system and collect data from several
  57. .Nm
  58. instances in a LAN.
  59. .Lp
  60. .Nm
  61. priviledge needs depend on the probes used. The cpu, mem, mbuf, disk,
  62. debug and interface probes will work even when symon runs as
  63. .Ar "nobody" .
  64. For pf, read and write access to
  65. .Pa /dev/pf
  66. is needed, so
  67. .Nm
  68. will have to run as
  69. .Ar "root".
  70. .Lp
  71. The options:
  72. .Bl -tag -width Ds
  73. .It Fl v
  74. Show version information.
  75. .It Fl d
  76. Stop
  77. .Nm
  78. from becoming a daemon and show debug information on stdout.
  79. .It Fl f Ar filename
  80. Read configuration from
  81. .Ar filename
  82. instead of
  83. .Pa /etc/symon.conf .
  84. .El
  85. .Sh CONFIGURATION
  86. .Nm
  87. obtains configuration data from
  88. .Pa /etc/symon.conf .
  89. The configuration file contains monitor stanzas that define what
  90. resources should be monitored and to which
  91. .Xr symux 8
  92. the information should be streamed to.
  93. .Pp
  94. Multiple monitor statements to different muxes are allowed. Whitespace,
  95. newlines and text behind '#' are ignored. The format in BNF:
  96. .Pp
  97. .nf
  98. monitor-rule = "monitor" "{" resources "}" "stream" ["to"] host [ port ]
  99. resources = resource ["(" argument ")"] [ ","|" " resources ]
  100. resource = "cpu" | "mem" | "if" | "io" | "pf" | "debug" |
  101. "proc" | "mbuf" | "sensor"
  102. host = ip4addr | ip6addr | hostname
  103. port = [ "port" | "," ] portnumber
  104. argument = number | interfacename | diskname
  105. .fi
  106. .Sh EXAMPLE
  107. Here is an example
  108. .Ar symon.conf
  109. that monitors cpu, memory, pf, interfaces xl0/de0/lo0/wi0, disks
  110. wd[0-3]/cd[0-1], debug variables debug0 to debug19 and streams that
  111. information to localhost on port 2100.
  112. .Pp
  113. .nf
  114. monitor { cpu(0), mem, pf, if(xl0), if(de0),
  115. if(lo0), if(wi0), io(wd0), io(wd1),
  116. io(wd2), io(wd3), io(cd0), io(cd1),
  117. io(ccd0), debug, proc(httpd) } stream to 127.0.0.1 2100
  118. .fi
  119. .Sh SIGNALS
  120. .Bl -tag -width Ds
  121. .It SIGHUP
  122. Causes
  123. .Nm
  124. to read
  125. .Pa /etc/symon.conf .
  126. .Nm
  127. will keep the old configuration if errors occured during parsing of the
  128. configuration file.
  129. .Sh FILES
  130. .Bl -tag -width Ds
  131. .It Pa /var/run/symon.pid
  132. Contains the program id of the
  133. .Nm
  134. daemon.
  135. .It Pa /etc/symon.conf
  136. .Nm
  137. system wide configuration file.
  138. .El
  139. .Sh BUGS
  140. Every monitored resource mentioned
  141. .Pa /etc/symon.conf
  142. gets queried. Mentioning, for example, cpu(0) twice for different muxes will
  143. result in two distinct cpu(0) measurement actions.
  144. .Pp
  145. The proc module is too simple: memory shared between two instances of the same
  146. process is simply counted twice.
  147. .Pp
  148. .Nm
  149. does not check whether resources mentioned in
  150. .Pa /etc/symon.conf
  151. exist.
  152. .Sh AUTHOR
  153. Willem Dijkstra <wpd@xs4all.nl>. Daniel Hartmeier <daniel@benzedrine.cx>
  154. contributed the pf probe and helped to port to big-endian architectures.
  155. .Sh SEE ALSO
  156. .Xr symux 8