OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / netkit / draft / man8 / rwhod.8
1 .\" Copyright (c) 1983, 1991 The Regents of the University of California.
2 .\" All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\"    must display the following acknowledgement:
14 .\"     This product includes software developed by the University of
15 .\"     California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\"    may be used to endorse or promote products derived from this software
18 .\"    without specific prior written permission.
19 .\"
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" SUCH DAMAGE.
31 .\"
32 .\"     from: @(#)rwhod.8       6.5 (Berkeley) 3/16/91
33 .\"     $Id: rwhod.8,v 1.16 2000/07/30 23:57:06 dholland Exp $
34 .\"
35 .\" Japanese Version Copyright (c) 2000 Yuichi SATO
36 .\"         all rights reserved.
37 .\" Translated Thu Nov  2 18:23:49 JST 2000
38 .\"         by Yuichi SATO <sato@complex.eng.hokudai.ac.jp>
39 .\"
40 .\"WORD:        load average    Ê¿¶ÑÉé²Ù
41 .\"WORD:        byte order      ¥Ð¥¤¥È¥ª¡¼¥À¡¼
42 .\"
43 .Dd May 13, 1997
44 .Dt RWHOD 8
45 .Os "Linux NetKit (0.17)"
46 .\"O .Sh NAME
47 .Sh Ì¾Á°
48 .Nm rwhod
49 .\"O .Nd system status server
50 .Nd ¥·¥¹¥Æ¥à¥¹¥Æ¡¼¥¿¥¹¥µ¡¼¥Ð
51 .\"O .Sh SYNOPSIS
52 .Sh ½ñ¼°
53 .Nm rwhod
54 .Op Fl bpa
55 .Op Fl u Ar user
56 .\"O .Sh DESCRIPTION
57 .Sh ÀâÌÀ
58 .\"O .Nm Rwhod
59 .\"O is the server which maintains the database used by the
60 .\"O .Xr rwho 1
61 .\"O and
62 .\"O .Xr ruptime 1
63 .\"O programs.  Its operation is predicated on the ability to
64 .\"O .Em broadcast
65 .\"O messages on a network.
66 .Nm rwhod
67 ¤Ï¡¢
68 .Xr rwho 1
69 ¤È
70 .Xr ruptime 1
71 ¥×¥í¥°¥é¥à¤Ç»ÈÍѤµ¤ì¤ë¥Ç¡¼¥¿¥Ù¡¼¥¹¤ò´ÉÍý¤¹¤ë¥µ¡¼¥Ð¤Ç¤¢¤ë¡£
72 ¤³¤Î¥µ¡¼¥Ð¤Î±¿ÍѤϡ¢¥Í¥Ã¥È¥ï¡¼¥¯¾å¤Ç
73 .Em ¥Ö¥í¡¼¥É¥­¥ã¥¹¥È
74 ¥á¥Ã¥»¡¼¥¸¤¬»ÈÍѤǤ­¤ë¤³¤È¤òÁ°Äó¤È¤·¤Æ¤¤¤ë¡£
75 .Pp
76 .\"O .Nm Rwhod
77 .\"O operates as both a producer and consumer of status information.
78 .\"O As a producer of information it periodically
79 .\"O queries the state of the system and constructs
80 .\"O status messages which are broadcast on a network.
81 .\"O As a consumer of information, it listens for other
82 .\"O .Nm rwhod
83 .\"O servers' status messages, validating them, then recording
84 .\"O them in a collection of files located in the directory
85 .\"O .Pa /var/spool/rwho .
86 .Nm rwhod
87 ¤Ï¡¢¥¹¥Æ¡¼¥¿¥¹¾ðÊó¤ÎºîÀ®Â¦¤È¤·¤Æ¤â¡¢ÍøÍѦ¤È¤·¤Æ¤âÆ°ºî¤¹¤ë¡£
88 ¾ðÊó¤ÎºîÀ®Â¦¤È¤·¤Æ¤Ï¡¢¥·¥¹¥Æ¥à¾õÂÖ¤òÄê´üŪ¤ËÌ䤤¹ç¤ï¤»¡¢
89 ¥Í¥Ã¥È¥ï¡¼¥¯¤Ë¥Ö¥í¡¼¥É¥­¥ã¥¹¥È¤µ¤ì¤ë¥¹¥Æ¡¼¥¿¥¹¥á¥Ã¥»¡¼¥¸¤òºîÀ®¤¹¤ë¡£
90 ¾ðÊó¤ÎÍøÍѦ¤È¤·¤Æ¤Ï¡¢Â¾¤Î
91 .Nm rwhod
92 ¥µ¡¼¥Ð¤Î¥¹¥Æ¡¼¥¿¥¹¥á¥Ã¥»¡¼¥¸¤ò¼õ¤±¼è¤ê¡¢³Îǧ¤·¤¿¸å¡¢
93 .Pa /var/spool/rwho
94 ¥Ç¥£¥ì¥¯¥È¥ê¤Ëºî¤é¤ì¤¿¥Õ¥¡¥¤¥ë¤Ëµ­Ï¿¤¹¤ë¡£
95 .Pp
96 .\"O The server transmits and receives messages at the port indicated
97 .\"O in the ``rwho'' service specification; see 
98 .\"O .Xr services 5 . 
99 ¥µ¡¼¥Ð¤Ï¡¢``rwho'' ¥µ¡¼¥Ó¥¹¤Î»ØÄê¤Ç»Ø¼¨¤µ¤ì¤Æ¤¤¤ë¥Ý¡¼¥È¤ò»È¤Ã¤Æ
100 ¥á¥Ã¥»¡¼¥¸¤ÎÁ÷¼õ¿®¤ò¹Ô¤¦¡£
101 .Xr services 5
102 ¤ò»²¾È¤¹¤ë¤³¤È¡£
103 .Pp
104 .\"O If the
105 .\"O .Fl b
106 .\"O flag is supplied, only broadcast interfaces, such as ethernets, will
107 .\"O be used.  
108 .\"O If the
109 .\"O .Fl p
110 .\"O flag is supplied, only point-to-point interfaces will be used. If the
111 .\"O .Fl a
112 .\"O flag is supplied, or no flags are supplied, all interfaces will be
113 .\"O used.
114 .Fl b
115 ¥Õ¥é¥°¤¬»ØÄꤵ¤ì¤¿¾ì¹ç¡¢
116 ¥¤¡¼¥µ¥Í¥Ã¥È¤Î¤è¤¦¤Ê¥Ö¥í¡¼¥É¥­¥ã¥¹¥È¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤Î¤ß¤¬»È¤ï¤ì¤ë¡£
117 .Fl p
118 ¥Õ¥é¥°¤¬»ØÄꤵ¤ì¤¿¾ì¹ç¡¢
119 point-to-point ¤Î¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤Î¤ß¤¬»È¤ï¤ì¤ë¡£
120 .Fl a
121 ¥Õ¥é¥°¤¬»ØÄꤵ¤ì¤¿¾ì¹ç¡¢¤Þ¤¿¤Ï¥Õ¥é¥°¤¬²¿¤â»ØÄꤵ¤ì¤Ê¤¤¾ì¹ç¡¢
122 Á´¤Æ¤Î¥¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¤¬»È¤ï¤ì¤ë¡£
123 .Pp
124 .\"O If the
125 .\"O .Fl u
126 .\"O flag is supplied, rwhod will run as the specified user instead of as
127 .\"O root.
128 .Fl u
129 ¥Õ¥é¥°¤¬»ØÄꤵ¤ì¤¿¾ì¹ç¡¢
130 rwhod ¤Ï root ¤Ç¤Ï¤Ê¤¯»ØÄꤵ¤ì¤¿¥æ¡¼¥¶¡¼¤È¤·¤Æ¼Â¹Ô¤µ¤ì¤ë¡£
131 .Pp
132 .\"O The messages sent and received, are of the form:
133 Á÷¼õ¿®¤µ¤ì¤ë¥á¥Ã¥»¡¼¥¸¤Ï°Ê²¼¤Î·Á¼°¤Ç¤¢¤ë¡£
134 .Bd -literal -offset indent
135 .\"O struct     outmp {
136 .\"O    char    out_line[8];            /* tty name */
137 .\"O    char    out_name[8];            /* user id */
138 .\"O    long    out_time;               /* time on */
139 .\"O };
140 struct  outmp {
141         char    out_line[8];            /* tty ¤Î̾Á° */
142         char    out_name[8];            /* ¥æ¡¼¥¶¡¼ ID */
143         long    out_time;               /* »þ´Ö */
144 };
145
146 struct  whod {
147         char    wd_vers;
148         char    wd_type;
149         char    wd_fill[2];
150         int     wd_sendtime;
151         int     wd_recvtime;
152         char    wd_hostname[32];
153         int     wd_loadav[3];
154         int     wd_boottime;
155         struct  whoent {
156                 struct  outmp we_utmp;
157                 int     we_idle;
158         } wd_we[1024 / sizeof (struct whoent)];
159 };
160 .Ed
161 .Pp
162 .\"O All fields are converted to network byte order prior to
163 .\"O transmission.  The load averages are as calculated by the
164 .\"O .Xr w 1
165 .\"O program, and represent load averages over the 5, 10, and 15 minute 
166 .\"O intervals prior to a server's transmission; they are multiplied by 100
167 .\"O for representation in an integer.  The host name
168 .\"O included is that returned by the
169 .\"O .Xr gethostname 2
170 .\"O system call, with any trailing domain name omitted.
171 .\"O The array at the end of the message contains information about
172 .\"O the users logged in to the sending machine.  This information 
173 .\"O includes the contents of the 
174 .\"O .Xr utmp 5
175 .\"O entry for each non-idle terminal line and a value indicating the
176 .\"O time in seconds since a character was last received on the terminal line.
177 Á´¤Æ¤Î¥Õ¥£¡¼¥ë¥É¤Ï¡¢Á÷¿®¤ÎÁ°¤Ë¥Í¥Ã¥È¥ï¡¼¥¯¥Ð¥¤¥È¥ª¡¼¥À¡¼¤ËÊÑ´¹¤µ¤ì¤ë¡£
178 Ê¿¶ÑÉé²Ù¤Ï
179 .Xr w 1
180 ¥×¥í¥°¥é¥à¤Ë¤è¤Ã¤Æ·×»»¤µ¤ì¡¢
181 ¥µ¡¼¥Ð¤¬Á÷¿®¤¹¤ëÁ°¤Î 5, 10, 15 Ê¬´Ö³Ö¤ÎÊ¿¶ÑÉé²Ù¤òɽ¤¹¡£
182 Ê¿¶ÑÉé²Ù¤Ï 100 ¤ò³Ý¤±¤ÆÀ°¿ô¤Çɽ¤µ¤ì¤ë¡£
183 »ÈÍѤµ¤ì¤ë¥Û¥¹¥È̾¤Ï¡¢
184 .Xr gethostname 2
185 ¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ë¤è¤Ã¤ÆÊÖ¤µ¤ì¤¿¤â¤Î¤Ç¡¢¥É¥á¥¤¥ó̾¤Ï¾Êά¤µ¤ì¤ë¡£
186 ¥á¥Ã¥»¡¼¥¸¤ÎºÇ¸å¤ÎÇÛÎó¤Ë¤Ï¡¢¥á¥Ã¥»¡¼¥¸¤òÁ÷¿®¤·¤¿¥Þ¥·¥ó¤Ë¥í¥°¥¤¥ó¤·¤Æ¤¤¤ë
187 ¥æ¡¼¥¶¡¼¤Î¾ðÊ󤬴ޤޤì¤Æ¤¤¤ë¡£
188 ¤³¤Î¾ðÊó¤Ë¤Ï¡¢¥¢¥¤¥É¥ë¤Ç¤Ê¤¤Ã¼Ëö¥é¥¤¥ó¤Î
189 .Xr utmp 5
190 ¥¨¥ó¥È¥ê¤ÈüËö¥é¥¤¥ó¤«¤éºÇ¸å¤Ëʸ»ú¤¬¼õ¿®¤µ¤ì¤Æ¤«¤é¤ÎÉÿô¤¬Æþ¤Ã¤Æ¤¤¤ë¡£
191 .Pp
192 .\"O Messages received by the
193 .\"O .Xr rwho
194 .\"O server are discarded unless they originated at an
195 .\"O .Xr rwho
196 .\"O server's port.  In addition, if the host's name, as specified
197 .\"O in the message, contains any unprintable
198 .\"O .Tn ASCII
199 .\"O characters, the
200 .\"O message is discarded.  Valid messages received by
201 .\"O .Nm rwhod
202 .\"O are placed in files named
203 .\"O .Pa whod.hostname
204 .\"O in the directory
205 .\"O .Pa /var/spool/rwho .
206 .\"O These files contain only the most recent message, in the
207 .\"O format described above.
208 .Xr rwho
209 ¥µ¡¼¥Ð¤Ë¼õ¿®¤µ¤ì¤ë¥á¥Ã¥»¡¼¥¸¤Ï¡¢
210 .Xr rwho
211 ¥µ¡¼¥Ð¤Î¥Ý¡¼¥È¤«¤éÁ÷¿®¤µ¤ì¤¿¤â¤Î¤Ç¤Ê¤±¤ì¤Ð¡¢ÇË´þ¤µ¤ì¤ë¡£
212 ¤µ¤é¤Ë¡¢¥á¥Ã¥»¡¼¥¸Ãæ¤Ç»ØÄꤵ¤ì¤¿¥Û¥¹¥È̾¤¬É½¼¨¤Ç¤­¤Ê¤¤
213 .Tn ASCII
214 ʸ»ú¤ò´Þ¤ó¤Ç¤¤¤ë¾ì¹ç¤â¡¢¥á¥Ã¥»¡¼¥¸¤ÏÇË´þ¤µ¤ì¤ë¡£
215 .Nm rwhod
216 ¤Ë¼õ¿®¤µ¤ì¤¿Í­¸ú¤Ê¥á¥Ã¥»¡¼¥¸¤Ï¡¢¥Ç¥£¥ì¥¯¥È¥ê
217 .Pa /var/spool/rwho
218 ¤Ë¤¢¤ë
219 .Pa whod.hostname
220 ¤È¤¤¤¦¥Õ¥¡¥¤¥ë¤ËÆþ¤ì¤é¤ì¤ë¡£
221 ¤³¤ì¤é¤Î¥Õ¥¡¥¤¥ë¤Ë¤Ï¡¢
222 ºÇ¿·¤Î¥á¥Ã¥»¡¼¥¸¤Î¤ß¤¬¾å¤ÇÀâÌÀ¤·¤¿¥Õ¥©¡¼¥Þ¥Ã¥È¤Ç³ÊǼ¤µ¤ì¤Æ¤¤¤ë¡£
223 .Pp
224 .\"O Status messages are generated approximately once every
225 .\"O 3 minutes.
226 .\"O .Nm Rwhod
227 .\"O recomputes the system boot time every 30 minutes because on
228 .\"O some (non-Linux) systems it is not a totally reliable process.
229 ¥¹¥Æ¡¼¥¿¥¹¥á¥Ã¥»¡¼¥¸¤Ï¡¢Ìó 3 Ê¬¤Ë 1 ²óºîÀ®¤µ¤ì¤ë¡£
230 .Nm rwhod
231 ¤Ï¥·¥¹¥Æ¥à¤Î¥Ö¡¼¥È»þ¹ï¤ò 30 Ê¬Ëè¤ËºÆ·×»»¤¹¤ë¡£
232 ¤Ê¤¼¤Ê¤é¡¢(Linux °Ê³°¤Î) ¥·¥¹¥Æ¥à¤ÎÃæ¤Ë¤Ï¡¢
233 ¥Ö¡¼¥È»þ¹ï¤Î·×»»¤¬´°Á´¤Ë¿®ÍѤΤª¤±¤ë¥×¥í¥»¥¹¤Ç¤Ï¤Ê¤¤
234 ¥·¥¹¥Æ¥à¤â¸ºß¤¹¤ë¤¿¤á¤Ç¤¢¤ë¡£
235 .\"O .Sh SEE ALSO
236 .Sh ´ØÏ¢¹àÌÜ
237 .Xr rwho 1 ,
238 .Xr ruptime 1
239 .\"O .Sh BUGS
240 .Sh ¥Ð¥°
241 .\"O There should be a way to relay status information between networks. 
242 .\"O People often interpret the server dying
243 .\"O or network communtication failures
244 .\"O as a machine going down.
245 ¥Í¥Ã¥È¥ï¡¼¥¯´Ö¤Ç¥¹¥Æ¡¼¥¿¥¹¾ðÊó¤òÃæ·Ñ¤¹¤ëÊýË¡¤¬É¬ÍפǤ¢¤ë¡£
246 ¥µ¡¼¥Ð¤¬»à¤ó¤Ç¤¤¤ë¾ì¹ç¤ä¥Í¥Ã¥È¥ï¡¼¥¯ÄÌ¿®¤¬¼ºÇÔ¤·¤Æ¤¤¤ë¾ì¹ç¤Ë¡¢
247 ¥Þ¥·¥ó¤¬¥À¥¦¥ó¤·¤Æ¤¤¤ë¤È²ò¼á¤·¤Æ¤·¤Þ¤¦¤³¤È¤¬¤¢¤ë¡£
248 .\"O .Sh HISTORY
249 .Sh ÍúÎò
250 .\"O The
251 .\"O .Nm
252 .\"O command appeared in
253 .\"O .Bx 4.2 .
254 .Nm
255 ¥³¥Þ¥ó¥É¤Ï
256 .Bx 4.2
257 ¤ÇÅо줷¤¿¡£