The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

rxdebug - Provides debugging trace of Rx activity

SYNOPSIS

  use AFS::Monitor qw(rxdebug);

  my $rxd = rxdebug(version => 1,
                    servers => 'hostname',
                   );
  print "AFS build level of $rxd->{address} port $rxd->{port} is:";
  print $rxd->{version};

  $rxd = rxdebug(rxstats => 1,
                 noconns => 1,
                 servers => 'hostname',
                 port    => 7001,
                );

  $rxd = rxdebug(noconns  => 1,
                 peers    => 1,
                 long     => 1,
                 servers  => 'hostname',
                 port     => 7001,
                );

  $rxd = rxdebug(allconnections => 1,
                 servers        => 'hostname',
                 port           => 7002,
                );

  $rxd = rxdebug(nodally      => 1,
                 onlyserver   => 1,
                 onlyhost     => 'host2',
                 servers      => 'hostname',
                 port         => 7001,
                );

  $rxd = rxdebug(onlyclient   => 1,
                 onlyport     => 7002,
                 onlyauth     => 'crypt',
                 servers      => 'hostname',
                 port         => 7001,
                );

DESCRIPTION

The rxdebug function provides a trace of Rx activity for the server or client machine named by the servers argument. Rx is AFS's proprietary remote procedure call (RPC) protocol, so this function enables the issuer to check the status of communication between the Cache Manager or an AFS server process (as specified with the port argument) on the machine and one or more processes on other machines.

OPTIONS

servers

Specifies the machine that is running the Cache Manager or server process for which to trace Rx activity. Provide the machine's IP address in dotted decimal format, its fully qualified host name (for example, fs1.abc.com), or the shortest abbreviated form of its host name that distinguishes it from other machines. Successful use of an abbreviated form depends on the availability of a name resolution service (such as the Domain Name Service or a local host table) at the time the function is issued.

port

Specifies the process for which to trace Rx activity. Omit this argument to specify the File Server (fileserver process), or provide one of the following values:

  • 7000 for the File Server (fileserver process)

  • 7001 for the Cache Manager (specifically, its callback interface)

  • 7002 for the Protection Server (ptserver process)

  • 7003 for the Volume Location (VL) Server (vlserver process)

  • 7004 for the Authentication Server (kaserver process)

  • 7005 for the Volume Server (volserver process)

  • 7007 for the BOS Server (bosserver process)

  • 7008 for the Update Server (upserver process)

  • 7009 for the NFS/AFS Translator's rmtsysd daemon

  • 7021 for the Backup Server (buserver process)

  • 7025 through 65535 for the Backup Tape Coordinator (butc process) that has the port offset number derived by subtracting 7025 from this value

nodally

Produces output only for connections that are not in dally mode. Dally mode is a state in which the connection is idle or waiting.

allconnections

Produces output for all connections, even inactive ones. By default, the output includes information only for connections that are active or in dally mode.

rxstats

Produces detailed statistics about Rx history and performance (for example, counts of the number of packets of various types the process has read and sent, calculations of average and minimum roundtrip time, and so on).

onlyserver

Produces output only for connections in which the process designated by the port argument is acting as the server.

onlyclient

Produces output only for connections in which the process designated by the port argument is acting as the client.

onlyport

Produces output only for connections between the process designated by the port argument and the specified port on any another machine. Use the same port identifiers as for the port argument.

onlyhost

Produces output only for connections between the process designated by the port argument and any process on the specified machine. To identify the machine, use the same notation as for the servers argument.

onlyauth

Produces output only for connections that are using the specified authentication level. Provide one of the following values:

  • auth for connections at authentication level rxkad_auth

  • clear for connections at authentication level rxkad_clear

  • crypt for connections at authentication level rxkad_crypt

  • none for unauthenticated connections (equivalents are null, noauth, and unauth)

version

Reports the AFS build level of the binary file for the process designated by the port argument (or of the kernel extensions file for port 7001, the Cache Manager's callback interface). Any other options combined with this one are ignored.

noconns

Produces only the standard statistics that begin the output produced by every option (other than version), and peer structure information if the peers option was selected, without reporting on any connections.

peers

Outputs information from the peer structure maintained for each port on another machine to which the process designated by the port argument has a connection. There is information about roundtrip time and numbers of packets sent and received, for example.

long

Outputs additional information from the peer structure maintained for each port on another machine to which the process designated by the port argument has a connection. Only use this with the peers argument.

OUTPUT

The return value is a reference to a hash containing the requested information. The keys that the hash may contain, along with a short description of their values, are listed below:

  • address: the IP address of the machine given by the servers argument.

  • port: the port used.

  • version: a description of the AFS build level.

  • tstats: a reference to a hash containing standard statistics.

  • rxstats: a reference to a hash containing detailed rx statistics.

  • connections: a reference to an array of hash references containing information about each connection.

  • dallyCounter: the number of dallying connections skipped.

  • peers: a reference to an array of hash references containing information about each peer.

The simplest case would be if the version flag was set. The hash table would have only three keys in it: address, port, and version.

For more details about the contents of the returned hash reference, and an example of printing its entire contents in a readable format, refer to the rxdebug script in the examples directory.

AUTHORS

The code and documentation for this class were contributed by Stanford Linear Accelerator Center, a department of Stanford University. This documentation was written by

Elizabeth Cassell <e_a_c@mailsnare.net> and
Alf Wachsmann <alfw@slac.stanford.edu>

COPYRIGHT AND DISCLAIMER

 Copyright 2004 Alf Wachsmann <alfw@slac.stanford.edu> and
                Elizabeth Cassell <e_a_c@mailsnare.net>
 All rights reserved.

 Most of the explanations in this document are taken from the original
 AFS documentation.

 AFS-3 Programmer's Reference:
 Volume Server/Volume Location Server Interface
 Edward R. Zayas
 (c) 1991 Transarc Corporation.
 All rights reserved.

 IBM AFS Administration Reference
 (c) IBM Corporation 2000.
 All rights reserved.

 This library is free software; you can redistribute it and/or modify it
 under the same terms as Perl itself.