rxdebug - Provides debugging trace of Rx activity
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, );
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.
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.
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
Produces output only for connections that are not in dally mode. Dally mode is a state in which the connection is idle or waiting.
Produces output for all connections, even inactive ones. By default, the output includes information only for connections that are active or in dally mode.
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).
Produces output only for connections in which the process designated by the port argument is acting as the server.
Produces output only for connections in which the process designated by the port argument is acting as the client.
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.
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.
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)
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.
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.
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.
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.
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.
address
port: the port used.
port
version: a description of the AFS build level.
version
tstats: a reference to a hash containing standard statistics.
tstats
rxstats: a reference to a hash containing detailed rx statistics.
rxstats
connections: a reference to an array of hash references containing information about each connection.
connections
dallyCounter: the number of dallying connections skipped.
dallyCounter
peers: a reference to an array of hash references containing information about each peer.
peers
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.
The code and documentation for this class were contributed by Stanford Linear Accelerator Center, a department of Stanford University. This documentation was written by
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.
To install AFS::Monitor, copy and paste the appropriate command in to your terminal.
cpanm
cpanm AFS::Monitor
CPAN shell
perl -MCPAN -e shell install AFS::Monitor
For more information on module installation, please visit the detailed CPAN module installation guide.