cm getpreferences(8dfs)

Displays the Cache Manager's preferences for File Server or Fileset Location (FL) Server machines

Synopsis

cm getpreferences [-path filename] [-numeric] [-fldb] [-help]

Options

-path filename
Specifies the full pathname of a file to which the command is to write the Cache Manager server preferences that it reports. If the specified file already exists, the command overwrites it. The command fails if the specified pathname names a directory. Omit this option to display the preferences on standard output (stdout).

-numeric
Directs the command to display the IP addresses rather than the host names of the File Servers or FL Servers. Omit this option to display the host name (for example, fs1.abc.com) of each machine.

-fldb
Directs the command to display the host names or IP addresses of the FL Servers and their respective ranks.

-help
Prints the online help for this command. All other valid options specified with this option are ignored.

Description

The cm getpreferences command displays the current set of entries in a Cache Manager preference list. The Cache Manager preference list is created each time a Cache Manager is initialized with the dfsd command (each time the client machine is rebooted). Each Cache Manager maintains its own separate preference list. Each entry in the list consists of the IP address of an FL Server or File Server and an automatically assigned preference value. New entries are automatically added to the preference list as necessary when filesets are first referenced.

In operation, when the Cache Manager needs to contact an FL Server, it consults its list of FL Servers and attempts to contact a server at the address with the lowest-ranking value in the preference list. Similarly, when a Cache Manager needs to contact a File Server, it consults its preference list and contacts a suitable File Server at the address with the lowest-ranking value.

If the Cache Manager cannot access a server at the address with the lowest preference rank (because of a problem with either the machine or the network), the Cache Manager attempts to access a similar server at the address with the next lowest rank. It continues in this way until it either succeeds in accessing an appropriate server or determines that all such servers are unavailable.

By default, the Cache Manager assigns preferences that make sensible choices based on the location of servers. Therefore, you should adjust the default values only if there is a compelling reason. The default values force the Cache Manager to attempt to connect to servers in the following order:

1. The same machine as the client (default rank of 5000).

2. The same subnetwork as the client (default rank of 20000).

3. The same network as the client (default rank of 30000).

4. Different networks (default rank of 40000).

For example, a server on the same machine as the Cache Manager receives a rank of 5000, while a server on the same subnetwork receives a rank of 20000. The entry with the lowest-ranking value has the highest "preference." Thus, a server with a preference value of 5000 will be chosen before a server with a rank of 20000.

Should two servers be assigned the same preference value, such as two File Servers on the same subnetwork both receiving a default value of 20000, the server with the lowest round-trip value is chosen. Each server is assigned a random round-trip value when the Cache Manager is initialized. The assigned round-trip value is always higher than the upper bound for stored actual round-trip values. This ensures that an actual round-trip value will always be chosen over assigned values. The cm getpreferences command does not display the round-trip value.

The cm getpreferences command displays information on standard output by default. Use the -path option to specify the complete pathname of a file to which the command is to write its output. If you include the -path option, the command displays no output on standard output.

Privilege Required

No privileges are required.

Output

The cm getpreferences command displays a separate line of output for each Cache Manager preference list entry. By default, each line consists of the host name of a File Server or FL Server followed by the preference value, as follows:

hostname rank

where hostname is the name of a File Server or FL Server, and rank is the rank associated with the machine. If the -numeric option is included with the command, the command displays the IP address, in dotted decimal format, instead of the machine's name. The command also displays the IP address of any machine whose name it cannot determine (for example, if a network outage prevents it from resolving the address into the name).

Examples

The following command displays the preference list entries associated with the Cache Manager on the local machine. The local machine belongs to the DCE cell named dce.abc.com; the ranks of the File Servers from the dce.abc.com cell are lower than the ranks of the File Servers from the foreign cell, dce.def.com. The command shows the IP addresses, not the names, of two machines from the foreign cell because it cannot currently determine their names.

$ cm getp

fs2.abc.com 20000

fs3.abc.com 30000

fs1.abc.com 20000

fs4.abc.com 30000

server1.def.com 40000

121.86.33.34 40000

server6.def.com 40000

121.86.33.37 40000

The following command displays the same Cache Manager's preference list entries, but the -numeric option is included with the command to display the IP addresses rather than the host names of all File Servers. The IP address of the local machine is 128.21.16.221. The two File Servers on the same subnetwork as the local machine have a rank of 20000; the two File Servers on a different subnetwork in the same network as the local machine have a rank of 30000; the remaining File Servers are in a different network, so they have a rank of 40000. The round-trip value for each preference list entry (used to select a connection when multiple entries have the same rank) is not displayed by the command.

$ cm getp -n

128.21.16.214 20000

128.21.18.99 30000

128.21.16.212 20000

128.21.18.100 30000

121.86.33.41 40000

121.86.33.34 40000

121.86.33.36 40000

121.86.33.37 40000

Related Information

Commands:

cm setpreferences(8dfs)