3 afsd - Initializes the Cache Manager and starts related daemons.
7 B<afsd> [-blocks <I<1024 byte blocks in cache>>]
8 [B<-files> <I<files in cache>>]
9 [-rootvol <I<name of AFS root volume>>]
10 [-stat <I<number of stat entries>>]
11 [B<-memcache>] [-cachedir <I<cache directory>>]
12 [-mountdir <I<mount location>>]
13 [-daemons <I<number of daemons to use>>]
14 [B<-nosettime>] [B<-verbose>] [B<-rmtsys>] [-debug]
15 [-chunksize <I<log(2) of chunk size>>]
16 [-dcache <I<number of dcache entries>>]
17 [-volumes <I<number of volume entries>>]
18 [-biods <I<number of bkg I/O daemons (aix vm)>>]
19 [-prealloc <I<number of 'small' preallocated blocks>>]
20 [-confdir <I<configuration directory>>]
21 [-logfile <I<Place to keep the CM log>>]
22 [B<-waitclose>] [B<-shutdown>] [-enable_peer_stats]
23 [B<-enable_process_stats>] [-help]
25 This command does not use the syntax conventions of the AFS command
26 suites. Provide the command name and all option names in full.
30 The afsd command initializes the Cache Manager on an AFS client
31 machine by transferring AFS-related configuration information into kernel
32 memory and starting several daemons. More specifically, the
33 B<afsd> command performs the following actions:
39 Sets a field in kernel memory that defines the machine's cell
40 membership. Some Cache Manager-internal operations and system calls
41 consult this field to learn which cell to execute in. (The AFS command
42 interpreters refer to the B</usr/vice/etc/ThisCell> file
43 instead.) This information is transferred into the kernel from the
44 B</usr/vice/etc/ThisCell> file and cannot be changed until the
45 B<afsd> program runs again.
50 Places in kernel memory the names and Internet addresses of the database
51 server machines in the local cell and (optionally) foreign cells. The
52 appearance of a cell's database server machines in this list enables the
53 Cache Manager to contact them and to access files in the cell. Omission
54 of a cell from this list, or incorrect information about its database server
55 machines, prevents the Cache Manager from accessing files in it.
58 The list of database server machines is transferred into the kernel from
59 the B</usr/vice/etc/CellServDB> file. After initialization, use
60 the B<fs newcell> command to change the kernel-resident list without
65 Mounts the root of the AFS filespace on a directory on the machine's
66 local disk, according to either the first field in the
67 B</usr/vice/etc/cacheinfo> file (the default) or the B<afsd>
68 command's B<-mountdir> argument. The conventional value is
74 Determines which volume to mount at the root of the AFS file tree.
75 The default is the volume B<root.afs>; use the
76 B<-rootvol> argument to override it. Although the base
77 (read/write) form of the volume name is the appropriate value, the Cache
78 Manager has a bias for accessing the read-only version of the volume (by
79 convention, B<root.afs.readonly>) if it is
85 Configures the cache on disk (the default) or in machine memory if the
86 B<-memcache> argument is provided. In the latter case, the
87 B<afsd> program allocates space in machine memory for caching, and the
88 Cache Manager uses no disk space for caching even if the machine has a
94 Defines the name of the local disk directory devoted to caching, when the
95 B<-memcache> argument is not used. If necessary, the
96 B<afsd> program creates the directory (its parent directory must
97 already exist). It does not remove the directory that formerly served
98 this function, if one exists.
101 The second field in the /usr/vice/etc/cacheinfo file is the
102 source for this name, and the standard value is the B</usr/vice/cache>
103 directory. Use the B<-cachedir> argument to override the value
104 in the B<cacheinfo> file.
108 Sets the size of the cache. The default source for the value is the
109 third field in the B</usr/vice/etc/cacheinfo> file, which specifies a
113 For a memory cache, the following arguments to the afsd command
114 override the value in the B<cacheinfo> file:
120 The -blocks argument, to specify a different number of kilobyte
126 The B<-dcache> and -chunksize arguments together, to
127 set both the number of dcache entries and the chunk size (see below for
128 definition of these parameters). In this case, the B<afsd>
129 program derives cache size by multiplying the two values. Using this
130 combination is not recommended, as it requires the issuer to perform the
131 calculation beforehand to determine the resulting cache size.
136 The -dcache argument by itself. In this case, the
137 B<afsd> program derives cache size by multiplying the value specified
138 by the B<-dcache> argument by the default memory cache chunk size of
139 eight kilobytes. Using this argument is not recommended, as it requires
140 the issuer to perform the calculation beforehand to determine the resulting
146 For satisfactory memory cache performance, the specified value must leave
147 enough memory free to accommodate all other processes and commands that can
148 run on the machine. If the value exceeds the amount of memory
149 available, the B<afsd> program exits without initializing the Cache
150 Manager and produces the following message on the standard output
153 afsd: memCache allocation failure at I<number> KB
155 where I<number> is how many kilobytes were allocated just before the
158 For a disk cache, use the -blocks argument to the
159 B<afsd> command to override the value in the B<cacheinfo>
160 file. The value specified in either way sets an absolute upper limit on
161 cache size; values provided for other arguments (such as
162 B<-dcache> and B<-chunksize>) never result in a larger
163 cache. The B<afsd> program rejects any setting larger than 95%
164 of the partition size, and exits after generating an error message on the
165 standard output stream, because the cache implementation itself requires a
166 small amount of disk space and overfilling the partition can cause the client
169 To change the size of a disk cache after initialization without rebooting,
170 use the B<fs setcachesize> command; the setting persists until
171 the B<afsd> command runs again or the B<fs setcachesize>
172 command is reissued. The B<fs setcachesize> command does not
173 work for memory caches.
177 Sets the size of each cache I<chunk>, and by implication the amount
178 of data that the Cache Manager requests at a time from the File Server (how
179 much data per fetch RPC, since AFS uses partial file transfer).
182 For a disk cache, a chunk is a VI<n> file and this
183 parameter sets the maximum size to which each one can expand; the default
184 is 64 KB. For a memory cache, each chunk is a collection of contiguous
185 memory blocks; the default is size is 8 KB.
187 To override the default chunk size for either type of cache, use the
188 B<-chunksize> argument to provide an integer to be used as an exponent
189 of two; see the B<Options> section for details. For a
190 memory cache, if total cache size divided by chunk size leaves a remainder,
191 the B<afsd> program rounds down the number of dcache entries,
192 resulting in a slightly smaller cache.
196 Sets the number of chunks in the cache. For a memory cache, the
197 number of chunks is equal to the cache size divided by the chunk size.
198 For a disk cache, the number of chunks (B<V>I<n> files) is set
199 to the largest of the following unless the B<-files> argument is used
200 to set the value explicitly:
212 1.5 times the result of dividing cache size by chunk size
213 (I<cachesize>/I<chunksize> * 1.5)
218 The result of dividing cachesize by 10 KB (I<cachesize>/10240)
225 Sets the number of I<dcache entries> allocated in machine memory for
226 storing information about the chunks in the cache.
229 For a disk cache, the /usr/vice/cache/CacheItems file contains
230 one entry for each B<V>I<n> file. By default, one half
231 the number of these entries (but not more that 2,000) are duplicated as dcache
232 entries in machine memory for quicker access.
234 For a memory cache, there is no CacheItems file so all
235 information about cache chunks must be in memory as dcache entries.
236 Thus, there is no default number of dcache entries for a memory cache;
237 instead, the B<afsd> program derives it by dividing the cache size by
240 To set the number of dcache entries, use the -dcache
241 argument; the specified value can exceed the default limit of
242 2,000. Using this argument is not recommended for either type of
243 cache. Increasing the number of dcache entries for a disk cache
244 sometimes improves performance (because more entries are retrieved from memory
245 rather than from disk), but only marginally. Using this argument for a
246 memory cache requires the issuer to calculate the cache size by multiplying
247 this value by the chunk size.
251 Sets the number of I<stat> entries available in machine memory for
252 caching status information about cached AFS files. The default is
253 300; use the B<-stat> argument to override the default.
258 Randomly selects a file server machine in the local cell as the source for
259 the correct time. Every five minutes thereafter, the local clock is
260 adjusted (if necessary) to match the file server machine's clock.
263 Use the B<-nosettime> flag to prevent the afsd command
264 from selecting a time standard. This is recommended only on file server
265 machines that are also acting as clients. File server machines maintain
266 the correct time using the Network Time Protocol Daemon instead.
270 In addition to setting cache configuration parameters, the afsd
271 program starts the following daemons. (On most system types, these
272 daemons appear as nameless entries in the output of the UNIX B<ps>
279 One I<callback> daemon, which handles callbacks. It also
280 responds to the File Server's periodic probes, which check that the
281 client machine is still alive.
286 One I<maintenance> daemon, which performs the following
294 Garbage collects obsolete data (for example, expired tokens) from kernel
305 Refreshes information from read-only volumes once per hour
310 Does delayed writes for NFS clients if the machine is running the NFS/AFS
318 One I<cache-truncation> daemon, which flushes the cache when free
319 space is required, by writing cached data and status information to the File
325 One I<server connection> daemon, which sends a probe to the File
326 Server every few minutes to check that it is still accessible. It also
327 synchronizes the machine's clock with the clock on a randomly-chosen file
328 server machine, unless the B<-nosettime> flag is used. There is
329 always one server connection daemon.
334 One or more I<background> daemons that improve performance by
335 pre-fetching files and performing background (delayed) writes of saved data
339 The default number of background daemons is two, enough to service at least
340 five simultaneous users of the machine. To increase the number, use the
341 B<-daemons> argument. A value greater than six is not generally
346 On some system types, one I<Rx listener> daemon, which listens for
352 On some system types, one I<Rx event> daemon, which reviews the Rx
353 system's queue of tasks and performs them as appropriate. Most
354 items in the queue are retransmissions of failed packets.
359 On machines that run AIX with virtual memory (VM) integration, one or more
360 I<VM> daemons (sometimes called I<I/O> daemons, which transfer
361 data between disk and machine memory. The number of them depends on the
362 setting of the B<-biods> and B<-daemons> arguments:
369 If the -biods argument is used, it sets the number of VM
375 If only the -daemons argument is used, the number of VM daemons
376 is twice the number of background daemons.
381 If neither argument is used, there are five VM daemons.
390 Do not use the -shutdown parameter. It does not shutdown
391 the Cache Manager effectively. Instead, halt Cache Manager activity by
392 using the standard UNIX B<umount> command to unmount the AFS root
393 directory (by convention, B</afs>). The machine must then be
394 rebooted to reinitialize the Cache Manager.
402 Specifies the number of kilobyte blocks to be made available for caching
403 in the machine's cache directory (for a disk cache) or memory (for a
404 memory cache), overriding the default defined in the third field of the
405 B</usr/vice/etc/cacheinfo> file. For a disk cache, the value
406 cannot exceed 95% of the space available in the cache partition. If
407 using a memory cache, do not combine this argument with the B<-dcache>
408 argument, since doing so can possibly result in a chunk size that is not an
413 Specifies the number of VI<n> files to create in the
414 cache directory for a disk cache, overriding the default that is calculated as
415 described in the B<Description> section. Each
416 B<V>I<n> file accommodates a chunk of data, and can grow to a
417 maximum size of 64 KB by default. Do not combine this argument with the
418 B<-memcache> argument.
422 Names the read/write volume corresponding to the root directory for the
423 AFS file tree (which is usually the B</afs> directory). This
424 value overrides the default of the B<root.afs> volume.
428 Specifies the number of entries to allocate in the machine's memory
429 for recording status information about the AFS files in the cache. This
430 value overrides the default of 300.
434 Initializes a memory cache rather than a disk cache. Do not combine
435 this flag with the B<-files> argument.
439 Names the local disk directory to be used as the cache. This value
440 overrides the default defined in the second field of the
441 B</usr/vice/etc/cacheinfo> file.
445 Names the local disk directory on which to mount the root of the AFS
446 filespace. This value overrides the default defined in the first field
447 of the B</usr/vice/etc/cacheinfo> file. If a value other than
448 the B</afs> directory is used, the machine cannot access the filespace
449 of cells that do use that value.
453 Specifies the number of background daemons to run on the machine.
454 These daemons improve efficiency by doing prefetching and background writing
455 of saved data. This value overrides the default of 2, which is adequate
456 for a machine serving up to five users. Values greater than
457 B<6> are not generally more effective than B<6>.
459 Note: On AIX machines with integrated virtual memory (VM),
460 the number of VM daemons is set to twice the value of this argument, if it is
461 provided and the B<-biods> argument is not. If both arguments
462 are omitted, there are five VM daemons.
466 Prevents the Cache Manager from synchronizing its clock with the clock on
467 a server machine selected at random, by checking the time on the server
468 machine every five minutes. Use this flag only on a machine that is
469 already using another time synchronization protocol (for example, a server
470 machine that is running the B<runntp> process).
474 Generates a detailed trace of the afsd program's actions
475 on the standard output stream.
479 Initializes an additional daemon to execute AFS-specific system calls on
480 behalf of NFS client machines. Use this flag only if the machine is an
481 NFS/AFS translator machine serving users of NFS client machines who execute
487 Generates a highly detailed trace of the afsd program's
488 actions on the standard output stream. The information is useful mostly
489 for debugging purposes.
493 Sets the size of each cache chunk. The integer provided, which must
494 be from the range B<0> to B<30>, is used as an exponent on the
495 number 2. It overrides the default of 16 for a disk cache
496 (216 is 64 KB) and 13 for a memory cache (213 is 8
497 KB). A value of B<0> or less, or greater than B<30>,
498 sets chunk size to the appropriate default. Values less than
499 B<10> (which sets chunk size to a 1 KB) are not recommended.
500 Combining this argument with the B<-dcache> argument is not
501 recommended because it requires that the issuer calculate the cache size that
506 Sets the number of dcache entries in memory, which are used to store
507 information about cache chunks. For a disk cache, this overrides the
508 default, which is 50% of the number of B<V>I<n> files (cache
509 chunks). For a memory cache, this argument effectively sets the number
510 of cache chunks, but its use is not recommended, because it requires the
511 issuer to calculate the resulting total cache size (derived by multiplying
512 this value by the chunk size). Do not combine this argument with the
513 B<-blocks> argument, since doing so can possibly result in a chunk
514 size that is not an exponent of 2.
518 Specifies the number of memory structures to allocate for storing volume
519 location information. The default value is 50.
523 Sets the number of VM daemons dedicated to performing I/O operations on a
524 machine running a version of AIX with virtual memory (VM) integration.
525 If both this argument and the B<-daemons> argument are omitted, the
526 default is five. If this argument is omitted but the
527 B<-daemons> argument is provided, the number of VM daemons is set to
528 twice the value of the B<-daemons> argument.
532 Specifies the number of pieces of memory to preallocate for the Cache
533 Manager's internal use. The default initial value is 400, but the
534 Cache Manager dynamically allocates more memory as it needs it.
538 Names a directory other than the /usr/vice/etc directory from
539 which to fetch the B<cacheinfo>, B<ThisCell>, and
540 B<CellServDB> configuration files.
544 Is obsolete and has no real effect. It specifies an alternate file
545 in which to record a type of trace that the Cache Manager no longer
546 generates; the default value is B</usr/vice/etc/AFSLog>.
550 Has no effect on the operation of the Cache Manager. The behavior
551 it affected in previous versions of the Cache Manager, to perform synchronous
552 writes to the File Server, is now the default behavior. To perform
553 asynchronous writes in certain cases, use the B<fs storebehind>
558 Shuts down the Cache Manager, but not in the most effective possible
559 way. Do not use this flag.
561 =item -enable_peer_stats
563 Activates the collection of Rx statistics and allocates memory for their
564 storage. For each connection with a specific UDP port on another
565 machine, a separate record is kept for each type of RPC (FetchFile, GetStatus,
566 and so on) sent or received. To display or otherwise access the
567 records, use the Rx Monitoring API.
569 =item -enable_process_stats
571 Activates the collection of Rx statistics and allocates memory for their
572 storage. A separate record is kept for each type of RPC (FetchFile,
573 GetStatus, and so on) sent or received, aggregated over all connections to
574 other machines. To display or otherwise access the records, use the Rx
579 Prints the online help for this command. All other valid options
586 The afsd command is normally included in the machine's AFS
587 initialization file, rather than typed at the command shell prompt. For
588 most disk caches, the appropriate form is
592 The following command is appropriate when enabling a machine to act as an
593 NFS/AFS Translator machine serving more than five users.
595 /usr/vice/etc/afsd -daemons 4 -rmtsys
597 The following command initializes a memory cache and sets chunk size to 16
600 /usr/vice/etc/afsd -memcache -chunksize 14
602 =head1 PRIVILEGE REQUIRED
604 The issuer must be logged in as the local superuser root.
609 L<CellServDB (client version)(1)>
611 L<ThisCell (client version)(1)>
623 IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.
625 This documentation is covered by the IBM Public License Version 1.0. It was
626 converted from HTML to POD by software written by Chas Williams and Russ
627 Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.