RWHOD(8)
โจ RWHOD(8) โจ
okay so bestie, welcome to the System Manager's Manual entry for rwhod ๐ โ yes the 8 means it's a system admin thing, we love a little privileged moment, periodt.
๐ธ NAME ๐ธ
rwhod โ system status server ๐ฅ๏ธโจ
๐ SYNOPSIS ๐
rwhod [-bpaf] [-i <if>...] [-u user]
that's it, that's the whole vibe. five letters of flags and a whole lot of gossip on your network. ๐
๐ฆ DESCRIPTION ๐ฆ
So. rwhod is the server that maintains the database used by the rwho(1) and ruptime(1) programs. Its whole operation is predicated on the ability to broadcast messages on a network โ like, if you can't broadcast, the girl cannot function, no cap. ๐ก
rwhod operates as both a producer and consumer of status information. Two jobs, one icon. ๐
- As a producer of information, it periodically queries the state of the system and constructs status messages which are broadcast on a network. She's posting, fr fr. ๐ค
- As a consumer of information, it listens for other
rwhodservers' status messages, validating them, then recording them in a collection of files located in the directory/var/spool/rwho. She's also lurking and taking notes. Obsessed. ๐
The server transmits and receives messages at the port indicated in the `rwho` service specification; see services(5). iykyk ๐
The messages sent and received are of the form:
struct outmp {
char out_line[8]; /* tty name */
char out_name[8]; /* user id */
long out_time; /* time on */
};
struct whod {
char wd_vers;
char wd_type;
char wd_fill[2];
int wd_sendtime;
int wd_recvtime;
char wd_hostname[32];
int wd_loadav[3];
int wd_boottime;
struct whoent {
struct outmp we_utmp;
int we_idle;
} wd_we[1024 / sizeof (struct whoent)];
};
look at that struct, it's giving data structure realness ๐
All fields are converted to network byte order prior to transmission. Little endian girlies, we're flipping before we send. ๐
The load averages are as calculated by the w(1) program, and represent load averages over the 5, 10, and 15 minute intervals prior to a server's transmission; they are multiplied by 100 for representation in an integer. yes bestie, integers only, we don't do floaties here. ๐
The host name included is that returned by the gethostname(2) system call, with any trailing domain name omitted. drop the domain, keep it cute. ๐ท๏ธ
The array at the end of the message contains information about the users logged in to the sending machine. This information includes the contents of the utmp(5) entry for each non-idle terminal line and a value indicating the time in seconds since a character was last received on the terminal line. idle girlies do not get a slot, sorry, we're only tracking the ones actually typing. โจ๏ธ
Messages received by the rwho server are discarded unless they originated at an rwho server's port. Also, if the host's name, as specified in the message, contains any unprintable ASCII characters, the message is discarded. we do not accept cursed strings in this house. ๐ซ
Valid messages received by rwhod are placed in files named whod.hostname in the directory /var/spool/rwho. These files contain only the most recent message, in the format described above. out with the old, in with the new, she does not hoard. ๐
Status messages are generated approximately once every 3 minutes. rwhod recomputes the system boot time every 30 minutes because on some (non-Linux) systems it is not a totally reliable process. trauma from other operating systems, we respect it. ๐
๐ FLAGS ๐
- If the
-bflag is supplied, only broadcast interfaces, such as ethernets, will be used. ๐ข - If the
-pflag is supplied, only point-to-point interfaces will be used. ๐ - If the
-aflag is supplied, or no flags are supplied, all interfaces will be used. ๐ - Alternately, you may specify interfaces by name by providing one or more
-ioptions followed by the interface name. ๐ท๏ธ - If the
-uflag is supplied,rwhodwill run as the specified user instead of asrwhod. The initial user until the daemon drops privileges isroot. ๐ (yes bestie, root first, then she steps down, very humble of her) rwhodcan also forward packets between interfaces if started with-f. Please read the CAVEATS section before enablingrwhodforwarding. ๐
๐ง CAVEATS ๐ง
read this part bestie, it's the important one โ ๏ธ
While rwhod listens on any interface present on the host, it will only send (or forward) to the interfaces determined by the -a -b -p -i flags. she hears everything, but she only speaks to her chosen ones. ๐
When operating in forwarding mode (with -f), rwhod forwards all correct rwhod packets received on an interface to all the other interfaces. You can create a broadcast storm if there is a loop in your network and all the routers in the loop run in forwarding mode. ๐๐ญ
To prevent this from happenning, rwhod will shut down forwarding (and log the event to the syslog) if more than one rwhod packet is forwarded per second on average over the last three minutes. she has a self-preservation instinct, we love that for her. ๐
If this happens, you must break the loop of forwarding routers. that's on you, babe, she did her part. ๐ซถ
๐ SEE ALSO ๐
rwho(1), ruptime(1) ๐
๐ BUGS ๐
- Some kind of proxying feature might be useful if your router doesn't run
rwhod. manifesting it. ๐ - People often interpret the server dying or network communication failures as a machine going down. dramatic much? the machine is fine, the vibes are not. ๐ญ
rwhoddoesn't refresh its interface list, which might be useful when using-a-b-p. she is set in her ways, okay, we don't judge. ๐
๐ HISTORY ๐
The rwhod command appeared in 4.2BSD. ๐ฐ๏ธ
Philippe Troin <phil@fifi.org> implemented forwarding and interface selection flags. shoutout to Philippe, icon behavior, ate and left no crumbs ๐
okay that's the whole page bestie, you're basically a sysadmin now, go forth and broadcast responsibly ๐ฆโจ
this little love letter came to you from Linux NetKit (0.17), dated March 10, 1999 โ old but iconic, we stan a vintage manual page ๐๐
๐ฆ where this page comes from
- debian bookworm: rwhod 0.17-15
- debian trixie: rwhod 0.17-16
- ubuntu jammy: rwhod 0.17-14
- ubuntu noble: rwhod 0.17-15
- ubuntu questing: rwhod 0.17-16
- ubuntu resolute: rwhod 0.17-16build1
- ubuntu stonking: rwhod 0.17-19
- Copyright (c) 1983, 1991 The Regents of the University of California
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms