1e76e05e07751d0985267066c13a95bf3dac688c
[openafs.git] / doc / man-pages / pod8 / fileserver.pod
1 =head1 NAME
2
3 fileserver - Initializes the File Server component of the fs process
4
5 =head1 SYNOPSIS
6
7 =for html
8 <div class="synopsis">
9
10 B<fileserver> S<<< [B<-auditlog> <I<path to log file>>] >>>
11     S<<< [B<-audit-interface> (file | sysvmq)] >>>
12     S<<< [B<-d> <I<debug level>>] >>>
13     S<<< [B<-p> <I<number of processes>>] >>>
14     S<<< [B<-spare> <I<number of spare blocks>>] >>>
15     S<<< [B<-pctspare> <I<percentage spare>>] >>>
16     S<<< [B<-b> <I<buffers>>] >>>
17     S<<< [B<-l> <I<large vnodes>>] >>>
18     S<<< [B<-s> <I<small vnodes>>] >>>
19     S<<< [B<-vc> <I<volume cachesize>>] >>>
20     S<<< [B<-w> <I<call back wait interval>>] >>>
21     S<<< [B<-cb> <I<number of call backs>>] >>>
22     S<<< [B<-banner>] >>>
23     S<<< [B<-novbc>] >>>
24     S<<< [B<-implicit> <I<admin mode bits: rlidwka>>] >>>
25     S<<< [B<-readonly>] >>>
26     S<<< [B<-hr> <I<number of hours between refreshing the host cps>>] >>>
27     S<<< [B<-busyat> <I<< redirect clients when queue > n >>>] >>>
28     S<<< [B<-nobusy>] >>>
29     S<<< [B<-rxpck> <I<number of rx extra packets>>] >>>
30     S<<< [B<-rxdbg>] >>>
31     S<<< [B<-rxdbge>] >>>
32     S<<< [B<-rxmaxmtu> <I<bytes>>] >>>
33     S<<< [B<-nojumbo> >>>
34     S<<< [B<-jumbo> >>>
35     S<<< [B<-rxbind> >>>
36     S<<< [B<-allow-dotted-principals>] >>>
37     S<<< [B<-L>] >>>
38     S<<< [B<-S>] >>>
39     S<<< [B<-k> <I<stack size>>] >>>
40     S<<< [B<-realm> <I<Kerberos realm name>>] >>>
41     S<<< [B<-udpsize> <I<size of socket buffer in bytes>>] >>>
42     S<<< [B<-sendsize> <I<size of send buffer in bytes>>] >>>
43     S<<< [B<-abortthreshold> <I<abort threshold>>] >>>
44     S<<< [B<-enable_peer_stats>] >>>
45     S<<< [B<-enable_process_stats>] >>>
46     S<<< [B<-syslog> [<I< loglevel >>]] >>>
47     S<<< [B<-mrafslogs>] >>>
48     S<<< [B<-saneacls>] >>>
49     S<<< [B<-help>] >>>
50     S<<< [B<-fs-state-dont-save>] >>>
51     S<<< [B<-fs-state-dont-restore>] >>>
52     S<<< [B<-fs-state-verify>] (none | save | restore | both)] >>>
53     S<<< [B<-vhashsize> <I<log(2) of number of volume hash buckets>>] >>>
54     S<<< [B<-vlrudisable>] >>>
55     S<<< [B<-vlruthresh> <I<minutes before eligibility for soft detach>>] >>>
56     S<<< [B<-vlruinterval> <I<seconds between VLRU scans>>] >>>
57     S<<< [B<-vlrumax> <I<max volumes to soft detach in one VLRU scan>>] >>>
58     S<<< [B<-vattachpar> <I<number of volume attach threads>>] >>>
59     S<<< [B<-m> <I<min percentage spare in partition>>] >>>
60     S<<< [B<-lock>] >>>
61
62 =for html
63 </div>
64
65 =head1 DESCRIPTION
66
67 The B<fileserver> command initializes the File Server component of the
68 C<fs> process. In the conventional configuration, its binary file is
69 located in the F</usr/afs/bin> directory on a file server machine.
70
71 The B<fileserver> command is not normally issued at the command shell
72 prompt, but rather placed into a database server machine's
73 F</usr/afs/local/BosConfig> file with the B<bos create> command. If it is
74 ever issued at the command shell prompt, the issuer must be logged onto a
75 file server machine as the local superuser C<root>.
76
77 The File Server creates the F</usr/afs/logs/FileLog> log file as it
78 initializes, if the file does not already exist. It does not write a
79 detailed trace by default, but the B<-d> option may be used to
80 increase the amount of detail. Use the B<bos getlog> command to
81 display the contents of the log file.
82
83 The command's arguments enable the administrator to control many aspects
84 of the File Server's performance, as detailed in L<OPTIONS>.  By default
85 the B<fileserver> command sets values for many arguments that are suitable
86 for a medium-sized file server machine. To set values suitable for a small
87 or large file server machine, use the B<-S> or B<-L> flag
88 respectively. The following list describes the parameters and
89 corresponding argument for which the B<fileserver> command sets default
90 values, and the table below summarizes the setting for each of the three
91 machine sizes.
92
93 =over 4
94
95 =item *
96
97 The maximum number of lightweight processes (LWPs) or pthreads 
98 the File Server uses to handle requests for data; corresponds to the 
99 B<-p> argument. The File Server always uses a minimum of 32 KB of 
100 memory for these processes.
101
102 =item *
103
104 The maximum number of directory blocks the File Server caches in memory;
105 corresponds to the B<-b> argument. Each cached directory block (buffer)
106 consumes 2,092 bytes of memory.
107
108 =item *
109
110 The maximum number of large vnodes the File Server caches in memory for
111 tracking directory elements; corresponds to the B<-l> argument. Each large
112 vnode consumes 292 bytes of memory.
113
114 =item *
115
116 The maximum number of small vnodes the File Server caches in memory for
117 tracking file elements; corresponds to the B<-s> argument.  Each small
118 vnode consumes 100 bytes of memory.
119
120 =item *
121
122 The maximum volume cache size, which determines how many volumes the File
123 Server can cache in memory before having to retrieve data from disk;
124 corresponds to the B<-vc> argument.
125
126 =item *
127
128 The maximum number of callback structures the File Server caches in
129 memory; corresponds to the B<-cb> argument. Each callback structure
130 consumes 16 bytes of memory.
131
132 =item *
133
134 The maximum number of Rx packets the File Server uses; corresponds to the
135 B<-rxpck> argument. Each packet consumes 1544 bytes of memory.
136
137 =back
138
139 The default values are:
140
141   Parameter (Argument)               Small (-S)     Medium   Large (-L)
142   ---------------------------------------------------------------------
143   Number of LWPs (-p)                        6           9          128
144   Number of cached dir blocks (-b)          70          90          120
145   Number of cached large vnodes (-l)       200         400          600
146   Number of cached small vnodes (-s)       200         400          600
147   Maximum volume cache size (-vc)          200         400          600
148   Number of callbacks (-cb)             20,000      60,000       64,000
149   Number of Rx packets (-rxpck)            100         150          200
150
151 To override any of the values, provide the indicated argument (which can
152 be combined with the B<-S> or B<-L> flag).
153
154 The amount of memory required for the File Server varies. The approximate
155 default memory usage is 751 KB when the B<-S> flag is used (small
156 configuration), 1.1 MB when all defaults are used (medium configuration),
157 and 1.4 MB when the B<-L> flag is used (large configuration). If
158 additional memory is available, increasing the value of the B<-cb> and
159 B<-vc> arguments can improve File Server performance most directly.
160
161 By default, the File Server allows a volume to exceed its quota by 1 MB
162 when an application is writing data to an existing file in a volume that
163 is full. The File Server still does not allow users to create new files in
164 a full volume. To change the default, use one of the following arguments:
165
166 =over 4
167
168 =item *
169
170 Set the B<-spare> argument to the number of extra kilobytes that the File
171 Server allows as overage. A value of C<0> allows no overage.
172
173 =item *
174
175 Set the B<-pctspare> argument to the percentage of the volume's quota the
176 File Server allows as overage.
177
178 =back
179
180 By default, the File Server implicitly grants the C<a> (administer) and
181 C<l> (lookup) permissions to system:administrators on the access control
182 list (ACL) of every directory in the volumes stored on its file server
183 machine. In other words, the group's members can exercise those two
184 permissions even when an entry for the group does not appear on an ACL. To
185 change the set of default permissions, use the B<-implicit> argument.
186
187 The File Server maintains a I<host current protection subgroup> (I<host
188 CPS>) for each client machine from which it has received a data access
189 request. Like the CPS for a user, a host CPS lists all of the Protection
190 Database groups to which the machine belongs, and the File Server compares
191 the host CPS to a directory's ACL to determine in what manner users on the
192 machine are authorized to access the directory's contents. When the B<pts
193 adduser> or B<pts removeuser> command is used to change the groups to
194 which a machine belongs, the File Server must recompute the machine's host
195 CPS in order to notice the change. By default, the File Server contacts
196 the Protection Server every two hours to recompute host CPSs, implying
197 that it can take that long for changed group memberships to become
198 effective. To change this frequency, use the B<-hr> argument.
199
200 The File Server stores volumes in partitions. A partition is a
201 filesystem or directory on the server machine that is named C</vicepX>
202 or C</vicepXX> where XX is "a" through "z" or "aa" though "iv". Up to
203 255 partitions are allowed. The File Server expects that the /vicepXX
204 directories are each on a dedicated filesystem. The File Server will
205 only use a /vicepXX if it's a mountpoint for another filesystem,
206 unless the file C</vicepXX/AlwaysAttach> exists. The data in the
207 partition is a special format that can only be access using OpenAFS
208 commands or an OpenAFS client.
209
210 The File Server generates the following message when a partition is nearly
211 full:
212
213    No space left on device
214
215 This command does not use the syntax conventions of the AFS command
216 suites. Provide the command name and all option names in full.
217
218 =head1 CAUTIONS
219
220 Do not use the B<-k> and B<-w> arguments, which are intended for use
221 by the OpenAFS developers only. Changing them from their default
222 values can result in unpredictable File Server behavior.  In any case,
223 on many operating systems the File Server uses native threads rather
224 than the LWP threads, so using the B<-k> argument to set the number of
225 LWP threads has no effect.
226
227 Do not specify both the B<-spare> and B<-pctspare> arguments. Doing so
228 causes the File Server to exit, leaving an error message in the
229 F</usr/afs/logs/FileLog> file.
230
231 Options that are available only on some system types, such as the B<-m>
232 and B<-lock> options, appear in the output generated by the B<-help>
233 option only on the relevant system type.
234
235 Currently, the maximum size of a volume is 2 terabytes (2^31 bytes)
236 and the maximum size of a /vicepX partition on a fileserver is 2^64
237 kilobytes. The maximum partition size in releases 1.4.7 and earlier is
238 2 terabytes (2^31 bytes). The maximum partition size for 1.5.x
239 releases 1.5.34 and earlier is 2 terabytes as well.
240
241 The maximum number of directory entries is 64,000 if all of the entries
242 have names that are 15 octets or less in length. A name that is 15 octets
243 long requires the use of only one block in the directory. Additional
244 sequential blocks are required to store entries with names that are longer
245 than 15 octets. Each additional block provides an additional length of 32
246 octets for the name of the entry. Note that if file names use an encoding
247 like UTF-8, a single character may be encoded into multiple octets.
248
249 In real world use, the maximum number of objects in an AFS directory
250 is usually between 16,000 and 25,000, depending on the average name
251 length.
252
253 =head1 OPTIONS
254
255 =over 4
256
257 =item B<-auditlog> <I<log path>>
258
259 Turns on audit logging, and sets the path for the audit log.  The audit
260 log shows one entry per RPC call. Each entry records the name of the RPC
261 call, the host that submitted the call, the authenticated entity (user)
262 that issued the call, the parameters for the call, and if the call
263 succeeded or failed.
264
265 =item B<-audit-interface> (file | sysvmq)
266
267 Specifies what audit interface to use. The C<file> interface writes audit
268 messages to the file passed to B<-auditlog>. The C<sysvmq> interface
269 writes audit messages to a SYSV message (see L<msgget(2)> and
270 L<msgrcv(2)>). The message queue the C<sysvmq> interface writes to has the
271 key C<ftok(path, 1)>, where C<path> is the path specified in the
272 B<-auditlog> option.
273
274 Defaults to C<file>.
275
276 =item B<-d> <I<debug level>>
277
278 Sets the detail level for the debugging trace written to the
279 F</usr/afs/logs/FileLog> file. Provide one of the following values, each
280 of which produces an increasingly detailed trace: C<0>, C<1>, C<5>, C<25>,
281 and C<125>. The default value of C<0> produces only a few messages.
282
283 =item B<-p> <I<number of processes>>
284
285 Sets the number of threads (or LWPs) to run. Provide a positive integer. 
286 The File Server creates and uses five threads for special purposes, 
287 in addition to the number specified (but if this argument specifies 
288 the maximum possible number, the File Server automatically uses five 
289 of the threads for its own purposes).
290
291 The maximum number of threads can differ in each release of OpenAFS.
292 Consult the I<OpenAFS Release Notes> for the current release.
293
294 =item B<-spare> <I<number of spare blocks>>
295
296 Specifies the number of additional kilobytes an application can store in a
297 volume after the quota is exceeded. Provide a positive integer; a value of
298 C<0> prevents the volume from ever exceeding its quota. Do not combine
299 this argument with the B<-pctspare> argument.
300
301 =item B<-pctspare> <I<percentage spare>>
302
303 Specifies the amount by which the File Server allows a volume to exceed
304 its quota, as a percentage of the quota. Provide an integer between C<0>
305 and C<99>. A value of C<0> prevents the volume from ever exceeding its
306 quota. Do not combine this argument with the B<-spare> argument.
307
308 =item B<-b> <I<buffers>>
309
310 Sets the number of directory buffers. Provide a positive integer.
311
312 =item B<-l> <I<large vnodes>>
313
314 Sets the number of large vnodes available in memory for caching directory
315 elements. Provide a positive integer.
316
317 =item B<-s> <I<small nodes>>
318
319 Sets the number of small vnodes available in memory for caching file
320 elements. Provide a positive integer.
321
322 =item B<-vc> <I<volume cachesize>>
323
324 Sets the number of volumes the File Server can cache in memory.  Provide a
325 positive integer.
326
327 =item B<-w> <I<call back wait interval>>
328
329 Sets the interval at which the daemon spawned by the File Server performs
330 its maintenance tasks. Do not use this argument; changing the default
331 value can cause unpredictable behavior.
332
333 =item B<-cb> <I<number of callbacks>>
334
335 Sets the number of callbacks the File Server can track. Provide a positive
336 integer.
337
338 =item B<-banner>
339
340 Prints the following banner to F</dev/console> about every 10 minutes.
341
342    File Server is running at I<time>.
343
344 =item B<-novbc>
345
346 Prevents the File Server from breaking the callbacks that Cache Managers
347 hold on a volume that the File Server is reattaching after the volume was
348 offline (as a result of the B<vos restore> command, for example). Use of
349 this flag is strongly discouraged.
350
351 =item B<-implicit> <I<admin mode bits>>
352
353 Defines the set of permissions granted by default to the
354 system:administrators group on the ACL of every directory in a volume
355 stored on the file server machine. Provide one or more of the standard
356 permission letters (C<rlidwka>) and auxiliary permission letters
357 (C<ABCDEFGH>), or one of the shorthand notations for groups of permissions
358 (C<all>, C<none>, C<read>, and C<write>). To review the meaning of the
359 permissions, see the B<fs setacl> reference page.
360
361 =item B<-readonly>
362
363 Don't allow writes to this fileserver.
364
365 =item B<-hr> <I<number of hours between refreshing the host cps>>
366
367 Specifies how often the File Server refreshes its knowledge of the
368 machines that belong to protection groups (refreshes the host CPSs for
369 machines). The File Server must update this information to enable users
370 from machines recently added to protection groups to access data for which
371 those machines now have the necessary ACL permissions.
372
373 =item B<-busyat> <I<< redirect clients when queue > n >>>
374
375 Defines the number of incoming RPCs that can be waiting for a response
376 from the File Server before the File Server returns the error code
377 C<VBUSY> to the Cache Manager that sent the latest RPC. In response, the
378 Cache Manager retransmits the RPC after a delay. This argument prevents
379 the accumulation of so many waiting RPCs that the File Server can never
380 process them all. Provide a positive integer.  The default value is
381 C<600>.
382
383 =item B<-rxpck> <I<number of rx extra packets>>
384
385 Controls the number of Rx packets the File Server uses to store data for
386 incoming RPCs that it is currently handling, that are waiting for a
387 response, and for replies that are not yet complete. Provide a positive
388 integer.
389
390 =item B<-rxdbg>
391
392 Writes a trace of the File Server's operations on Rx packets to the file
393 F</usr/afs/logs/rx_dbg>.
394
395 =item B<-rxdbge>
396
397 Writes a trace of the File Server's operations on Rx events (such as
398 retransmissions) to the file F</usr/afs/logs/rx_dbg>.
399
400 =item B<-rxmaxmtu> <I<bytes>>
401
402 Defines the maximum size of an MTU.  The value must be between the
403 minimum and maximum packet data sizes for Rx.
404
405 =item B<-jumbo>
406
407 Allows the server to send and receive jumbograms. A jumbogram is
408 a large-size packet composed of 2 to 4 normal Rx data packets that share
409 the same header. The fileserver does not use jumbograms by default, as some
410 routers are not capable of properly breaking the jumbogram into smaller
411 packets and reassembling them.
412
413 =item B<-nojumbo>
414
415 Deprecated; jumbograms are disabled by default.
416
417 =item B<-rxbind>
418
419 Force the fileserver to only bind to one IP address.
420
421 =item B<-allow-dotted-principals>
422
423 By default, the RXKAD security layer will disallow access by Kerberos
424 principals with a dot in the first component of their name. This is to avoid
425 the confusion where principals user/admin and user.admin are both mapped to the
426 user.admin PTS entry. Sites whose Kerberos realms don't have these collisions 
427 between principal names may disable this check by starting the server
428 with this option.
429
430 =item B<-L>
431
432 Sets values for many arguments in a manner suitable for a large file
433 server machine. Combine this flag with any option except the B<-S> flag;
434 omit both flags to set values suitable for a medium-sized file server
435 machine.
436
437 =item B<-S>
438
439 Sets values for many arguments in a manner suitable for a small file
440 server machine. Combine this flag with any option except the B<-L> flag;
441 omit both flags to set values suitable for a medium-sized file server
442 machine.
443
444 =item B<-k> <I<stack size>>
445
446 Sets the LWP stack size in units of 1 kilobyte. Do not use this argument,
447 and in particular do not specify a value less than the default of C<24>.
448
449 =item B<-realm> <I<Kerberos realm name>>
450
451 Defines the Kerberos realm name for the File Server to use. If this
452 argument is not provided, it uses the realm name corresponding to the cell
453 listed in the local F</usr/afs/etc/ThisCell> file.
454
455 =item B<-udpsize> <I<size of socket buffer in bytes>>
456
457 Sets the size of the UDP buffer, which is 64 KB by default. Provide a
458 positive integer, preferably larger than the default.
459
460 =item B<-sendsize> <I<size of send buffer in bytes>>
461
462 Sets the size of the send buffer, which is 16384 bytes by default.
463
464 =item B<-abortthreshold> <I<abort threshold>>
465
466 Sets the abort threshold, which is triggered when an AFS client sends
467 a number of FetchStatus requests in a row and all of them fail due to
468 access control or some other error. When the abort threshold is
469 reached, the file server starts to slow down the responses to the
470 problem client in order to reduce the load on the file server.
471
472 The throttling behaviour can cause issues especially for some versions
473 of the Windows OpenAFS client. When using Windows Explorer to navigate
474 the AFS directory tree, directories with only "look" access for the
475 current user may load more slowly because of the throttling. This is
476 because the Windows OpenAFS client sends FetchStatus calls one at a
477 time instead of in bulk like the Unix Open AFS client.
478
479 Setting the threshold to 0 disables the throttling behavior. This
480 option is available in OpenAFS versions 1.4.1 and later.
481
482 =item B<-enable_peer_stats>
483
484 Activates the collection of Rx statistics and allocates memory for their
485 storage. For each connection with a specific UDP port on another machine,
486 a separate record is kept for each type of RPC (FetchFile, GetStatus, and
487 so on) sent or received. To display or otherwise access the records, use
488 the Rx Monitoring API.
489
490 =item B<-enable_process_stats>
491
492 Activates the collection of Rx statistics and allocates memory for their
493 storage. A separate record is kept for each type of RPC (FetchFile,
494 GetStatus, and so on) sent or received, aggregated over all connections to
495 other machines. To display or otherwise access the records, use the Rx
496 Monitoring API.
497
498 =item B<-syslog [<loglevel>]
499
500 Use syslog instead of the normal logging location for the fileserver
501 process.  If provided, log messages are at <loglevel> instead of the
502 default LOG_USER.
503
504 =item B<-mrafslogs>
505
506 Use MR-AFS (Multi-Resident) style logging.  This option is deprecated.
507
508 =item B<-saneacls>
509
510 Offer the SANEACLS capability for the fileserver.  This option is
511 currently unimplemented.
512
513 =item B<-help>
514
515 Prints the online help for this command. All other valid options are
516 ignored.
517
518 =item B<-fs-state-dont-save>
519
520 When present, fileserver state will not be saved during shutdown.  Default
521 is to save state.
522
523 This option is only supported by the demand-attach file server.
524
525 =item B<-fs-state-dont-restore>
526
527 When present, fileserver state will not be restored during startup.
528 Default is to restore state on startup.
529
530 This option is only supported by the demand-attach file server.
531
532 =item B<-fs-state-verify> (none | save | restore | both)
533
534 This argument controls the behavior of the state verification mechanism.
535 A value of C<none> turns off all verification.  A value of C<save> only
536 performs the verification steps prior to saving state to disk.  A value
537 of C<restore> only performs the verification steps after restoring state
538 from disk.  A value of C<both> performs all verifications steps both
539 prior to save and following a restore.
540
541 The default is C<both>.
542
543 This option is only supported by the demand-attach file server.
544
545 =item B<-vhashsize <I<size>>
546
547 The log(2) number of of volume hash buckets.  Default is 8 (i.e., by
548 default, there are 2^8 = 256 volume hash buckets).
549
550 This option is only supported by the demand-attach file server.
551
552 =item B<-vlruthresh <I<minutes>>
553
554 The number of minutes of inactivity before a volume is eligible for soft
555 detachment.  Default is 120 minutes.
556
557 This option is only supported by the demand-attach file server.
558
559 =item B<-vlruinterval <I<seconds>>
560
561 The number of seconds between VLRU candidate queue scan.  The default is
562 120 seconds.
563
564 This option is only supported by the demand-attach file server.
565
566 =item B<-vlrumax <I<positive integer>>
567
568 The maximum number of volumes which can be soft detached in a single pass
569 of the scanner.  Default is 8 volumes.
570
571 This option is only supported by the demand-attach file server.
572
573 =item B<-vattachpar> <I<number of volume attach threads>>
574
575 The number of threads assigned to attach and detach volumes.  The default
576 is 1.  Warning: many of the I/O parallism features of Demand-Attach
577 Fileserver are turned off when the number of volume attach threads is only
578 1.
579
580 This option is only meaningful for a file server built with pthreads
581 support.
582
583 =item B<-m> <I<min percentage spare in partition>>
584
585 Specifies the percentage of each AFS server partition that the AIX version
586 of the File Server creates as a reserve. Specify an integer value between
587 C<0> and C<30>; the default is 8%. A value of C<0> means that the
588 partition can become completely full, which can have serious negative
589 consequences.  This option is not supported on platforms other than AIX.
590
591 =item B<-lock>
592
593 Prevents any portion of the fileserver binary from being paged (swapped)
594 out of memory on a file server machine running the IRIX operating system.
595 This option is not supported on platforms other than IRIX.
596
597 =back
598
599 =head1 EXAMPLES
600
601 The following B<bos create> command creates an fs process on the file
602 server machine C<fs2.abc.com> that uses the large configuration size, and
603 allows volumes to exceed their quota by 10%. Type the command on a single
604 line:
605
606    % bos create -server fs2.abc.com -instance fs -type fs \
607                 -cmd "/usr/afs/bin/fileserver -pctspare 10 \
608                 -L" /usr/afs/bin/volserver /usr/afs/bin/salvager
609
610
611 =head1 TROUBLESHOOTING
612
613 Sending process signals to the File Server Process can change its
614 behavior in the following ways:
615
616   Process          Signal       OS     Result
617   ---------------------------------------------------------------------
618
619   File Server      XCPU        Unix    Prints a list of client IP
620                                        Addresses.
621
622   File Server      USR2      Windows   Prints a list of client IP
623                                        Addresses.
624
625   File Server      POLL        HPUX    Prints a list of client IP
626                                        Addresses.
627
628   Any server       TSTP        Any     Increases Debug level by a power
629                                        of 5 -- 1,5,25,125, etc.
630                                        This has the same effect as the
631                                        -d XXX command-line option.
632
633   Any Server       HUP         Any     Resets Debug level to 0
634
635   File Server      TERM        Any     Run minor instrumentation over
636                                        the list of descriptors.
637
638   Other Servers    TERM        Any     Causes the process to quit.
639
640   File Server      QUIT        Any     Causes the File Server to Quit.
641                                        Bos Server knows this.
642
643 The basic metric of whether an AFS file server is doing well is the number
644 of connections waiting for a thread,
645 which can be found by running the following command:
646
647    % rxdebug <server> | grep waiting_for | wc -l
648
649 Each line returned by C<rxdebug> that contains the text "waiting_for"
650 represents a connection that's waiting for a file server thread.
651
652 If the blocked connection count is ever above 0, the server is having
653 problems replying to clients in a timely fashion.  If it gets above 10,
654 roughly, there will be noticable slowness by the user.  The total number of
655 connections is a mostly irrelevant number that goes essentially
656 monotonically for as long as the server has been running and then goes back
657 down to zero when it's restarted.
658
659 The most common cause of blocked connections rising on a server is some
660 process somewhere performing an abnormal number of accesses to that server
661 and its volumes.  If multiple servers have a blocked connection count, the
662 most likely explanation is that there is a volume replicated between those
663 servers that is absorbing an abnormally high access rate.
664
665 To get an access count on all the volumes on a server, run:
666
667    % vos listvol <server> -long
668
669 and save the output in a file.  The results will look like a bunch of B<vos
670 examine> output for each volume on the server.  Look for lines like:
671
672    40065 accesses in the past day (i.e., vnode references)
673
674 and look for volumes with an abnormally high number of accesses.  Anything
675 over 10,000 is fairly high, but some volumes like root.cell and other
676 volumes close to the root of the cell will have that many hits routinely.
677 Anything over 100,000 is generally abnormally high.  The count resets about
678 once a day.
679
680 Another approach that can be used to narrow the possibilities for a
681 replicated volume, when multiple servers are having trouble, is to find all
682 replicated volumes for that server.  Run:
683
684    % vos listvldb -server <server>
685
686 where <server> is one of the servers having problems to refresh the VLDB
687 cache, and then run:
688
689    % vos listvldb -server <server> -part <partition>
690
691 to get a list of all volumes on that server and partition, including every
692 other server with replicas.
693
694 Once the volume causing the problem has been identified, the best way to
695 deal with the problem is to move that volume to another server with a low
696 load or to stop any runaway programs that are accessing that volume
697 unnecessarily.  Often the volume will be enough information to tell what's
698 going on.
699
700 If you still need additional information about who's hitting that server,
701 sometimes you can guess at that information from the failed callbacks in the
702 F<FileLog> log in F</var/log/afs> on the server, or from the output of:
703
704    % /usr/afsws/etc/rxdebug <server> -rxstats
705
706 but the best way is to turn on debugging output from the file server.
707 (Warning: This generates a lot of output into FileLog on the AFS server.)
708 To do this, log on to the AFS server, find the PID of the fileserver
709 process, and do:
710
711     kill -TSTP <pid>
712
713 where <pid> is the PID of the file server process.  This will raise the
714 debugging level so that you'll start seeing what people are actually doing
715 on the server.  You can do this up to three more times to get even more
716 output if needed.  To reset the debugging level back to normal, use (The
717 following command will NOT terminate the file server):
718
719     kill -HUP <pid>
720
721 The debugging setting on the File Server should be reset back to normal when
722 debugging is no longer needed.  Otherwise, the AFS server may well fill its
723 disks with debugging output.
724
725 The lines of the debugging output that are most useful for debugging load
726 problems are:
727
728     SAFS_FetchStatus,  Fid = 2003828163.77154.82248, Host 171.64.15.76
729     SRXAFS_FetchData, Fid = 2003828163.77154.82248
730
731 (The example above is partly truncated to highlight the interesting
732 information).  The Fid identifies the volume and inode within the volume;
733 the volume is the first long number.  So, for example, this was:
734
735    % vos examine 2003828163
736    pubsw.matlab61                   2003828163 RW    1040060 K  On-line
737        afssvr5.Stanford.EDU /vicepa 
738        RWrite 2003828163 ROnly 2003828164 Backup 2003828165 
739        MaxQuota    3000000 K 
740        Creation    Mon Aug  6 16:40:55 2001
741        Last Update Tue Jul 30 19:00:25 2002
742        86181 accesses in the past day (i.e., vnode references)
743
744        RWrite: 2003828163    ROnly: 2003828164    Backup: 2003828165
745        number of sites -> 3
746           server afssvr5.Stanford.EDU partition /vicepa RW Site 
747           server afssvr11.Stanford.EDU partition /vicepd RO Site 
748           server afssvr5.Stanford.EDU partition /vicepa RO Site 
749
750 and from the Host information one can tell what system is accessing that
751 volume.
752
753 Note that the output of L<vos_examine(1)> also includes the access count, so
754 once the problem has been identified, vos examine can be used to see if the
755 access count is still increasing.  Also remember that you can run vos
756 examine on the read-only replica (e.g., pubsw.matlab61.readonly) to see the
757 access counts on the read-only replica on all of the servers that it's
758 located on.
759
760 =head1 PRIVILEGE REQUIRED
761
762 The issuer must be logged in as the superuser C<root> on a file server
763 machine to issue the command at a command shell prompt.  It is conventional
764 instead to create and start the process by issuing the B<bos create>
765 command.
766
767 =head1 SEE ALSO
768
769 L<BosConfig(5)>,
770 L<FileLog(5)>,
771 L<bos_create(8)>,
772 L<bos_getlog(8)>,
773 L<fs_setacl(1)>,
774 L<msgget(2)>,
775 L<msgrcv(2)>,
776 L<salvager(8)>,
777 L<volserver(8)>,
778 L<vos_examine(1)>
779
780 =head1 COPYRIGHT
781
782 IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.
783
784 This documentation is covered by the IBM Public License Version 1.0.  It was
785 converted from HTML to POD by software written by Chas Williams and Russ
786 Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.