fs getserverprefs          AFS Commands       fs getserverprefs


NAME

   fs  getserverprefs -- display  Cache  Manager's preferences

                       for file server machines.


   fs getserverprefs  [-file <dir/file path>]  [-numeric]
   [-help]

ACCEPTABLE ABBREVIATIONS/ALIASES

   fs gets  [-f <dir/file path>]  [-n]  [-h]

   fs gp  [-f <dir/file path>]  [-n]  [-h]

DESCRIPTION

   Displays the Cache Manager's  preferences  for  file  server
   machines.    A preference consists of the name or IP address
   of a file server machine followed by its "rank."   The  rank
   is a positive integer in the range from 1 to 65,534.

   A  file server machine's rank determines the Cache Manager's
   preference for selecting it  when  the  Cache  Manager  must
   access  a  ReadOnly  replica  that resides on it.  The Cache
   Manager compares the rank of the  server  machine  with  the
   ranks  of  other server machines that house the replica.  It
   then attempts to access the replica on  the  server  machine
   that has the lowest integer rank.

   If  it  cannot  access  the  replica on the machine with the
   lowest rank (possibly because the machine or the network  on
   which  the  machine  is  located is down), the Cache Manager
   attempts to access the replica from the server machine  with
   the  next lowest rank.  It continues in this manner until it
   either accesses the replica or determines that  all  of  the
   file  server  machines  on  which  the  replica  resides are
   unavailable.

   The Cache Manager records addresses and ranks for all  local
   file  server  machines.  It also records addresses and ranks
   for all foreign file server machines that house a volume  it
   has accessed or for which a rank has been specified with the
   fs setserverprefs command.   It  stores  the  addresses  and
   ranks in the kernel of the client machine.

   Information displayed with this command is sent to stdout by
   default.  The -file switch can be used to direct the  output
   to a file.



ARGUMENTS

   -file           specifies  the  pathname  of a file to which
                   the file server machine names and ranks  are
                   to  be written.  Omit this switch to display
                   the machine names and ranks on stdout.

   -numeric        specifies that the IP addresses of the  file
                   server  machines  are to be displayed.  Omit
                   this flag to display the names of  the  file
                   server  machines.    Because  including this
                   flag skips the resolution of IP addresses to
                   machine names, information is displayed more
                   quickly  than  if  the  option  is  omitted.
                   (This  flag  is  especially  useful  if  the
                   output is intended to be used  as  input  to
                   the fs setserverprefs command, in which case
                   it  does  not  matter   whether   names   or
                   addresses are used.)

   -help           prints   the  online  help  entry  for  this
                   command.  Do not provide any other arguments
                   or  flags with this one.  See section 3.1 in
                   the Reference Manual for more details.

OUTPUT

   The output displays a separate line  for  each  file  server
   machine  that  has  a  rank  in the kernel of the machine on
   which the command is issued.  Each line displays the name of
   a file server machine followed by its rank, as follows:

       first machine name            rank
       second machine name           rank
         .  .  .  .                  . .

   If  the  -numeric  flag  is  included  with the command, the
   output displays the IP addresses of the file server machines
   instead  of  their  names.  The address of a machine is also
   displayed if the Cache Manager cannot resolve a file  server
   machine's  name  based  on the machine's address at the time
   the command is issued.

EXAMPLES

   The following displays the preferences  (the  list  of  file
   server  machines and their respective ranks) associated with
   a Cache Manager.  The output in the  example  truncates  the
   complete  list of server machine names and ranks.  Note that
   the IP addresses,  not  the  names,  of  some  machines  are
   displayed because their addresses cannot be resolved.



       % fs gets
       fs5.transarc.com              20000
       fs1.transarc.com              40000
       fs3.transarc.com              20001
       fs4.transarc.com              40001
       fs2.transarc.com              25000
       121.86.3.37                   40002
       fserver1.andrew.cmu.edu       40000
       121.86.3.34                   40001
       server1.athena.mit.edu        1000
          .   .   .   .   .           . .

   The following displays the same Cache Manager's preferences,
   but the -numeric flag is included to  display  only  the  IP
   addresses of the file server machines, not their names.  The
   example output again truncates the complete list  of  server
   machine names and ranks.

       % fs gets -n
       128.21.6.214                  20000
       128.2.11.9                    40000
       128.2.11.12                   20001
       128.2.11.13                   40001
       128.2.11.11                   25000
       121.86.3.37                   40002
       121.86.3.31                   40000
       121.86.3.34                   40001
       145.2.50.121                  1000
         .  .  .                      . .

PRIVILEGE REQUIRED

   None.

MORE INFORMATION

   fs setserverprefs
