rwhod.8c
来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 8C 代码 · 共 161 行
8C
161 行
.\" SCCSID: @(#)rwhod.8c 2.2 5/5/87.TH rwhod 8c.SH Namerwhod \- system status server.SH Syntax.B "/etc/rwhod [ \-b ] [ \-l ]".SH Description.NXR "rwhod server".NXR "system status server" "rwhod server".NXR "rwho command" "and the rwhod server".NXR "ruptime command" "and the rwhod server"The.PN rwhodcommand is the server which maintains the database used by the .MS rwho 1c and .MS ruptime 1c programs. Its operation is predicated on the ability tobroadcast messages on a network..PPThe.PN rwhodcommandoperates as both a producer and consumer of status information.As a producer of information it periodicallyqueries the state of the system and constructsstatus messages which are broadcast on a network..PPAs a consumer of information, .PN rwhod listens for the status messages of the other.PN rwhodservers, validating them, then recordingthem in a collection of files located in the directory.PN /usr/spool/rwho ..PPThe.PN rwhoserver transmits and receives messages at the port indicatedin the rwho service specification. For more information, see .MS services 5 .The messages sent and received, take the following form:.NXR "rwhod server" "message format".EXstruct 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)];};.EEAll fields are converted to network byte order prior totransmission. The load averages are calculated by the.MS 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 as an integer.The host name included is the name returned by the .MS gethostname 2 system call, with any trailing domain name omitted.The array at the end of the message contains information aboutthe users logged in to the sending machine. This information includes the contents of the .MS utmp 5 entry for each active terminal line and a value indicating thetime since a character was last received on the terminal line..PPMessages received by the.PN rwhoserver are discarded unless they originated at a.PN rwhoserver's port. In addition, if the host's name, as specifiedin the message, contains any unprintable ASCII characters, themessage is discarded. Valid messages received by.PN rwhodare placed in files named \f(CWwhod.f\Ihostname\fRin the directory .PN /usr/spool/rwho .These files contain only the most recent message in theformat previously described..PPStatus messages are generated approximately once every3 minutes. The.PN rwhodcommand performs an .MS nlist 3 on .PN /vmunix every 30 minutes to guard againstthe possibility that this file is not the systemimage currently operating..SH Options.IP \-b 5Sets the broadcast only mode. Sends outgoing .PN rwhopackets, but ignores incoming ones..IP \-lSets the listen only mode. Collects incoming.PN rwhopackets from the network, but does not broadcast.PN rwhodata..SH RestrictionsBecause the.PN rwhoddaemon sends its information in broadcast packets it generatesa large amount of network traffic. On large networks the extratraffic may be objectionable. Therefore, the.PN rwhoddaemon is disabled by default. To make use of the.PN rwhoddaemon for both the local and remote hosts,remove the comment symbols (#) from in front of the lines specifying.PN rwhodin the.PN /etc/rcfile..PPIf the.PN rwhoddaemon is not running on a remote machine, the machinemay incorrectly appear to be down when you use the.PN ruptimecommand to determine its status. See the.MS ruptime 1creference page for more information..PPIf a system has more than 40 users logged in at once, the numberof users displayed by the.MS ruptime 1c and .MS rwho 1c commands is incorrect.Users who login after the fortieth user, will fail to appear in the output of the .MS ruptime 1c and .MS rwho 1c commands. This is because the maximum size limit of an Ethernet packetis 1500 bytes, and the .PN rwhod daemon mustbroadcast its information in a single packet..SH See Alsoruptime(1c), rwho(1c)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?