Usage:
unix-status-server version 1.26
usage: ../unix-status-server [options]
where options are:
-d nnn enable debugging output at level 'nnn'
-h show this help
-r include remotely-mounted file-systems
-t tst do tests 'tst, a comma-separated list of:
vmstat, df, uptime, netstat, uname, ps, proc,
ftpcount, netstat-tcpstates, fileage and qmailq
Description:
The unix-status-server allows the unix-status-collector
to get data from a remote machine running some flavour of unix. It
runs several different programs on request (uname, vmstat, df, uptime,
netstat, ps, ftpcount, qmail-qstat, and qmail-qread).
Protocol:
The unix-status-collector connects to the unix-status-server
and sends
a series of commands, ending with 'GO'. Then the server sends back the data
it obtained by running the requested programs and closes the connection.
The commands are usually the names of programs to run (in UPPERCASE) and
the ones known currently are:
-
UNAME runs uname and returns:
machine, os_name, os_release, os_version
-
VMSTAT runs vmstat and returns variables relating to memory usage
depending on the operating system
-
DF runs df and for each file-system returns:
dfsize:FSNAME, dfused:FSNAME, dfpercent:FSNAME
inodessize:FSNAME, inodesused:FSNAME, inodespercent:FSNAME
-
UPTIME runs uptime and returns:
uptime (a timestamp in seconds), users, load1, load5, load15
-
NETSTAT runs netstat and, for each interface, returns:
interface_packets_in:IFNAME, interface_errors_in:IFNAME,
interface_packets_out:IFNAME, interface_errors_out:IFNAME,
interface_collisions:IFNAME
-
PS runs ps and returns various numbers pulled out of the output
(see below)
-
FTPCOUNT runs ftpcount (from wuftpd) to find out which groups the
ftp-server's users fall into
-
QMAILQ runs qmail-qstat and qmail-qread and returns:
qmail_qsize, qmail_qbacklog, qmail_qlocal, qmail_qsite,
qmail_qremote
-
FILEAGE returns timestamps for the ages of specified files
(see below)
-
TIME return the difference in time-stamps between the host running the unix-status-server
and the querying host. It must be given the querying host's timestamp following
the
TIME
directive. The two variables returned are time and timediff.
If you want to see what it returns, you can simply invoke the unix-status-server
as a local script and type commands at it.
PS Usage:
With extended commands, of which PS
is the first, you also specify
what you want to look for with extra commands, in addition to the PS
command. A command looks like:
varname PS func pattern
The varname
is used to create a variable-name for the returned data.
The name will be ps:varname
. Func
is one of count
, sum
,
last
, average
, min
, max
. Pattern
is a perl-style
regular-expression, the simplest form of which is just a string.
For an example, if we wanted to know how many web-servers were running
over time, we might use (very sloppily):
webservers PS count httpd
[You probably want a better regular expression.]