SNTOP(1)
π SNTOP(1) π
okay bestie, pull up a chair, because we're about to read the manual page for sntop(1) β and honestly? it's giving essential.
β¨ NAME β¨
sntop β a top-like console network status tool π¦
πΈ SYNOPSIS πΈ
sntop [options]
π DESCRIPTION π
so sntop (simple nettop, iconic name honestly) is a console utility that lives in the same spiritual lane as top. what it does is poll a whole list of hosts on a regular interval to figure out if they're online, and then it shows you all of that in a cute little formatted table. π
that list? it gets read on load from a config file called sntoprc, which lives (by default) in ~/ or /etc. and the polling itself is done via ICMP ping(1). no cap.
optionally β and this is the fun part β the results can be used to generate an html page, or to elicit the execution of a file. main character energy fr fr.
there are also interactive run-time commands, and yes you use them while it's running:
qβ quit πrβ reload config file πwβ toggle html page generation π- any other key β force a refresh β‘
π COMMAND-LINE PARAMETERS π
-d,--daemonβ daemon mode: makessntopcapable of running in the background. note, it won't automatically fork into the background. π-o,--onceβ poll and display results once, then exit. one and done, we love a quickie. β¨-c,--nocolorβ toggle the use of ncurses color for pretty formatting. sometimes you want the aesthetic, sometimes you don't. π¨-p,--pingβ usepingin lieu offping. note,ping(in particular on DOWN hosts) is slower thanfpingβ the performance ofsntopwill suffer. π so like... know what you're signing up for.-w,--htmlβ generate html output of results. she's got range. π-s,--secureβ secure mode. command keys are disabled.SIGINTmust be used to terminate the program. this allowssntopto run nicely on spare terminals galore. something like the following in/etc/passwdcan facilitate that:
sntop:x:123:123:sntop:/:/usr/local/bin/sntop -s
-e <file>,--wfile=fileβ output html to<file>instead ofsntop.html-f <file>,--conf=fileβ read conf data from<file>instead of~/.sntoprc. note,sntopwill still try to read from/etc/sntoprcif<file>fails. if both fail,sntopwill exit. π-r <time>,--refresh=timeβ refresh every<time>seconds instead of180-a <file>,--alarm=fileβ alarm mode: execute<file>when a site first goes DOWN. π¨-l <file>,--log=fileβ log mode: execute<file>whenever the status of a site changes-b <bytes>,--byte=bytesβ Number of bytes of ping data to send-v,--versionβ display version information and exit-h,--helpβ display command-syntax help and exit
π§ Command Execution Syntax π§
in alarm or log mode, a file gets executed on the occurrence of a change in status of a given host. sntop will fork and exec the specified file, passing as arguments information about the event. and those arguments are, in order:
<display name of host> <host name/IP> <status>
let's break that down, bestie:
<display name of host>β the 'display' name (the firstsntopcolumn) of the machine, ie"MyBox"<host name/IP>β the explicit hostname or IP address of the machine, ie"snaggle"or"192.168.55.12"<status>β 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 whensntoploads,<file>is executed). No action is taken in any modes for hosts that originate as UP β thus, the default status is UP. π
and the reason it works this way? 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 alarm.sh for an example script. π«Ά
πΌ FILES πΌ
~/.sntoprcβ default config file location/etc/sntoprcβ if a user's config is not found, this system-wide one is read/usr/share/man/man1/sntop.1.gzβ the man page (hi, that's me, you're reading me π )/usr/share/doc/sntop/examples/alarm.shβ sample alarm-execute script/usr/bin/sntopβ thesntopexecutable
π CONFIG FILE π
An example config file, /usr/share/doc/sntop/examplessntoprc.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:
Display Name
IP or host
Display Comments
Example:
Jimi
192.168.23.1
linux/sparc; firewall, http, ftp
and here's the load order, no cap: sntop will first attempt to read the config file from ~/.sntoprc (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. π
π AUTHORS π
sntop was written by Robert M. Love <rml@tech9.net> and Christopher M. Rivera <cmrivera@ufl.edu>. Send us bug reports, suggestions, and hardware. (yes, hardware. they said what they said. π)
β SEE ALSO β
and that's the whole page, bestie!! this one's the SNTOP(1) manual, dated October 22, 2008 β a certified classic from the sntop source distribution, and honestly it ate. go forth and ping responsibly. πππ¦
π¦ where this page comes from
- debian bookworm: sntop 1.4.3-6
- debian trixie: sntop 1.4.3-8 Β· GPL-2.0-or-later
- ubuntu jammy: sntop 1.4.3-6
- ubuntu noble: sntop 1.4.3-6
- ubuntu questing: sntop 1.4.3-8
- ubuntu resolute: sntop 1.4.3-8build1 Β· GPL-2.0-or-later
- ubuntu stonking: sntop 1.4.3-8build1 Β· GPL-2.0-or-later
- Copyright (C) 2008 Fredrik Steen <stone@debian.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms