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

NAME

scout

SYNOPSIS

  use AFS::Monitor qw(scout);
  my $scout;

  $scout = scout(server   => "serverName1");

  $scout = scout(server   => ["serverName1", "serverName2"],
                 basename => "example.com",
                 debug    => "debug_out/debug.file"
                );

DESCRIPTION

The scout function gathers statistics from the File Server process running on each machine specified with the server argument. The Output section explains the meaning of the statistics.

OPTIONS

server

String with one name or reference to an array with names of one or more machines from which to gather File Server statistics. Specifies each file server machine running a File Server process to monitor. Provide each machine's fully qualified hostname unless the basename argument is used. In that case, specify only the unique initial part of each machine name, omitting the domain name suffix (the basename) common to all the names. It is also acceptable to use the shortest abbreviated form of a host name that distinguishes it from other machines, but successful resolution depends on the availability of a name resolution service (such as the Domain Name Service or a local host table) at the time the command is issued.

basename

String that specifies the basename (domain name) suffix common to all of the file server machine names specified with the server argument, and is automatically appended to them. This argument is normally the name of the cell to which the machines belong. Do not include the period that separates this suffix from the distinguishing part of each file server machine name, but do include any periods that occur within the suffix itself. For example, in the ABC Corporation cell, the proper value is abc.com rather than .abc.com.

debug

Specifies the pathname of the file into which to write a debugging trace. Partial pathnames are interpreted relative to the current working directory.

OUTPUT

Returns a reference to an array, with one element per host specified. Each element in the array is a reference to a hash containing information about the file server, as described below.

hostName

This hash entry contains the name of the file server that this array entry represents.

probeOK

The value of this entry will be 1 if the probe was successful, and 0 if the probe failed and was unable to gather any statistics for this File Server process.

stats

The value of this entry will be a reference to a hash containing all of the statistics gathered, unless the probe failed, in which case the b<stats> key will not exist. Some of the statistics contained in this hash are described below:

CurrentConnections

The number of RPC connections open between the File Server process and client machines. This number equals or exceeds the number in the WorkStations entry (see below), because each user on the machine can have several separate connections open at once, and one client machine can handle several users.

TotalFetchs

The number of fetch-type RPCs (fetch data, fetch access list, and fetch status) that client machines have made to the File Server process since the latter started. This number is reset to zero each time the File Server process restarts.

TotalStores

The number of store-type RPCs (store data, store access list, and store status) that client machines have made to the File Server process since the latter started. This number is reset to zero each time the File Server process restarts.

WorkStations

The number of client machines (workstations) that have communicated with the File Server process within the last 15 minutes. Such machines are termed active. This number is likely to be smaller than the number in the CurrentConnections entry because a single client machine can have several connections open to one File Server.

Disk

A reference to an array containing an entry for each AFS disk partition on the file server machine, up to 26 partitions. Each entry is a reference to a hash, containing three entries:

Name

Indicates the partition name. For example, a value of a specifies the /vicepa partition.

BlocksAvailable

The number of available kilobyte blocks on this partition.

TotalBlock

The total number of kilobyte blocks on this partition.

For an example of using the output from this function, refer to the scout 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.