(simple network top) is a console utility, in the spirit of top, that polls a list of hosts at a regular interval to determine if they are online, displaying the results in a formatted table. This list is read on load from a config file, sntoprc, located (by default) in ~/ or /etc. The polling is done via ICMP Optionally, the results can be used to generate an html page or ellicit the execution of a file. Interactive run-time commands exist: - quit - reload config file - toggle html page generation - force a refresh - daemon mode: make sntop capable of running in the background. note, it wont automatically fork into the background. - poll and display results once, then exit - toggle the use of ncurses color for pretty formatting - use 'ping' in lieu of 'fping'. note, ping (in particular on DOWN hosts) is slower than fping -- the performance of sntop will suffer. - generate html output of results - secure mode. command keys are disabled. SIGINT must be used to terminate the program. this allows sntop to run nicely on spare terminals galore. something like the following in can facilitate that: - output html to <file> instead of sntop.html - read conf data from <file> instead of ~/.sntoprc. note, sntop will still try to read from /etc/sntoprc if <file> fails. if both fail, sntop will exit. - refresh every <time> seconds instead of 180 - alarm mode: execute <file> when a site first goes DOWN - log mode: execute <file> whenever the status of a site changes - Number of bytes of ping data to send - display version information and exit - display command-syntax help and exit In alarm or log mode a file is executed on the occurence of change in status of a given host. sntop will fork and exec the specified file, passing as arguments information about the event. those arguments are: the 'display' name (first sntop collumn) of the machine, ie "MyBox" the explicit hostname or IP address of the machine, ie "snaggle" or "192.168.55.12" the new status of the machine, "UP" or "DOWN," this would obviously always be DOWN for alarm mode Note, DOWN hosts will be logged in both modes upon load (ie, if they are down when sntop loads, <file> is executed). No action is taken in any modes for hosts that originate as UP -- thus, the default status is UP. We execute an external file to remain in the UNIX tradition -- small, simple programs that do one thing damn well. Thus, a logging option is not even provided -- a two-line shell script will do fine, there. However, the possibilities are powerful: administrator paging, for instance. See for an example script. default config file location if a user's config is not found, this system-wide one is read the man page sample alarm-execute script the sntop executable An example config file, sntoprc.EXAMPLE, is included in the standard distribution. However, the config file syntax is simple. Entries are RETURN terminated. Trailing whitespace is ignored. '#' signifies a comment and can be used inline. By default, upto 32 characters will be read, per line. All entries should be a single word, except comments. The syntax: Example: will first attempt to read the config file from (or another location specified by -f). If that fails, the system config file will be read from /etc/sntoprc. If both fail, sntop will exit. was written by Robert M. Love <rml@tech9.net> and Christopher M. Rivera <cmrivera@ufl.edu>. Send us bug reports, suggestions, and hardware. top (1), ping (1), fping (1)