123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221 |
- .\" -*- nroff -*-
- .\"
- .\" Copyright (c) 2001-2013 Willem Dijkstra
- .\" All rights reserved.
- .\"
- .\" Redistribution and use in source and binary forms, with or without
- .\" modification, are permitted provided that the following conditions
- .\" are met:
- .\"
- .\" - Redistributions of source code must retain the above copyright
- .\" notice, this list of conditions and the following disclaimer.
- .\" - Redistributions in binary form must reproduce the above
- .\" copyright notice, this list of conditions and the following
- .\" disclaimer in the documentation and/or other materials provided
- .\" with the distribution.
- .\"
- .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- .\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- .\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- .\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- .\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- .\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- .\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- .\" POSSIBILITY OF SUCH DAMAGE.
- .\"
- .Dd April 4, 2012
- .Dt SYMON 8
- .Os
- .Sh NAME
- .Nm symon
- .Nd system monitor
- .Sh SYNOPSIS
- .Nm
- .Op Fl dtuv
- .Op Fl f Ar filename
- .Pp
- .Sh DESCRIPTION
- .Nm
- is a lightweight system monitor that measures cpu, load, filesystem, interface, disk,
- memory, pf, pf queues, mbuf, proc and sensor statistics every 5 seconds. This
- information is then spooled to
- .Xr symux 8
- for further processing.
- .Pp
- .Nm
- has been designed to inflict minimal performance and security impact on
- the system it monitors.
- .Xr symux 8
- has performance impact proportional to the amount of streams it needs to
- manage. Ideally
- .Xr symux
- should live on a different system and collect data from several
- .Nm
- instances in a LAN.
- .Lp
- By default,
- .Nm
- will drop privileges and chroot(2) to home of the symon user. This behaviour
- is not strictly needed for the cpu, mem, mbuf, disk debug and interface probes
- as these will work even when
- .Nm
- is started as
- .Ar "nobody".
- .Lp
- The options:
- .Bl -tag -width Ds
- .It Fl d
- Stop
- .Nm
- from becoming a daemon and show debug information on stdout.
- .It Fl f Ar filename
- Read configuration from
- .Ar filename
- instead of
- .Pa /etc/symon.conf .
- .It Fl t
- Test configuration file and exit.
- .It Fl u
- By default
- .Nm
- will chroot(2) into
- .Pa _symon
- user home directory. The
- .Pa -u
- disables this behaviour.
- .It Fl v
- Show version information.
- .El
- .Sh CONFIGURATION
- .Nm
- obtains configuration data from
- .Pa /etc/symon.conf .
- The configuration file contains monitor stanzas that define what
- resources should be monitored and to which
- .Xr symux 8
- the information should be streamed to.
- .Pp
- Multiple monitor statements are allowed. Whitespace, newlines and text
- behind '#' are ignored. The format in BNF:
- .Pp
- .Bd -literal -offset indent -compact
- monitor-rule = "monitor" "{" resources "}" [every]
- "stream" ["from" host] ["to"] host [ port ]
- resources = resource [ version ] ["(" argument ")"]
- [ ","|" " resources ]
- resource = "cpu" | "cpuiow" | "debug" | "df" | "flukso" |
- "if" | "io" | "load" | "mbuf" | "mem" | "pf" |
- "pfq" | "proc" | "sensor" | "smart"
- version = number
- argument = number | name
- every = "every" time
- time = "second" | number "seconds"
- host = ip4addr | ip6addr | hostname
- port = [ "port" | "," ] portnumber
- .Ed
- .Pp
- Note that symux(8) data files default to receiving data every 5
- seconds. Adjusting the monitoring interval will also require adjusting the
- associated symux(8) datafile(s).
- .Pp
- The pf probe will return data that is collected for the
- .Pa loginterface
- set in /etc/pf.conf(5).
- .Pp
- The Linux io, df, and smart probes support device names via id, label, path and uuid.
- .Pp
- The FreeBSD io, df, and smart probes support gpt names, ufs names, ufs ids and paths.
- .Pp
- The OpenBSD io probe supports device uuids.
- .Pp
- .Sh EXAMPLE
- Here is an example OpenBSD
- .Ar symon.conf
- that monitors cpu, memory, pf, interfaces xl0/de0/lo0/wi0, disks
- wd[0-3]/cd[0-1], debug variables debug0 to debug19 and streams that
- information to localhost on port 2100.
- .Pp
- .Bd -literal -offset indent -compact
- monitor { cpu(0), mem, pf, if(xl0), if(de0),
- if(lo0), if(wi0), io(wd0), io(wd1),
- io(wd2), io(wd3), io(cd0), io(cd1),
- io(ccd0), df(sd0a), df(sd0d), df(sd0e),
- debug, proc(httpd) } stream to 127.0.0.1 2100
- .Ed
- .Sh EXAMPLE
- Here is an example Linux
- .Ar symon.conf
- that monitors cpu including iowait, memory, load, interface eth0, io and df for
- a set of disks every 5 seconds. Smart data is to be collected every 60 seconds.
- Disks in the smart and io statements are identified using ids, filesystem
- volumes in df using labels.
- .Bd -literal -offset indent -compact
- monitor { smart(ata-Hitachi_HDS722020ALA330_JK1130ABABABAB),
- smart(ata-Hitachi_HDS722020ALA330_JK1130ACACACAC),
- } every 60 seconds stream to 192.168.0.2 port 2100
- monitor { cpuiow(0), cpuiow(1), mem, if(eth0),
- io(ata-Hitachi_HDS722020ALA330_JK1130ABABABAB),
- io(ata-Hitachi_HDS722020ALA330_JK1130ACACACAC),
- df(data_1),
- df(data_2),
- df(data_3),
- df(home),
- df(var),
- load
- } stream to 192.168.0.2 port 2100
- .Ed
- .Sh SIGNALS
- .Bl -tag -width Ds
- .It SIGHUP
- Causes
- .Nm
- to read
- .Pa /etc/symon.conf .
- .Nm
- will keep the old configuration if errors occured during parsing of the
- configuration file. Note that the chroot(2) may cause resources to become
- unattainable, most notably the configuration file itself.
- .El
- .Sh FILES
- .Bl -tag -width Ds
- .It Pa /var/run/symon.pid
- Contains the program id of the
- .Nm
- daemon.
- .It Pa /etc/symon.conf
- .Nm
- system wide configuration file.
- .El
- .Sh BUGS
- Every monitored resource mentioned
- .Pa /etc/symon.conf
- gets queried. Mentioning, for example, cpu(0) twice for different muxes will
- result in two distinct cpu(0) measurement actions.
- .Pp
- The proc module is too simple: memory shared between two instances of the same
- process is simply counted twice.
- .Pp
- .Nm
- does not check whether all resources mentioned in
- .Pa /etc/symon.conf
- exist.
- .Pp
- .Sh AUTHOR
- Willem Dijkstra <wpd@xs4all.nl>. \%Daniel \%Hartmeier helped to port to big-endian
- architectures. \%Matthew \%Gream helped to port symon to other BSD platforms.
- .Pp
- Port contributors: \%Marc \%Balmer, \%Tito \%Dal \%Canton, \%Matthew
- \%Gream, \%Daniel \%Hartmeier, \%Lars \%Kotthoff, \%Constantine
- A. \%Murenin, J. \%Martin \%Petersen, \%Fredrik \%Soderblom, \%Harm
- \%Schotanus and \%Martin van der \%Werff.
- \%Valeriy \%Leshchinskiy maintains a windows symon client at
- https://github.com/ValHazelwood/SymonClient .
- .Sh SEE ALSO
- .Xr symux 8
|