nefu - network monitoring daemon
nefu [ -d passes ] [ -D domain ] [ -f file ] [ -h ]
[ -H ] [ -l facility ] [ -m mask ] [ -n ] [ -N ]
[ -p seconds ] [ -r seconds ] [ -R ] [ -s seconds ]
[ -u uname ] [ -V ]
nefu is a daemon used for monitoring services available over
nefu must be started as root. Once started, nefu changes
its UID and directory to those of the user nefu, unless a
different user is specified with the -u option. nefu may
use external programs to monitor services. External tests
should reside under $HOME/shelltests.
nefu's input is a dependency map of services to monitor or a
file specified with the -f option. See nefu.conf(5) for the
dependency map syntax.
nefu's dependency map consists of two types of machines:
leaf and internal. Internal machines are network dependen-
cies for other machines; leaf machines have local services
only. When a service on a machine is tested it will be
found to be in one of three states: UP, DOWN, or MAYBE_DOWN.
A service in the DOWN state has responded in a manner that
conclusively proves it is unavailable (e.g., a "Connection
Refused" response). A service that fails in an inconclusive
manner (e.g., a timeout) is considered to be MAYBE_DOWN. If
a service transitions from UP or DOWN to MAYBE_DOWN, and all
of the network dependencies between the monitor machine and
the target are verified to be UP, the service is tested a
second time. If the service fails inconclusively a second
time it is MAYBE_DOWN. A BOUNCE is logged for a service
that fails inconclusively once, but then replies con-
clusively after its dependency path is verified.
If a machine's domain name is not found in DNS, or if it's
domain name resolves to multiple IP addresses, it is ignored
by the monitor and reported as down. All machines in this
state are re-queried every so many passes, as set by the -d
passes flag. By default, re-queries every 10 passes. If
passes is set to 0, DNS is never re-queried.
nefu's pass time is how long it takes to complete a single
pass through its dependency tree testing all reachable leaf
machines. If a pass takes less time than the minimum time,
nefu will sleep for the remainder of the pass. In the event
that a pass should take longer than the minimum pass time
nefu will begin its next pass immediately. Default pass
time is 60 seconds, or it can be set with the -p option.
Service delay time is the time between each test during a
pass. Default service delay time is 0 seconds. It can be
set with the -s option. nefu's last complete pass time
information is published in its .project file.
syslog(3) is used to log informational messages. syslog
facility can be set with the -l option, default is DAEMON.
nefu logs different events at different syslog levels:
LOG_DEBUG is for startup and pass time information, LOG_INFO
is used by individual tests to log trip time information and
for sendmail confirmations, LOG_NOTICE is where the monitor
logs BOUNCE and state change information, and LOG_ERR is
reserved for local system errors. See syslog.conf(4) for
When nefu detects a state change in a service it is reported
via sendmail, published in .plan and index.html, and logged
Unless HTML output is disabled nefu publishes its status
page, dependency map, machine list, and responsibility code
information as HTML pages. By default, nefu's status page
has a refresh tag for as many seconds as nefu's pass time.
The -r HTML refresh tag can be used to set a different
refresh interval, in seconds, with 0 disabling refreshment.
HTML pages generated by nefu can optionally have a user-
created header and footer. Any user created header.html
must contain the </HEAD> and <BODY> HTML tags. nefu will
keep a list of snapshots of passes where state changes
occured if enabled with the -H HTML history option.
For compatability with some email-to-page gateways, nefu can
be run in redundant mode with the -R option. nefu will
repeat the information normally contained only in an email's
subject in to the body of the message as well. nefu's email
domain defaults to the name of the localhost, unles set by
the -D option.
-d passes re-query DNS for failed domain names
every so many passes. Default is 10.
-D domain specify the domain for nefu's email.
Default is the local hostname.
-f file specify a config file instead of stdin.
-h do not output html.
-H log history to html.
-l facility syslog facility. Options are USER, DAE-
MON, LOCAL0, LOCAL1, LOCAL2, LOCAL3,
LOCAL4, LOCAL5, LOCAL6, LOCAL7. Default
-m mask umask for output files. Default is 022.
-n print the dependency tree to stdout and
-N quit after outputting html.
-p seconds minimum pass time in seconds. Default is
-r seconds HTML refresh interval in seconds.
Default is passtime. 0 disables.
-R Generate emails with redundant
-s seconds service delay time in seconds. Default
-u uname run as uname. Default is "nefu".
-V displays the version of nefu and exits.
nefu.conf nefu's dependency map
$HOME/.plan current network status
$HOME/.project last pass time information
$HOME/public_html/ HTML output directory
optional header applied to all generated
optional footer applied to all generated
$HOME/shelltests/ external script directory for nefu shell
nefu.conf(4), syslog.conf(4), finger(1), sendmail(1)
Man(1) output converted with