Usage:
unix-status-server version 1.43 from remstats 1.0.13a
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, MASQCONN,
FTPCOUNT, NETSTAT-TCPSTATES, FILEAGE, QMAILQSTAT,
QMAILQREAD, PROCNAME, PROCDISKIO, PROCMEMINFO, SAR
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
-
QMAILQSTAT runs qmail-qstat and returns: qmail_qsize, qmail_qbacklog
-
QMAILQREAD runs qmail-qread and returns FIXME
-
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.
-
NETSTAT-TCPSTATES runs netstat and produces counts of the number of tcp
sessions in the various TCP states.
-
SAR runs "
sar -A
" and produces a lot of operating-system specific
info.
If you want to see what it will return, 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.]
Notes:
With older versions of vmstat
(ones that mash fields together), it will give up on vmstat
and not return
memory and CPU info. It also requires a version of df
that will accept the
-P
and -i
flags. The -P
flag forces the output
for a file-system to stay on one line (easier for me to parse) and the
-i
returns info about inodes. If the -i
flag is missing,
you won't get any inode data. You also won't get any inode data if
the file-system doesn't have inodes. (Duh :-).
For details on installation, look at the
server installation docs.
[