NAME

afsd - Initializes the Cache Manager and starts related daemons

SYNOPSIS

afsd [-blocks <1024 byte blocks in cache>] [-files <files in cache>] [-rootvol <name of AFS root volume>] [-stat <number of stat entries>] [-memcache] [-cachedir <cache directory>] [-mountdir <mount location>] [-daemons <number of daemons to use>] [-nosettime] [-verbose] [-rmtsys] [-debug] [-chunksize <log(2) of chunk size>] [-dcache <number of dcache entries>] [-volumes <number of volume entries>] [-biods <number of bkg I/O daemons (aix vm)>] [-prealloc <number of 'small' preallocated blocks>] [-confdir <configuration directory>] [-logfile <Place to keep the CM log>] [-waitclose] [-shutdown] [-enable_peer_stats] [-enable_process_stats] [-help]

DESCRIPTION

The afsd command initializes the Cache Manager on an AFS client machine by transferring AFS-related configuration information into kernel memory and starting several daemons. More specifically, the afsd command performs the following actions:

In addition to setting cache configuration parameters, the afsd program starts the following daemons. (On most system types, these daemons appear as nameless entries in the output of the UNIX ps command.)

This command does not use the syntax conventions of the AFS command suites. Provide the command name and all option names in full.

CAUTIONS

Do not use the -shutdown parameter. It does not shutdown the Cache Manager effectively. Instead, halt Cache Manager activity by using the standard UNIX umount command to unmount the AFS root directory (by convention, /afs). The machine must then be rebooted to reinitialize the Cache Manager.

OPTIONS

-blocks <blocks in cache>

Specifies the number of kilobyte blocks to be made available for caching in the machine's cache directory (for a disk cache) or memory (for a memory cache), overriding the default defined in the third field of the /usr/vice/etc/cacheinfo file. For a disk cache, the value cannot exceed 95% of the space available in the cache partition. If using a memory cache, do not combine this argument with the -dcache argument, since doing so can possibly result in a chunk size that is not an exponent of 2.

-files <files in cache>

Specifies the number of Vn files to create in the cache directory for a disk cache, overriding the default that is calculated as described in DESCRIPTION. Each Vn file accommodates a chunk of data, and can grow to a maximum size of 64 KB by default. Do not combine this argument with the -memcache argument.

-rootvol <name of AFS root volume>

Names the read/write volume corresponding to the root directory for the AFS file tree (which is usually the /afs directory). This value overrides the default of the root.afs volume.

-stat <number of stat entries>

Specifies the number of entries to allocate in the machine's memory for recording status information about the AFS files in the cache. This value overrides the default of 300.

-memcache

Initializes a memory cache rather than a disk cache. Do not combine this flag with the -files argument.

-cachedir <cache directory>

Names the local disk directory to be used as the cache. This value overrides the default defined in the second field of the /usr/vice/etc/cacheinfo file.

-mountdir <mount location>

Names the local disk directory on which to mount the root of the AFS filespace. This value overrides the default defined in the first field of the /usr/vice/etc/cacheinfo file. If a value other than the /afs directory is used, the machine cannot access the filespace of cells that do use that value.

-daemons <number of daemons to use>

Specifies the number of background daemons to run on the machine. These daemons improve efficiency by doing prefetching and background writing of saved data. This value overrides the default of 2, which is adequate for a machine serving up to five users. Values greater than 6 are not generally more effective than 6.

Note: On AIX machines with integrated virtual memory (VM), the number of VM daemons is set to twice the value of this argument, if it is provided and the -biods argument is not. If both arguments are omitted, there are five VM daemons.

-nosettime

Prevents the Cache Manager from synchronizing its clock with the clock on a server machine selected at random, by checking the time on the server machine every five minutes. Use this flag only on a machine that is already using another time synchronization protocol (for example, a server machine that is running the runntp process).

-verbose

Generates a detailed trace of the afsd program's actions on the standard output stream.

-rmtsys

Initializes an additional daemon to execute AFS-specific system calls on behalf of NFS client machines. Use this flag only if the machine is an NFS/AFS translator machine serving users of NFS client machines who execute AFS commands.

-debug

Generates a highly detailed trace of the afsd program's actions on the standard output stream. The information is useful mostly for debugging purposes.

-chunksize <chunk size>

Sets the size of each cache chunk. The integer provided, which must be from the range 0 to 30, is used as an exponent on the number 2. It overrides the default of 16 for a disk cache (2^16 is 64 KB) and 13 for a memory cache (2^13 is 8 KB). A value of 0 or less, or greater than 30, sets chunk size to the appropriate default. Values less than 10 (which sets chunk size to a 1 KB) are not recommended. Combining this argument with the -dcache argument is not recommended because it requires that the issuer calculate the cache size that results.

-dcache <number of dcache entries>

Sets the number of dcache entries in memory, which are used to store information about cache chunks. For a disk cache, this overrides the default, which is 50% of the number of Vn files (cache chunks). For a memory cache, this argument effectively sets the number of cache chunks, but its use is not recommended, because it requires the issuer to calculate the resulting total cache size (derived by multiplying this value by the chunk size). Do not combine this argument with the -blocks argument, since doing so can possibly result in a chunk size that is not an exponent of 2.

-volumes <number of volume entries>

Specifies the number of memory structures to allocate for storing volume location information. The default value is 50.

-biods <number of I/O daemons>

Sets the number of VM daemons dedicated to performing I/O operations on a machine running a version of AIX with virtual memory (VM) integration. If both this argument and the -daemons argument are omitted, the default is five. If this argument is omitted but the -daemons argument is provided, the number of VM daemons is set to twice the value of the -daemons argument.

-prealloc <number of preallocated blocks>

Specifies the number of pieces of memory to preallocate for the Cache Manager's internal use. The default initial value is 400, but the Cache Manager dynamically allocates more memory as it needs it.

-confdir <configuration directory>

Names a directory other than the /usr/vice/etc directory from which to fetch the cacheinfo, ThisCell, and CellServDB configuration files.

-logfile <log file location>

Is obsolete and has no real effect. It specifies an alternate file in which to record a type of trace that the Cache Manager no longer generates; the default value is /usr/vice/etc/AFSLog.

-waitclose

Has no effect on the operation of the Cache Manager. The behavior it affected in previous versions of the Cache Manager, to perform synchronous writes to the File Server, is now the default behavior. To perform asynchronous writes in certain cases, use the fs storebehind command.

-shutdown

Shuts down the Cache Manager, but not in the most effective possible way. Do not use this flag.

-enable_peer_stats

Activates the collection of Rx statistics and allocates memory for their storage. For each connection with a specific UDP port on another machine, a separate record is kept for each type of RPC (FetchFile, GetStatus, and so on) sent or received. To display or otherwise access the records, use the Rx Monitoring API.

-enable_process_stats

Activates the collection of Rx statistics and allocates memory for their storage. A separate record is kept for each type of RPC (FetchFile, GetStatus, and so on) sent or received, aggregated over all connections to other machines. To display or otherwise access the records, use the Rx Monitoring API.

-help

Prints the online help for this command. All other valid options are ignored.

EXAMPLES

The afsd command is normally included in the machine's AFS initialization file, rather than typed at the command shell prompt. For most disk caches, the appropriate form is

   /usr/vice/etc/afsd

The following command is appropriate when enabling a machine to act as an NFS/AFS Translator machine serving more than five users.

   /usr/vice/etc/afsd -daemons 4 -rmtsys

The following command initializes a memory cache and sets chunk size to 16 KB (2^14).

   /usr/vice/etc/afsd -memcache -chunksize 14

PRIVILEGE REQUIRED

The issuer must be logged in as the local superuser root.

SEE ALSO

afs_cache(5), CellServDB(5), cacheinfo(5)

COPYRIGHT

IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.

This documentation is covered by the IBM Public License Version 1.0. It was converted from HTML to POD by software written by Chas Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.