AFS-Monitor

 view release on metacpan or  search on metacpan

CHANGES  view on Meta::CPAN

Version 0.3.3 (released July 6, 2011)
  * changed ownership from Alf Wachsmann to Steven Jenkins
  * incorporated patches from Jeff Blaine

Version 0.3.2 (released May 14, 2007)
  * removed spurious lib subdirectory from tar file
    Thanks to David Cantrell <david at cantrell.org.uk>

Version 0.3.1 (released April 4, 2007)

 * changed permissions from 755 to 0755 in Makefile.PL
 * ExtUtils::MakeMaker's PERL_MM_USE_DEFAULT environment variable is now obeyed
 * fixed a problem to make it compile on 32 bit RHEL4
 All fixes were submitted by Wolfgang Friebel <Wolfgang.Friebel at desy.de> - Thanks!


Version 0.3.0 (released April 27, 2006)

 * made everything work with OpenAFS-1.4.1
 * cmdebug: PrintCacheEntries() now contains the strings and not the number of the file types
 * added new CallBack statistics from OpenAFS-1.4.1 file servers to xstat_fs_test()
 * added example for CallBack statistics to examples/xstat_fs_test
 * added new statistics "rx_nBusies", "fs_nBusies", "fs_GetCapabilities" to xstat_fs_test()
 * changed call by value to call by reference in a number of functions which reduces the
   memory usage
 * some general code cleanup


Version 0.2.2 (released January 17, 2005)

 * Added a README file as preparation for CPAN


Version 0.2.1 (released November 4, 2004)

 * Handling of shared AFS libraries.
   Thanks to Wolfgang Friebel <Wolfgang.Friebel at desy.de>


Version 0.2.0 (released October 14, 2004)

 * Extended user interface of some functions. They now not only
   take array refs but also single names as string as input.
   Thanks to Peter Scott <Peter.J.Scott at jpl.nasa.gov>


Version 0.1.2 (released September 1, 2004)

 * Added changes for Mac OS X
   Thanks to Sebastian Hagedorn <Hagedorn at uni-koeln.de>


Version 0.1 (released August 15, 2004, revision 1.9)

 * First public release

LICENSES/Artistic  view on Meta::CPAN





			 The "Artistic License"

				Preamble

The intent of this document is to state the conditions under which a
Package may be copied, such that the Copyright Holder maintains some
semblance of artistic control over the development of the package,
while giving the users of the package the right to use and distribute
the Package in a more-or-less customary fashion, plus the right to make
reasonable modifications.

Definitions:

	"Package" refers to the collection of files distributed by the
	Copyright Holder, and derivatives of that collection of files
	created through textual modification.

	"Standard Version" refers to such a Package if it has not been
	modified, or has been modified in accordance with the wishes
	of the Copyright Holder as specified below.

	"Copyright Holder" is whoever is named in the copyright or
	copyrights for the package.

	"You" is you, if you're thinking about copying or distributing
	this Package.

	"Reasonable copying fee" is whatever you can justify on the
	basis of media cost, duplication charges, time of people involved,
	and so on.  (You will not be required to justify it to the
	Copyright Holder, but only to the computing community at large
	as a market that must bear the fee.)

	"Freely Available" means that no fee is charged for the item
	itself, though there may be fees involved in handling the item.
	It also means that recipients of the item may redistribute it
	under the same conditions they received it.

1. You may make and give away verbatim copies of the source form of the
Standard Version of this Package without restriction, provided that you
duplicate all of the original copyright notices and associated disclaimers.

2. You may apply bug fixes, portability fixes and other modifications
derived from the Public Domain or from the Copyright Holder.  A Package
modified in such a way shall still be considered the Standard Version.

3. You may otherwise modify your copy of this Package in any way, provided
that you insert a prominent notice in each changed file stating how and
when you changed that file, and provided that you do at least ONE of the
following:

    a) place your modifications in the Public Domain or otherwise make them
    Freely Available, such as by posting said modifications to Usenet or
    an equivalent medium, or placing the modifications on a major archive
    site such as uunet.uu.net, or by allowing the Copyright Holder to include
    your modifications in the Standard Version of the Package.

    b) use the modified Package only within your corporation or organization.

    c) rename any non-standard executables so the names do not conflict
    with standard executables, which must also be provided, and provide
    a separate manual page for each non-standard executable that clearly
    documents how it differs from the Standard Version.

    d) make other distribution arrangements with the Copyright Holder.

4. You may distribute the programs of this Package in object code or
executable form, provided that you do at least ONE of the following:

    a) distribute a Standard Version of the executables and library files,
    together with instructions (in the manual page or equivalent) on where
    to get the Standard Version.

    b) accompany the distribution with the machine-readable source of
    the Package with your modifications.

    c) give non-standard executables non-standard names, and clearly
    document the differences in manual pages (or equivalent), together
    with instructions on where to get the Standard Version.

    d) make other distribution arrangements with the Copyright Holder.

5. You may charge a reasonable copying fee for any distribution of this
Package.  You may charge any fee you choose for support of this
Package.  You may not charge a fee for this Package itself.  However,
you may distribute this Package in aggregate with other (possibly
commercial) programs as part of a larger (possibly commercial) software
distribution provided that you do not advertise this Package as a
product of your own.  You may embed this Package's interpreter within
an executable of yours (by linking); this shall be construed as a mere
form of aggregation, provided that the complete Standard Version of the
interpreter is so embedded.

6. The scripts and library files supplied as input to or produced as
output from the programs of this Package do not automatically fall
under the copyright of this Package, but belong to whoever generated
them, and may be sold commercially, and may be aggregated with this
Package.  If such scripts or library files are aggregated with this
Package via the so-called "undump" or "unexec" methods of producing a
binary executable image, then distribution of such an image shall
neither be construed as a distribution of this Package nor shall it
fall under the restrictions of Paragraphs 3 and 4, provided that you do
not represent such an executable image as a Standard Version of this
Package.

7. C subroutines (or comparably compiled subroutines in other
languages) supplied by you and linked into this Package in order to
emulate subroutines and variables of the language defined by this
Package shall not be considered part of this Package, but are the
equivalent of input as in Paragraph 6, provided these subroutines do
not change the language in any way that would cause it to fail the
regression tests for the language.

8. Aggregation of this Package with a commercial distribution is always
permitted provided that the use of this Package is embedded; that is,
when no overt attempt is made to make this Package's interfaces visible
to the end user of the commercial distribution.  Such use shall not be
construed as a distribution of this Package.

9. The name of the Copyright Holder may not be used to endorse or promote
products derived from this software without specific prior written permission.

10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.

				The End

LICENSES/COPYING  view on Meta::CPAN

		    GNU GENERAL PUBLIC LICENSE
		       Version 2, June 1991

 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
                          59 Temple Place - Suite 330, Boston, MA
                          02111-1307, USA.
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

			    Preamble

  The licenses for most software are designed to take away your
freedom to share and change it.  By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users.  This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it.  (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.)  You can apply it to
your programs, too.

  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.

  To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.

  For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have.  You must make sure that they, too, receive or can get the
source code.  And you must show them these terms so they know their
rights.

  We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.

  Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software.  If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.

  Finally, any free program is threatened constantly by software
patents.  We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary.  To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.

  The precise terms and conditions for copying, distribution and
modification follow.

		    GNU GENERAL PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License.  The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language.  (Hereinafter, translation is included without limitation in
the term "modification".)  Each licensee is addressed as "you".

Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope.  The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.

  1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.

You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.

  2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:

    a) You must cause the modified files to carry prominent notices
    stating that you changed the files and the date of any change.

    b) You must cause any work that you distribute or publish, that in
    whole or in part contains or is derived from the Program or any
    part thereof, to be licensed as a whole at no charge to all third
    parties under the terms of this License.

    c) If the modified program normally reads commands interactively
    when run, you must cause it, when started running for such
    interactive use in the most ordinary way, to print or display an
    announcement including an appropriate copyright notice and a
    notice that there is no warranty (or else, saying that you provide
    a warranty) and that users may redistribute the program under
    these conditions, and telling the user how to view a copy of this
    License.  (Exception: if the Program itself is interactive but
    does not normally print such an announcement, your work based on
    the Program is not required to print an announcement.)

These requirements apply to the modified work as a whole.  If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works.  But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.

Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.

In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.

  3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:

    a) Accompany it with the complete corresponding machine-readable
    source code, which must be distributed under the terms of Sections
    1 and 2 above on a medium customarily used for software interchange; or,

    b) Accompany it with a written offer, valid for at least three
    years, to give any third party, for a charge no more than your
    cost of physically performing source distribution, a complete
    machine-readable copy of the corresponding source code, to be
    distributed under the terms of Sections 1 and 2 above on a medium
    customarily used for software interchange; or,

    c) Accompany it with the information you received as to the offer
    to distribute corresponding source code.  (This alternative is
    allowed only for noncommercial distribution and only if you
    received the program in object code or executable form with such
    an offer, in accord with Subsection b above.)

The source code for a work means the preferred form of the work for
making modifications to it.  For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable.  However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.

If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.

  4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License.  Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.

  5. You are not required to accept this License, since you have not
signed it.  However, nothing else grants you permission to modify or
distribute the Program or its derivative works.  These actions are
prohibited by law if you do not accept this License.  Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.

  6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions.  You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.

  7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all.  For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.

If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.

It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices.  Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.

This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.

  8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded.  In such case, this License incorporates
the limitation as if written in the body of this License.

  9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time.  Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

Each version is given a distinguishing version number.  If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation.  If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.

  10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission.  For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this.  Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.

			    NO WARRANTY

  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.

  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.

		     END OF TERMS AND CONDITIONS

	Appendix: How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C) 19yy  <name of author>

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

Also add information on how to contact you by electronic and paper mail.

If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:

    Gnomovision version 69, Copyright (C) 19yy name of author
    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License.  Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.

You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary.  Here is a sample; alter the names:

  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
  `Gnomovision' (which makes passes at compilers) written by James Hacker.

  <signature of Ty Coon>, 1 April 1989
  Ty Coon, President of Vice

This General Public License does not permit incorporating your program into
proprietary programs.  If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library.  If this is what you want to do, use the GNU Library General
Public License instead of this License.

LICENSES/IBM-LICENSE  view on Meta::CPAN

   IBM Public License Version 1.0
   
   THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS IBM
   PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF
   THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
   
   1. DEFINITIONS
   
   "Contribution" means:
   a) in the case of International Business Machines Corporation ("IBM"),
       the Original Program, and
       
   b) in the case of each Contributor,
       
   i) changes to the Program, and
       
   ii) additions to the Program;
       
   where such changes and/or additions to the Program originate from and
       are distributed by that particular Contributor. A Contribution
       'originates' from a Contributor if it was added to the Program by
       such Contributor itself or anyone acting on such Contributor's
       behalf. Contributions do not include additions to the Program
       which: (i) are separate modules of software distributed in
       conjunction with the Program under their own license agreement,
       and (ii) are not derivative works of the Program.
       
   "Contributor" means IBM and any other entity that distributes the
   Program.
   
   "Licensed Patents " mean patent claims licensable by a Contributor
   which are necessarily infringed by the use or sale of its Contribution
   alone or when combined with the Program.
   
   "Original Program" means the original version of the software
   accompanying this Agreement as released by IBM, including source code,
   object code and documentation, if any.
   
   "Program" means the Original Program and Contributions.
   
   "Recipient" means anyone who receives the Program under this
   Agreement, including all Contributors.
   
   2. GRANT OF RIGHTS
   a) Subject to the terms of this Agreement, each Contributor hereby
       grants Recipient a non-exclusive, worldwide, royalty-free
       copyright license to reproduce, prepare derivative works of,
       publicly display, publicly perform, distribute and sublicense the
       Contribution of such Contributor, if any, and such derivative
       works, in source code and object code form.
       
   b) Subject to the terms of this Agreement, each Contributor hereby
       grants Recipient a non-exclusive, worldwide, royalty-free patent
       license under Licensed Patents to make, use, sell, offer to sell,
       import and otherwise transfer the Contribution of such
       Contributor, if any, in source code and object code form. This
       patent license shall apply to the combination of the Contribution
       and the Program if, at the time the Contribution is added by the
       Contributor, such addition of the Contribution causes such
       combination to be covered by the Licensed Patents. The patent
       license shall not apply to any other combinations which include
       the Contribution. No hardware per se is licensed hereunder.
       
   c) Recipient understands that although each Contributor grants the
       licenses to its Contributions set forth herein, no assurances are
       provided by any Contributor that the Program does not infringe the
       patent or other intellectual property rights of any other entity.
       Each Contributor disclaims any liability to Recipient for claims
       brought by any other entity based on infringement of intellectual
       property rights or otherwise. As a condition to exercising the
       rights and licenses granted hereunder, each Recipient hereby
       assumes sole responsibility to secure any other intellectual
       property rights needed, if any. For example, if a third party
       patent license is required to allow Recipient to distribute the
       Program, it is Recipient's responsibility to acquire that license
       before distributing the Program.
       
   d) Each Contributor represents that to its knowledge it has sufficient
       copyright rights in its Contribution, if any, to grant the
       copyright license set forth in this Agreement.
       
   3. REQUIREMENTS
   
   A Contributor may choose to distribute the Program in object code form
   under its own license agreement, provided that:
   a) it complies with the terms and conditions of this Agreement; and
       
   b) its license agreement:
       
   i) effectively disclaims on behalf of all Contributors all warranties
       and conditions, express and implied, including warranties or
       conditions of title and non-infringement, and implied warranties
       or conditions of merchantability and fitness for a particular
       purpose;
       
   ii) effectively excludes on behalf of all Contributors all liability
       for damages, including direct, indirect, special, incidental and
       consequential damages, such as lost profits;
       
   iii) states that any provisions which differ from this Agreement are
       offered by that Contributor alone and not by any other party; and
       
   iv) states that source code for the Program is available from such
       Contributor, and informs licensees how to obtain it in a
       reasonable manner on or through a medium customarily used for
       software exchange.
       
   When the Program is made available in source code form:
   a) it must be made available under this Agreement; and
       
   b) a copy of this Agreement must be included with each copy of the
       Program.
       
   Each Contributor must include the following in a conspicuous location
   in the Program:
   
   Copyright © {date here}, International Business Machines Corporation
       and others. All Rights Reserved.
       
   In addition, each Contributor must identify itself as the originator
   of its Contribution, if any, in a manner that reasonably allows
   subsequent Recipients to identify the originator of the Contribution.
   
   4. COMMERCIAL DISTRIBUTION
   
   Commercial distributors of software may accept certain
   responsibilities with respect to end users, business partners and the
   like. While this license is intended to facilitate the commercial use
   of the Program, the Contributor who includes the Program in a
   commercial product offering should do so in a manner which does not
   create potential liability for other Contributors. Therefore, if a
   Contributor includes the Program in a commercial product offering,
   such Contributor ("Commercial Contributor") hereby agrees to defend
   and indemnify every other Contributor ("Indemnified Contributor")
   against any losses, damages and costs (collectively "Losses") arising
   from claims, lawsuits and other legal actions brought by a third party
   against the Indemnified Contributor to the extent caused by the acts
   or omissions of such Commercial Contributor in connection with its
   distribution of the Program in a commercial product offering. The
   obligations in this section do not apply to any claims or Losses
   relating to any actual or alleged intellectual property infringement.
   In order to qualify, an Indemnified Contributor must: a) promptly
   notify the Commercial Contributor in writing of such claim, and b)
   allow the Commercial Contributor to control, and cooperate with the
   Commercial Contributor in, the defense and any related settlement
   negotiations. The Indemnified Contributor may participate in any such
   claim at its own expense.
   
   For example, a Contributor might include the Program in a commercial
   product offering, Product X. That Contributor is then a Commercial
   Contributor. If that Commercial Contributor then makes performance
   claims, or offers warranties related to Product X, those performance
   claims and warranties are such Commercial Contributor's responsibility
   alone. Under this section, the Commercial Contributor would have to
   defend claims against the other Contributors related to those
   performance claims and warranties, and if a court requires any other
   Contributor to pay any damages as a result, the Commercial Contributor
   must pay those damages.
   
   5. NO WARRANTY
   
   EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
   PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
   KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY
   WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
   OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
   responsible for determining the appropriateness of using and
   distributing the Program and assumes all risks associated with its
   exercise of rights under this Agreement, including but not limited to
   the risks and costs of program errors, compliance with applicable
   laws, damage to or loss of data, programs or equipment, and
   unavailability or interruption of operations.
   
   6. DISCLAIMER OF LIABILITY
   
   EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR
   ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
   INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
   WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
   DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
   HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
   
   7. GENERAL
   
   If any provision of this Agreement is invalid or unenforceable under
   applicable law, it shall not affect the validity or enforceability of
   the remainder of the terms of this Agreement, and without further
   action by the parties hereto, such provision shall be reformed to the
   minimum extent necessary to make such provision valid and enforceable.
   
   If Recipient institutes patent litigation against a Contributor with
   respect to a patent applicable to software (including a cross-claim or
   counterclaim in a lawsuit), then any patent licenses granted by that
   Contributor to such Recipient under this Agreement shall terminate as
   of the date such litigation is filed. In addition, If Recipient
   institutes patent litigation against any entity (including a
   cross-claim or counterclaim in a lawsuit) alleging that the Program
   itself (excluding combinations of the Program with other software or
   hardware) infringes such Recipient's patent(s), then such Recipient's
   rights granted under Section 2(b) shall terminate as of the date such
   litigation is filed.
   
   All Recipient's rights under this Agreement shall terminate if it
   fails to comply with any of the material terms or conditions of this
   Agreement and does not cure such failure in a reasonable period of
   time after becoming aware of such noncompliance. If all Recipient's
   rights under this Agreement terminate, Recipient agrees to cease use
   and distribution of the Program as soon as reasonably practicable.
   However, Recipient's obligations under this Agreement and any licenses
   granted by Recipient relating to the Program shall continue and
   survive.
   
   IBM may publish new versions (including revisions) of this Agreement
   from time to time. Each new version of the Agreement will be given a
   distinguishing version number. The Program (including Contributions)
   may always be distributed subject to the version of the Agreement
   under which it was received. In addition, after a new version of the
   Agreement is published, Contributor may elect to distribute the
   Program (including its Contributions) under the new version. No one
   other than IBM has the right to modify this Agreement. Except as
   expressly stated in Sections 2(a) and 2(b) above, Recipient receives
   no rights or licenses to the intellectual property of any Contributor
   under this Agreement, whether expressly, by implication, estoppel or
   otherwise. All rights in the Program not expressly granted under this
   Agreement are reserved.
   
   This Agreement is governed by the laws of the State of New York and
   the intellectual property laws of the United States of America. No
   party to this Agreement will bring a legal action under this Agreement
   more than one year after the cause of action arose. Each party waives
   its rights to a jury trial in any resulting litigation.

LICENSES/Stanford-LICENSE  view on Meta::CPAN

   Copyright (c) 1994 Board of Trustees, Leland Stanford Jr. University
  
   Redistribution and use in source and binary forms are permitted
   provided that the above copyright notice and this paragraph are
   duplicated in all such forms and that any documentation,
   advertising materials, and other materials related to such
   distribution and use acknowledge that the software was developed
   by Stanford University.  The name of the University may not be used 
   to endorse or promote products derived from this software without 
   specific prior written permission.
   THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   

MANIFEST  view on Meta::CPAN

MANIFEST
README
CHANGES
LICENCES/Artistic
LICENCES/IBM-LICENCE
LICENCES/COPYING
LICENCES/Stanford-LICENCE
Makefile.PL
examples/configs/configfile
examples/configs/badconfig
examples/Meltdown.pl
examples/scripts/HandlerScript
examples/udebug
examples/afsmonitor
examples/scout
examples/cmdebug
examples/rxdebug
examples/xstat_cm_test
examples/xstat_fs_test
pod/Makefile
pod/cmdebug.pod
pod/rxdebug.pod
pod/scout.pod
pod/afsmonitor.pod
pod/udebug.pod
pod/xstat_cm_test.pod
pod/xstat_fs_test.pod
pod/afsmon_stats.pod
pod/Monitor.pod
src/Monitor.xs
src/Makefile.PL
src/ppport.h
src/t/Monitor.t
src/afsmon-labels.h
src/Monitor.pm
src/typemap

Makefile.PL  view on Meta::CPAN

use ExtUtils::MakeMaker;
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
use Config;

my $archname = $Config{'archname'};

my $VERSION = "0.3.3";

# provide the POD documentation
mkdir('./lib', 0755);
mkdir('./lib/AFS', 0755);
mkdir('./lib/AFS/Monitor', 0755);
system("cp ./pod/Monitor.pod       lib/AFS/Monitor.pod");
system("cp ./pod/afsmon_stats.pod  lib/AFS/Monitor/afsmon_stats.pod");
system("cp ./pod/afsmonitor.pod    lib/AFS/Monitor/afsmonitor.pod");
system("cp ./pod/cmdebug.pod       lib/AFS/Monitor/cmdebug.pod");
system("cp ./pod/rxdebug.pod       lib/AFS/Monitor/rxdebug.pod");
system("cp ./pod/scout.pod         lib/AFS/Monitor/scout.pod");
system("cp ./pod/udebug.pod        lib/AFS/Monitor/udebug.pod");
system("cp ./pod/xstat_cm_test.pod lib/AFS/Monitor/xstat_cm_test.pod");
system("cp ./pod/xstat_fs_test.pod lib/AFS/Monitor/xstat_fs_test.pod");


WriteMakefile(
              'NAME'       => 'AFS::Monitor',
              'VERSION'    => $VERSION,
              ($] >= 5.005 ?
                   ('AUTHOR'   => 'Alf Wachsmann, Elizabeth Cassell, and Steven Jenkins',
                    'ABSTRACT' => 'Perl interface to AFS monitoring and debugging APIs'
                   ) : () ),
              'realclean'  => {FILES => 'Makefile.bak pod/*.html pod/pod2htm* lib/AFS/*.pod lib/AFS/Monitor/*.pod examples/debug_out/debug examples/debug_out/outputfile lib'},
             );


sub MY::postamble {
	'
html: Makefile
	cd pod && $(MAKE) html

pod: blib
	cp pod/Monitor.pod       lib/AFS/Monitor.pod
	cp pod/afsmon_stats.pod  lib/AFS/Monitor/afsmon_stats.pod
	cp pod/afsmonitor.pod    lib/AFS/Monitor/afsmonitor.pod
	cp pod/cmdebug.pod       lib/AFS/Monitor/cmdebug.pod
	cp pod/rxdebug.pod       lib/AFS/Monitor/rxdebug.pod
	cp pod/scout.pod         lib/AFS/Monitor/scout.pod
	cp pod/udebug.pod        lib/AFS/Monitor/udebug.pod
	cp pod/xstat_cm_test.pod lib/AFS/Monitor/xstat_cm_test.pod
	cp pod/xstat_fs_test.pod lib/AFS/Monitor/xstat_fs_test.pod
';
}

README  view on Meta::CPAN

This is the README file for the Perl extension module AFS::Monitor (Version 0.3.3)


DESCRIPTION
    The AFS::Monitor module is a dynamically loadable extension to
    Perl. It gives the AFS user and administrator access to most of the
    AFS monitoring and debugging functions, allowing you to make these calls
    directly from Perl, rather than processing the output of a command.


REQUIREMENTS
    Before you can build the AFS module you need to have the
    following installed on your system:

        * Perl 5.6.1 or newer (haven't tested on any older versions)
        * system libraries for OpenAFS 1.2.x and newer (it is unknown
	whether IBM AFS wil work)


COMPATIBILITY
    Please consult the 'pod/Monitor.pod' file for a complete list of AFS
    @sys variable, OS and compiler versions this Perl module is known to
    work with


AVAILABILITY
    The latest version of the AFS::Monitor module is currently available at

 http://github.com/stevenjenkins/AFS-Monitor as well as CPAN.


BUILDING & INSTALLING
    Assuming you have met all the prerequisites, building the module
    should be straightforward. The AFS::Monitor module is distributed as a
    single gzipped tar archive file:

            AFS-Monitor-0.3.3.tar.gz

    Unpack the archive to create an AFS-Monitor installation directory:

        tar zxvf AFS-Monitor-0.3.3.tar.gz

    'cd' into that directory, make, test and install the modules. You
    have to specify the location of the AFS system libraries. While
    running the 'perl Makefile.PL' step you will be prompted for the
    location of the AFS system libraries.  If you want to avoid that
    query, you should specify the environment variable 'AFSPATH'
    before you start[1].  If your AFS system type is not yet known by
    the make file, please follow the printed message.

    This is the sequence of commands to build the modules:

        cd AFS-Monitor-0.3.2

        [1] this step is optional
        setenv AFSPATH 'path_to_the_AFS_system_libraries' # tcsh-shell
        export AFSPATH='path_to_the_AFS_system_libraries' # sh-shell

        perl Makefile.PL
             ---->  Which AFS system libraries should be used? [/usr/afsws]
        make
        make test
        make install


DOCUMENTATION
    POD-format documentation can be found in the directory 'pod'.
    The POD documentation gets automatically installed to the system wide
    Perl documentation. It is readable with the 'perldoc' utility.

    To create a HTML version of the documentation, execute

 cd pod
 make html


EXAMPLES
    The 'examples' directory contains example how to use the
    AFS::Monitor module. The scripts contain almost all ways how to call
    the different functions. We have used these scripts as regression tests
    during development. They should ive you enough ideas how to use the
    different functions.


BUGS
    Please send all bug reports and suggestions for improvements to
    Steven Jenkins <steven.jenkins@gmail.com>. When reporting
    bugs/problems please include information about operating system
    version, perl version, AFS version, AFS::Monitor module version.
    Comments, suggestions and patches are always welcome.


CREDITS
    See the 'CHANGES' file for details.


COPYRIGHT AND DISCLAIMER
    Copyright 2004-2006 Alf Wachsmann <alfw@slac.stanford.edu> and
                        Elizabeth Cassell <e_a_c@mailsnare.net>.
    Copyright 2011 Steven Jenkins <steven.jenkins@gmail.com>
    All rights reserved.

    Most of the explanations in the documentation are taken from the original
    AFS documentation and the AFS Perl module.

    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.

examples/Meltdown.pl  view on Meta::CPAN

#!/usr/bin/perl
#
# Meltdown.pl - Used to collect stats on running AFS process with rxdebug.
#
# Original Implementation:
#	Unknown - Meltdown.csh, Meltdown.awk
#
# Change History:
#	Jul 02, 2002 - Rex Basham - Added check for wproc, left out during the
#				    original conversion from awk/csh scripts.
#	Mar 21, 2002 - Rex Basham - Merged original csh and awk scripts
#	                            and converted to perl
#	Mar 23, 2002 - Rex Basham - Fixed the display format and added
#                                   field format expansion
#       August 2004  - SLAC       - modified to use the Perl rxdebu function
#
#   Aug 30, 2006 - Jeff Blaine - Added CSV stats output mode
#
# Parameters are -s <server> -p <port> -t <sleeptime in seconds>
# and -C to enable CSV-output mode
#
# Example:
#	Meltdown.pl -s point -p 7000 -t 300
#
#	Check the server 'point' on port '7000' with 5 minutes between
#	rxdebug commands.
#

use blib;
use AFS::Monitor;

sub Usage {
	print STDERR "\n\n$progName: collect rxdebug stats on AFS process.\n";
	print STDERR "usage: $progName [options]\n";
	print STDERR "options:\n";
	print STDERR " -s <server>    (required parameter, no default).\n";
	print STDERR " -p <port>      (default: 7000).\n";
	print STDERR " -t <interval>  (default: 1200 seconds).\n";
	print STDERR " -C             \n";
	print STDERR " -h             (help: show this help message).\n\n";
	print STDERR "Example: $progName -s point -p 7000\n";
	print STDERR "Collect statistics on server point for port 7000\n";
	print STDERR "Refresh interval will default to 20 minutes (1200 seconds)\n\n";
	exit 0;
} # Usage

sub Check_data {
	#
	# If a value is going to overflow the field length,
	# then bump the field length to match the value.
	# It won't be pretty but we'll have valid data.
	#
	(length $wproc	> $Ln[0]) ? ($Ln[0] = length $wproc)	: "";
	(length $nobuf	> $Ln[1]) ? ($Ln[1] = length $nobuf)	: "";
	(length $wpack	> $Ln[2]) ? ($Ln[2] = length $wpack)	: "";
	(length $fpack	> $Ln[3]) ? ($Ln[3] = length $fpack)	: "";
	(length $calls	> $Ln[4]) ? ($Ln[4] = length $calls)	: "";
	(length $delta	> $Ln[5]) ? ($Ln[5] = length $delta)	: "";
	(length $data	> $Ln[6]) ? ($Ln[6] = length $data)	: "";
	(length $resend	> $Ln[7]) ? ($Ln[7] = length $resend)	: "";
	(length $idle	> $Ln[8]) ? ($Ln[8] = length $idle)	: "";
} # Check_data

sub Header {
    if ($csvmode != 1) {
    	print "\nhh:mm:ss wproc nobufs   wpack  fpack    calls     delta  data      resends  idle\n";
    } else { # assume CSV mode...
    	print "\nhh:mm:ss,wproc,nobufs,wpack,fpack,calls,delta,data,resends,idle\n";
    }
} # Header

#
# don't buffer the output
#
$| = 1;

#
# snag program name (drop the full pathname) :
#
$progName = $0;
$tmpName= "";
GETPROG: while ($letr = chop($progName)) {
	$_ = $letr;
	/\// && last GETPROG;
	$tmpName .= $letr;
}
$progName = reverse($tmpName);

#
# set the defaults for server, port, and delay interval
#
$server	= "";
$port	= 7000;
$delay	= 1200;
$csvmove = 0;

#
# any parms?
#
while ($_ = shift(@ARGV)) {
	GETPARMS: {
		/^-[pP]/ && do {
			$port = shift(@ARGV);
			last GETPARMS;
		};
		/^-[sS]/ && do {
			$server = shift(@ARGV);
			last GETPARMS;
		};
		/^-[tT]/ && do {
			$delay = shift(@ARGV);
			last GETPARMS;
		};
		/^-C/ && do {
			$csvmode = 1;
			last GETPARMS;
		};
		/^-[hH\?]/ && do {
			&Usage();
		};
		/^-/ && do {
			&Usage();
		}
	}
}

#
# if they didn't give us a server name, we can't run
#
if ($server eq "") {
	&Usage();
}
else {
	print "\nServer: $server, Port: $port, Interval $delay seconds\n";
	system date;
}

#
# clear the counters for the first run
#
$wproc	= 0;
$wpack	= 0;
$fpack	= 0;
$calls	= 0;
$data	= 0;
$resend	= 0;
$nobuf	= 0;
$idle	= 0;
$oldcall = 0;

#
# set the default field format lengths for
# wproc,nobuf,wpack,fpack,calls,delta,data,resend,idle
#
@Ln = (5,8,6,8,9,6,9,8,4);

#
# force header display on first call
#
$firstrun = 1;

#
# run until we get cancelled
#
while (1) {
	#
	# show the column headers for every 20 lines of data
	#
    if ($firstrun == 1) {
        Header;
        $firstrun = 0;
    }
	if ($linecnt >= 20) {
        if ($csvmode != 1) {
    		Header;
        }
		$linecnt = 1;
	}
	else {
		$linecnt++;
	}

	#
	# snag the current time
	#
	($sec,$min,$hour,$mday,$month,$year,$wday,$yday,$isDST) = localtime();


	#
	# fire the command and collect the stats
	#

	$rx = rxdebug(servers => $server,
		port => $port,
		rxstats => 1,
		noconns => 1
		);

	# $wpack doesn't seem to have a corresponding value.
        # It is always zero.

	$tstats = $rx->{tstats};

	$wproc = $tstats->{nWaiting};
	$fpack = $tstats->{nFreePackets};
	$calls = $tstats->{callsExecuted};
	if ($oldcall > 0) {
		$delta = $calls - $oldcall;
	}
	else {
		$delta = 0;
	}
	$oldcall = $calls;
	$rxstats = $rx->{rxstats};
	$data = $rxstats->{dataPacketsSent};
	$resend = $rxstats->{dataPacketsReSent};
	$nobuf = $rxstats->{noPacketBuffersOnRead};
	$idle = $tstats->{idleThreads};

	#
	# verify and fix field format lengths
	#
	Check_data;

    if ($csvmode != 1) {
    	#
    	# output the timestamp and current results
    	#
    	printf "%2.2d:%2.2d:%2.2d ", $hour,$min,$sec;
    	printf "%-$Ln[0].0f %-$Ln[1].0f %-$Ln[2].0f %-$Ln[3].0f ",
    		$wproc,$nobuf,$wpack,$fpack;
    	printf "%-$Ln[4].0f %-$Ln[5].0f %-$Ln[6].0f %-$Ln[7].0f %-$Ln[8].0f\n",
    		$calls,$delta,$data,$resend,$idle;
    } else { # must be csv mode then...
    	printf "%2.2d:%2.2d:%2.2d,", $hour,$min,$sec;
    	printf "$wproc,$nobuf,$wpack,$fpack";
    	printf "$calls,$delta,$data,$resend,$idle\n";
    }

  	#
	# delay for the required interval
	#
	sleep($delay);
}

exit();

examples/afsmonitor  view on Meta::CPAN

#!/usr/bin/perl -w
#
# Copyright © 2004 Alf Wachsmann <alfw@slac.stanford.edu> and
#                  Elizabeth Cassell <e_a_c@mailsnare.net>
#
# $Revision: 1.14 $ $Date: 2004/10/22 15:04:40 $ $Author: alfw $
#

use blib;
use strict;
use AFS::Monitor;
use Data::Dumper;

my @cmhosts = ("www.openafs.org", "virtue.openafs.org", "andrew.e.kth.se");  # cache manager machines to monitor
my @fshosts = ("www.openafs.org", "virtue.openafs.org", "andrew.e.kth.se"); # file server machines to monitor
my $configfilename = 'configs/configfile';
my $badconfigfile  = 'configs/badconfig';
my $outputfilename = 'debug_out/outputfile';

my @tests;      # choose which tests to run
$tests[1] = 1;  # test of FS afsmonitor with detailed output file
$tests[2] = 2;  # test of CM afsmonitor
$tests[3] = 0;  # test of invalid file name
$tests[4] = 0;  # test of detailed flag without output flag
$tests[5] = 0;  # test of invalid FS host
$tests[6] = 0;  # test of invalid CM host
$tests[7] = 0;  # test of no flags
$tests[8] = 0;  # test of cmhosts and fshosts and config flags all at once
$tests[9] = 0;  # test of cmhosts and fshosts
$tests[10] = 0; # test of config file
$tests[11] = 0; # test of invalid config file
$tests[12] = 0; # test of config file with output file
$tests[13] = 0; # test of show and threshold parameters

my $all = 1;    # show all tests

my $showdump = 0;     # print entire contents of hash for each test
my $readable = 1;     # print readable formatted output (and execute
                      # threshold handler functions if they exist)
my $shortoutput = 0;  # print shorter, harder to read output (don't
                      # execute handlers)

# available options:
#
# afsmonitor(
#            cmhosts  => \@cmhosts,
#            fshosts  => \@fshosts,
#            config   => $configfilename,
#            detailed => 1,
#            output   => $outputfilename,
#           );
#
# You must give cmhosts and/or fshosts, or a config file which specifies
# the cm and fs hosts.


print "# Starting now... #\n";
my ($fsinfo, $cminfo);

if ($all || $tests[1]) {
  print "\n******** TEST 1a: ********\n";

  print "\nafsmonitor -fshosts ", $fshosts[0], "\n\n";

  ($fsinfo, $cminfo) = afsmonitor(fshosts  => $fshosts[0]);
  parse_results($fsinfo, $cminfo);

  print "\n******** TEST 1b: ********\n";

  print "\nafsmonitor -fshosts ", join(" ", @fshosts),
        " -output $outputfilename -detailed\n\n";

  ($fsinfo, $cminfo) = afsmonitor(detailed => 1,
                                  fshosts  => \@fshosts,
                                  output   => $outputfilename
                                 );
  parse_results($fsinfo, $cminfo);
}

if ($all || $tests[2]) {
  print "\n******** TEST 2a: ********\n";

  print "\nafsmonitor -cmhosts ", $cmhosts[0], "\n\n";

  ($fsinfo, $cminfo) = afsmonitor(cmhosts => $cmhosts[0]);

  parse_results($fsinfo, $cminfo);

  print "\n******** TEST 2b: ********\n";

  print "\nafsmonitor -cmhosts ", join(" ", @cmhosts), "\n\n";

  ($fsinfo, $cminfo) = afsmonitor(cmhosts => \@cmhosts);

  parse_results($fsinfo, $cminfo);
}

if ($all || $tests[3]) {
  print "\n******** TEST 3: ********\n";

  print "\nafsmonitor -cmhosts ", join(" ", @cmhosts), " -output /\n\n";

  ($fsinfo, $cminfo) = afsmonitor(cmhosts => \@cmhosts,
                                  output  => '/'
                                 );

  parse_results($fsinfo, $cminfo);
}

if ($all || $tests[4]) {
  print "\n******** TEST 4: ********\n";

  print "\nafsmonitor -cmhosts ", join(" ", @cmhosts), " -detailed\n\n";

  ($fsinfo, $cminfo) = afsmonitor(cmhosts  => \@cmhosts,
                                  detailed => 1
                                 );

  parse_results($fsinfo, $cminfo);
}

if ($all || $tests[5]) {
  print "\n******** TEST 5: ********\n";

  print "\nafsmonitor -fshosts \"something that won't work\"\n\n";

  ($fsinfo, $cminfo) = afsmonitor(fshosts => [ "something that won't work" ]);

  parse_results($fsinfo, $cminfo);
}

if ($all || $tests[6]) {
  print "\n******** TEST 6: ********\n";

  print "\nafsmonitor -cmhosts notreal fake\n\n";

  ($fsinfo, $cminfo) = afsmonitor(cmhosts => [ 'notreal', 'fake' ]);

  parse_results($fsinfo, $cminfo);
}

if ($all || $tests[7]) {
  print "\n******** TEST 7: ********\n";

  print "\nafsmonitor\n\n";

  ($fsinfo, $cminfo) = afsmonitor();

  parse_results($fsinfo, $cminfo);
}

if ($all || $tests[8]) {
  print "\n******** TEST 8: ********\n";

  print "\nafsmonitor -cmhosts ", join(" ", @cmhosts),
                    " -fshosts ", join(" ", @fshosts),
                    " -config $configfilename\n\n";

 ($fsinfo, $cminfo) = afsmonitor(cmhosts => \@cmhosts,
                                 fshosts => \@fshosts,
                                 config  => $configfilename
                                );

  parse_results($fsinfo, $cminfo);
}

if ($all || $tests[9]) {
  print "\n******** TEST 9: ********\n";

  print "\nafsmonitor -cmhosts ", join(" ", @cmhosts),
                    " -fshosts ", join(" ", @fshosts), "\n\n";

  ($fsinfo, $cminfo) = afsmonitor(cmhosts => \@cmhosts,
                                  fshosts => \@fshosts
                                 );

  parse_results($fsinfo, $cminfo);
}

if ($all || $tests[10]) {
  print "\n******** TEST 10: ********\n";

  print "\nafsmonitor -config $configfilename\n\n";

  ($fsinfo, $cminfo) = afsmonitor(config => $configfilename);

  parse_results($fsinfo, $cminfo);
}

if ($all || $tests[11]) {
  print "\n******** TEST 11: ********\n";

  print "\nafsmonitor -config $badconfigfile\n\n";

  ($fsinfo, $cminfo) = afsmonitor(config => $badconfigfile);

  parse_results($fsinfo, $cminfo);
}

if ($all || $tests[12]) {
  print "\n******** TEST 12: ********\n";

  print "\nafsmonitor -config $configfilename -output $outputfilename\n\n";

  ($fsinfo, $cminfo) = afsmonitor(config => $configfilename,
                                  output => $outputfilename
                                 );

  parse_results($fsinfo, $cminfo);
}

if ($all || $tests[13]) {
  print "\n******** TEST 13: ********\n";

 ($fsinfo, $cminfo) =
   afsmonitor(
              cmhosts  => \@cmhosts,
              fshosts  => \@fshosts,
              # show statments
              cmshow   => ["PerfStats_section", "fs_oc_downDst_more_50"],
              fsshow   => ["VnodeCache_group", "FetchData_sqr"],
              # thresholds
              fsthresh => [
                            { vcache_S_Entries => 1 },
                            { vcache_L_Allocs  => 1 },
                            { host => "andrew.e.kth.se",
                              vcache_L_Entries => 1,
                              handler => "scripts/HandlerScript"
                            },
                            { host => "www.openafs.org",
                              vcache_L_Writes => -1,
                              handler => "scripts/HandlerScript"
                            },
                            { host => "virtue.openafs.org",
                              vcache_L_Writes => 2,
                              handler => "scripts/HandlerScript"
                            }
                          ],
              cmthresh => [
                            { host => "www.openafs.org",
                              numPerfCalls => 1,
                              handler => "scripts/HandlerScript"
                            },
                            { fs_oc_downDst_more_50 => 0 },
                            { cacheNumEntries => 1,
                              handler => "scripts/HandlerScript"
                            },
                            { host => "virtue.openafs.org",
                              dlocalAccesses => 1
                            }
                          ],
             );

  parse_results($fsinfo, $cminfo);
}


sub parse_results {

  if ($AFS::CODE) {
    print "Error case: ", ref($fsinfo), "\n" if (defined($fsinfo));
    print "Error case: ", ref($cminfo), "\n" if (defined($cminfo));
    # die("Error: AFS::CODE = $AFS::CODE (", ($AFS::CODE+0), ")\n");
    print "Error: AFS::CODE = $AFS::CODE (", ($AFS::CODE+0), ")\n";
    return;
  }

  if ($showdump) {
    local $Data::Dumper::Indent = 1;
    local $Data::Dumper::Quotekeys = 0;
    local $Data::Dumper::Maxdepth = 2;
    local $Data::Dumper::Varname = "File Servers ";
    print Dumper($fsinfo);
    local $Data::Dumper::Varname = "Cache Managers ";
    print Dumper($cminfo);
  }

  if ($readable) {
    print "\nFile Servers:\n";

    foreach my $host (@$fsinfo) {
      print "\nFS HOSTNAME: $host->{hostName}\n";
      if ($host->{probeOK}) {
        print " probe successful\n";

        foreach my $section (sort keys %$host) {
          if (ref $host->{$section}) {
            print "\n $section:\n";

            foreach my $group (sort keys %{$host->{$section}}) {
              print "\n  $group\n";

              foreach my $item (sort keys %{$host->{$section}->{$group}}) {
                print "    $item";
                for (my $i = 0; $i <= 30 - length($item); $i++) {
                  print " ";
                }
                print "$host->{$section}->{$group}->{$item}->{value}";
                if ($host->{$section}->{$group}->{$item}->{overflow}) {
                  print " (overflow)\n";
                  print "     threshold: $host->{$section}->{$group}->{$item}->{threshold}\n";
                  if ($host->{$section}->{$group}->{$item}->{overflow} ne 1) {
                    print "\n";
                    system($host->{$section}->{$group}->{$item}->{overflow});
                  }
                }
                print "\n";
              }
            }
          }
        }
      }
      else {
        print "\n probe failed";
      }
      print "\n";
    }


    print "\nCache Managers:\n";

    foreach my $host (@$cminfo) {
      print "\nCM HOSTNAME: $host->{hostName}\n";
      if ($host->{probeOK}) {
        print " probe successful\n";

        foreach my $section (sort keys %$host) {
          if (ref $host->{$section}) {
            print "\n $section:\n";

            foreach my $group (sort keys %{$host->{$section}}) {
              print "\n  $group\n";

              foreach my $item (sort keys %{$host->{$section}->{$group}}) {
                print "    $item";
                for (my $i = 0; $i <= 30 - length($item); $i++) {
                  print " ";
                }
                print "$host->{$section}->{$group}->{$item}->{value}";
                if ($host->{$section}->{$group}->{$item}->{overflow}) {
                  print " (overflow)\n";
                  print "     threshold: $host->{$section}->{$group}->{$item}->{threshold}\n";
                  if ($host->{$section}->{$group}->{$item}->{overflow} ne 1) {
                    print "\n";
                    system($host->{$section}->{$group}->{$item}->{overflow});
                  }
                }
                print "\n";
              }
            }
          }
        }
      }
      else {
        print "\n probe failed";
      }
      print "\n";
    }
  }

  if ($shortoutput) {
    print "\nFile Servers:\n";

    foreach my $host (@$fsinfo) {
      print "\nHOST: $host->{hostName}";
      if ($host->{probeOK}) {

        foreach my $section (sort keys %$host) {
          if (ref $host->{$section}) {
            print "\n******* $section *******";

            foreach my $group (sort keys %{$host->{$section}}) {
              print "\n   [[$group]]   ";

              foreach my $item (sort keys %{$host->{$section}->{$group}}) {
                print "$item $host->{$section}->{$group}->{$item}->{value}";
                if ($host->{$section}->{$group}->{$item}->{overflow}) {
                  print " (";
                  print "thresh: $host->{$section}->{$group}->{$item}->{threshold}";
                  if ($host->{$section}->{$group}->{$item}->{overflow} ne 1) {
                    print ", handler";
                  }
                  print ")";
                }
                print " | ";
              }
            }
          }
        }
      }
      else {
        print "probe failed\n";
      }
      print "\n";
    }


    print "\nCache Managers:\n";

    foreach my $host (@$cminfo) {
      print "\nHOST: $host->{hostName}";
      if ($host->{probeOK}) {

        foreach my $section (sort keys %$host) {
          if (ref $host->{$section}) {
            print "\n******* $section *******";

            foreach my $group (sort keys %{$host->{$section}}) {
              print "\n   [[$group]]   ";

              foreach my $item (sort keys %{$host->{$section}->{$group}}) {
                print "$item $host->{$section}->{$group}->{$item}->{value}";
                if ($host->{$section}->{$group}->{$item}->{overflow}) {
                  print " (";
                  print "thresh: $host->{$section}->{$group}->{$item}->{threshold}";
                  if ($host->{$section}->{$group}->{$item}->{overflow} ne 1) {
                    print ", handler";
                  }
                  print ")";
                }
                print " | ";
              }
            }
          }
        }
      }
      else {
        print "probe failed\n";
      }
      print "\n";
    }
  }
}

print "\n# ...Done #\n";

examples/cmdebug  view on Meta::CPAN

#!/usr/bin/perl -w
#
# Copyright © 2004 Alf Wachsmann <alfw@slac.stanford.edu> and
#                  Elizabeth Cassell <e_a_c@mailsnare.net>
#
# $Revision: 1.8 $ $Date: 2006/07/05 22:25:10 $ $Author: alfw $
#

use blib;
use strict;
use AFS::Monitor qw(cmdebug constant);
use Data::Dumper;

#my $server = "virtue.openafs.org";
my $server = "afs04.slac.stanford.edu";
my $port   = 7001;

my @tests;      # choose which tests to run
$tests[1] = 1;  # test of server $server, port $port, long output
$tests[2] = 0;  # test of server $server, no port
$tests[3] = 0;  # test of nonexistant server
$tests[4] = 0;  # test of server $server, bad port
$tests[5] = 0;  # test of server $server, port $port

my $all = 0;

my $showdump = 1;   # print entire contents of hash for each test
my $formatted = 1;  # print output formatted like the c cmdebug program

print "# Starting now... #\n";
my $locks;
my $cache_entries;

if ($all || $tests[1]) {
  print "\n******** TEST 1: ********\n";

  print "\ncmdebug -server $server -port $port -long\n\n";

  ($locks, $cache_entries) = cmdebug(server => $server,
                                     port   => $port,
                                     long   => 1
                                    );
  parse_result($locks, $cache_entries);
}

if ($all || $tests[2]) {
  print "\n******** TEST 2: ********\n";

  print "\ncmdebug -server $server\n\n";

  ($locks, $cache_entries) = cmdebug(server => $server);
  parse_result($locks, $cache_entries);
}

if ($all || $tests[3]) {
  print "\n******** TEST 3: ********\n";

  print "\ncmdebug -server nonexistant\n\n";

  ($locks, $cache_entries) = cmdebug(server => "nonexistant");
  parse_result($locks, $cache_entries);
}

if ($all || $tests[4]) {
  print "\n******** TEST 4: ********\n";

  print "\ncmdebug -server $server -port 7001\n\n";

  ($locks, $cache_entries) = cmdebug(server => $server,
                                     port   => 7001
                                    );
  parse_result($locks, $cache_entries);
}

if ($all || $tests[5]) {
  print "\n******** TEST 5: ********\n";

  print "\ncmdebug -server $server -port $port\n\n";

  ($locks, $cache_entries) = cmdebug(server => $server,
                                     port   => $port
                                    );
  parse_result($locks, $cache_entries);
}


sub parse_result {
  my $l = shift;
  my $c = shift;

  if ($AFS::CODE) {
    print "Error case: ", ref($l), "\n" if (defined($l));
    print "Error case: ", ref($c), "\n" if (defined($c));
    # die("Error: AFS::CODE = $AFS::CODE (", ($AFS::CODE+0), ")\n");
    print "Error: AFS::CODE = $AFS::CODE (", ($AFS::CODE+0), ")\n";
    return;
  }

  if ($showdump) {
    local $Data::Dumper::Quotekeys = 0;
    local $Data::Dumper::Sortkeys = 1;
    local $Data::Dumper::Varname = "Locks";
    local $Data::Dumper::Maxdepth = 3;
    local $Data::Dumper::Indent = 1;
    print Dumper($l);
    local $Data::Dumper::Maxdepth = 1;
    local $Data::Dumper::Indent = 0;
    local $Data::Dumper::Varname = "Cache Entries";
    print Dumper($c);
  }

  if ($formatted) {
    foreach my $lock (@$l) {
      printf("Lock %s status: ", $lock->{name});
      print_lock($lock->{lock});
      print "\n";
    }

    foreach my $centry (@$c) {
      if($centry->{addr} == 0) {
        printf("Proc %4d sleeping at %08x, pri %3d\n",
                $centry->{netFid}->{Vnode},
                $centry->{netFid}->{Volume},
                $centry->{netFid}->{Unique} - 25);
        next;
      }
      printf("** Cache entry @ 0x%08x for %d.%d.%d.%d",
              $centry->{addr},
              $centry->{cell}, $centry->{netFid}->{Volume},
              $centry->{netFid}->{Vnode},
              $centry->{netFid}->{Unique});
      if ((exists $centry->{cellname}) && ($centry->{cellname})) {
        printf " [%s]\n", $centry->{cellname};
      }
      else {
        print "\n";
      }
      if (exists $centry->{lock}) {
        print "    locks: ";
        print_lock($centry->{lock});
        print "\n";
      }
      printf("    %d bytes\tDV %d refcnt %d\n",
               $centry->{Length},
               $centry->{DataVersion},
               $centry->{refCount});
      printf("    callback %08x\texpires %u\n",
               $centry->{callback},
               $centry->{cbExpires});
      printf("    %d opens\t%d writers\n",
               $centry->{opens},
               $centry->{writers});

      print "    ";
      if ($centry->{mvstat} == 0) {
        print "normal file";
      }
      elsif ($centry->{mvstat} == 1) {
        print "mount point";
      }
      elsif ($centry->{mvstat} == 2) {
        print "volume root";
      }
      elsif ($centry->{mvstat} == 3) {
        print "directory";
      }
      elsif ($centry->{mvstat} == 4) {
        print "symlink";
      }
      elsif ($centry->{mvstat} == 5) {
        print "microsoft dfs link";
      }
      elsif ($centry->{mvstat} == 6) {
        print "invalid link";
      }
      else {
        printf("bogus mvstat %d", $centry->{mvstat});
      }

      printf("\n    states (0x%x)", $centry->{states});
      if ($centry->{states} & 1) {
        print ", stat'd";
      }
      if ($centry->{states} & 2) {
        print ", backup";
      }
      if ($centry->{states} & 4) {
        print ", read-only";
      }
      if ($centry->{states} & 8) {
        print ", mt pt valid";
      }
      if ($centry->{states} & 0x10) {
        print ", pending core";
      }
      if ($centry->{states} & 0x40) {
        print ", wait-for-store";
      }
      if ($centry->{states} & 0x80) {
        print ", mapped";
      }
      print "\n";
    }
  }
}


sub print_lock {
  my $lock = shift;

  print "(";
  if ($lock->{waitStates}) {
    if($lock->{waitStates} & constant("READ_LOCK")) {
      print "reader_waiting";
    }
    if($lock->{waitStates} & constant("WRITE_LOCK")) {
      print "writer_waiting";
    }
    if($lock->{waitStates} & constant("SHARED_LOCK")) {
      print "upgrade_waiting";
    }
  }
  else {
    print "none_waiting";
  }
  if ($lock->{exclLocked}) {
    if ($lock->{exclLocked} & constant("WRITE_LOCK")) {
       print ", write_locked";
    }
    if ($lock->{exclLocked} & constant("SHARED_LOCK")) {
       print ", upgrade_locked";
    }
    printf("(pid:%d at:%d)",
            $lock->{pid_writer}, $lock->{src_indicator});
  }
  if ($lock->{readersReading}) {
    printf(", %d read_locks(pid:%d)",
            $lock->{readersReading}, $lock->{pid_last_reader});
  }
  if ($lock->{numWaiting}) {
    printf(", %d waiters", $lock->{numWaiting});
  }
  print ")";
}

examples/configs/badconfig  view on Meta::CPAN

#
# Copyright © 2004 Alf Wachsmann <alfw@slac.stanford.edu> and
#                  Elizabeth Cassell <e_a_c@mailsnare.net>
#
# $Revision: 1.2 $ $Date: 2004/08/05 20:52:03 $ $Author: alfw $
#

# global show statments
show cm PerfStats_section
#show cm Auth_Stats_group
show cm fs_sc_numTtlRecords
show fs VnodeCache_group

#global thresholds
thresh fs FetchData_sqr 2000
thresh fs vcache_L_Allocs 20 ThreshHandlerScript
thresh cm fs_sc_maxDowntimesInARecord 100

#individual connections

cm afs01

fs sysdev11
show fs FetchData_sqr
thresh fs vcache_L_Entries 198 S 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3

cm afs03

fs afs02
show cm fs_sc_maxDowntimesInARecord

cm afs04
thresh cm fs_sc_numTtlRecords 00000000000

examples/configs/configfile  view on Meta::CPAN

#
# Copyright © 2004 Alf Wachsmann <alfw@slac.stanford.edu> and
#                  Elizabeth Cassell <e_a_c@mailsnare.net>
#
# $Revision: 1.3 $ $Date: 2004/08/09 16:16:59 $ $Author: alfw $
#

# global show statments
show fs VnodeCache_group
show fs FetchData_sqr
show cm PerfStats_section
show cm fs_oc_downDst_more_50

#global thresholds
thresh fs vcache_S_Entries 30
thresh fs vcache_L_Allocs 20

#individual connections


fs andrew.e.kth.se
thresh fs vcache_L_Entries 198 scripts/HandlerScript panic die

cm virtue.openafs.org
thresh cm numPerfCalls 3 scripts/HandlerScript

examples/rxdebug  view on Meta::CPAN

#!/usr/bin/perl -w
#
# Copyright © 2004 Alf Wachsmann <alfw@slac.stanford.edu> and
#                  Elizabeth Cassell <e_a_c@mailsnare.net>
#
# $Revision: 1.9 $ $Date: 2004/10/22 15:04:40 $ $Author: alfw $
#

use blib;
use strict;
use AFS::Monitor qw(rxdebug constant);
use Data::Dumper;

my $servers  = 'virtue.openafs.org'; # machine to run this on
my $port     = 7001;      # port to run this on
my $onlyhost = 'andrew.e.kth.se';  # some of the tests will show only connections from this host
my $onlyport = 7000;      # some of the tests will show only connections on this port
my $onlyauth = 'auth';    # some of the tests will show only connections with this auth level

my @tests;      # choose which tests to run
$tests[1] = 1;  # prints version
$tests[2] = 0;  # prints all peers and all non-dallying connections.
                # (can be long)
$tests[3] = 0;  # nonexistant host
$tests[4] = 0;  # nonexistant port
$tests[5] = 0;  # bad port; getstats fails. (can be slow)
$tests[6] = 0;  # prints long version of all peers. (can be long)
$tests[7] = 0;  # server $servers port $port. prints default info.
$tests[8] = 0;  # prints rxstats, no connections.
$tests[9] = 0;  # prints only auth $onlyauth
$tests[10] = 0; # shows all connections. (can be long)
$tests[11] = 0; # shows all server connections. (can be long)
$tests[12] = 0; # shows all client connections on port $port from host $onlyhost
$tests[13] = 0; # doesn't give port, tries default (7000).
$tests[14] = 0; # no arguments, runs on current machine with default port.
$tests[15] = 0; # port $port, runs on current machine.
$tests[16] = 0; # prints rxstats, all connections, long version of all peers.
                # (can be very long)

my $all = 1;    # show all tests

my $showdump = 0; # dump contents of hash to the screen for each test instead of printing rxdebug formatted output

# all available options:
# rxdebug(nodally        => 1,
#         allconnections => 1,
#         rxstats        => 1,
#         onlyserver     => 1,
#         onlyclient     => 1,
#         onlyport       => $onlyport,
#         version        => 1,
#         noconns        => 1,
#         peers          => 1,
#         long           => 1,
#         servers        => $servers, # required
#         port           => $port,
#         onlyhost       => $onlyhost,
#         onlyauth       => $onlyauth,
#        );

print "***** Starting now... *****\n";
my $rxdeb;

if ($all || $tests[1]) {
  print "\n******** TEST 1: ********\n";

  print "\nrxdebug -version -servers $servers -port $port\n\n";

  $rxdeb = rxdebug(version => 1,
                   servers => $servers, # required
                   port    => $port
                  );
  parse_results($rxdeb);
}

if ($all || $tests[2]) {
  print "\n******** TEST 2: ********\n";

  print "\nrxdebug -nodally -allconnections -peers -servers $servers -port $port\n\n";

  $rxdeb = rxdebug(nodally        => 1,
                   allconnections => 1,
                   peers          => 1,
                   servers        => $servers,
                   port           => $port
                  );
  parse_results($rxdeb);
}

if ($all || $tests[3]) {
  print "\n******** TEST 3: ********\n";

  print "\nrxdebug -servers speedy1 -port $port\n\n";

  $rxdeb = rxdebug(servers => 'speedy1',
                   port    => $port
                  );
  parse_results($rxdeb);
}

if ($all || $tests[4]) {
  print "\n******** TEST 4 ********\n";

  print "\nrxdebug -servers $servers -port no\n\n";

  $rxdeb = rxdebug(servers => $servers,
                   port    => 'no'
                  );
  parse_results($rxdeb);
}

if ($all || $tests[5]) {
  print "\n******** TEST 5 ********\n";

  print "\nrxdebug -servers $servers -port 643543\n(may take a while..)\n\n";

  $rxdeb = rxdebug(servers => $servers,
                   port    => 643543
                  );
  parse_results($rxdeb);
}

if ($all || $tests[6]) {
  print "\n******** TEST 6 ********\n";

  print "\nrxdebug -servers $servers -port $port -noconns -peers -long\n\n";

  $rxdeb = rxdebug(servers => $servers,
                   port    => $port,
                   noconns => 1,
                   peers   => 1,
                   long    => 1
                  );
  parse_results($rxdeb);
}

if ($all || $tests[7]) {
  print "\n******** TEST 7 ********\n";

  print "\nrxdebug -servers $servers -port $port\n\n";

  $rxdeb = rxdebug(servers => $servers,
                   port    => $port
                  );
  parse_results($rxdeb);
}

if ($all || $tests[8]) {
  print "\n******** TEST 8 ********\n";

  print "\nrxdebug -noconns -servers $servers -port $port -rxstats\n\n";

  $rxdeb = rxdebug(noconns => 1,
                   servers => $servers,
                   port    => $port,
                   rxstats => 1
                  );
  parse_results($rxdeb);
}

if ($all || $tests[9]) {
  print "\n******** TEST 9 ********\n";

  print "\nrxdebug -servers $servers -port $port -onlyauth $onlyauth\n\n";

  $rxdeb = rxdebug(servers  => $servers,
                   port     => $port,
                   onlyauth => $onlyauth
                  );
  parse_results($rxdeb);
}

if ($all || $tests[10]) {
  print "\n******** TEST 10 ********\n";

  print "\nrxdebug -servers $servers -port $port -allconnections\n\n";

  $rxdeb = rxdebug(servers        => $servers,
                   port           => $port,
                   allconnections => 1
                  );
  parse_results($rxdeb);
}

if ($all || $tests[11]) {
  print "\n******** TEST 11 ********\n";

  print "\nrxdebug -servers $servers -port $port -allconnections -onlyserver\n\n";

  $rxdeb = rxdebug(allconnections => 1,
                   onlyserver     => 1,
                   servers        => $servers,
                   port           => $port
                  );
  parse_results($rxdeb);
}

if ($all || $tests[12]) {
  print "\n******** TEST 12 ********\n";

  print "\nrxdebug -servers $servers -port $port -allconnections -onlyclient -onlyport $onlyport -onlyhost $onlyhost\n\n";

  $rxdeb = rxdebug(allconnections => 1,
                   onlyclient     => 1,
                   onlyport       => $onlyport,
                   servers        => $servers,
                   port           => $port,
                   onlyhost       => $onlyhost
                  );
  parse_results ($rxdeb);
}

if ($all || $tests[13]) {
  print "\n******** TEST 13 ********\n";

  print "\nrxdebug -servers $servers\n\n";

  $rxdeb = rxdebug(servers => $servers);
  parse_results ($rxdeb);
}

if ($all || $tests[14]) {
  print "\n******** TEST 14 ********\n";

  print "\nrxdebug 0\n\n";

  $rxdeb = rxdebug();
  parse_results ($rxdeb);
}

if ($all || $tests[15]) {
  print "\n******** TEST 15 ********\n";

  print "\nrxdebug 0 -port $port\n\n";

  $rxdeb = rxdebug(port => $port);
  parse_results ($rxdeb);
}

if ($all || $tests[16]) {
  print "\n******** TEST 16 ********\n";

  print "\nrxdebug -servers $servers -port $port -allconnections -peers -long -rxstats\n\n";

  $rxdeb = rxdebug(allconnections => 1,
                   rxstats        => 1,
                   peers          => 1,
                   long           => 1,
                   servers        => $servers,
                   port           => $port
                  );
  parse_results($rxdeb);
}


sub parse_results {
  my $val = shift;

  # if there was an error, print it and then return.
  if ($AFS::CODE) {
    print "Error case: ", ref($val), "\n" if (defined($val));
    # die("Error: AFS::CODE = $AFS::CODE (", ($AFS::CODE+0), ")\n");
    print "Error: AFS::CODE = $AFS::CODE (", ($AFS::CODE+0), ")\n";
    return;
  }

  # print entire hash to screen
  if ($showdump) {
    print Dumper($val);
    return;
  }

  # print ip address and port
  print "For ", $val->{address}, " (port ", $val->{port}, ") ...\n";

  # prints everything as the rxdebug function would

  # print version if it was returned
  if (exists $val->{version}) {
    print "AFS version: ", $val->{version}, "\n";
  }

  # print tstats if they were returned
  if (exists $val->{tstats}) {
    print "Free packets: $val->{tstats}->{nFreePackets}, ";
    print "packet reclaims: $val->{tstats}->{packetReclaims}, ";
    print "calls: $val->{tstats}->{callsExecuted}, ";
    print "used FDs: $val->{tstats}->{usedFDs}\n";
    if (!$val->{tstats}->{waitingForPackets}) {
      print "not ";
    }
    print "waiting for packets.\n";
    if (exists $val->{tstats}->{nWaiting}) {
      print "$val->{tstats}->{nWaiting} calls waiting for a thread\n";
    }
    if (exists $val->{tstats}->{idleThreads}) {
      print "$val->{tstats}->{idleThreads} threads are idle\n";
    }
  }

  # print rxstats if they were returned
  if (exists $val->{rxstats}) {

    print "rx stats: free packets ", $val->{tstats}->{nFreePackets},
          ", allocs ", $val->{rxstats}->{packetRequests}, ", ";

    if ($val->{tstats}->{version} >=
               constant("RX_DEBUGI_VERSION_W_NEWPACKETTYPES")) {

      print "alloc-failures(rcv ", $val->{rxstats}->{receivePktAllocFailures},
        "/", $val->{rxstats}->{receiveCbufPktAllocFailures},
        ",send ", $val->{rxstats}->{sendPktAllocFailures},
        "/", $val->{rxstats}->{sendCbufPktAllocFailures},
        ",ack ", $val->{rxstats}->{specialPktAllocFailures}, ")\n";
    } else {
      print "alloc-failures(rcv ", $val->{rxstats}->{receivePktAllocFailures},
            ",send ", $val->{rxstats}->{sendPktAllocFailures},
            ",ack ", $val->{rxstats}->{specialPktAllocFailures}, ")\n";
    }

    print "   greedy ", $val->{rxstats}->{socketGreedy},
          ", bogusReads ", $val->{rxstats}->{bogusPacketOnRead},
          " (last from host ", $val->{rxstats}->{bogusHost},
          "), noPackets ", $val->{rxstats}->{noPacketOnRead},
          ", noBuffers ", $val->{rxstats}->{noPacketBuffersOnRead},
          ", selects ", $val->{rxstats}->{selects},
          ", sendSelects ", $val->{rxstats}->{sendSelects}, "\n";

    print "   packets read: ";
    foreach my $key (sort keys %{$val->{rxstats}->{packets}}) {
      print $key, " ", $val->{rxstats}->{packets}->{$key}->{packetsRead}, " ";
    }
    print "\n";

    print "   other read counters: data ", $val->{rxstats}->{dataPacketsRead},
          ", ack ", $val->{rxstats}->{ackPacketsRead},
          ", dup ", $val->{rxstats}->{dupPacketsRead},
          " spurious ", $val->{rxstats}->{spuriousPacketsRead},
          " dally ", $val->{rxstats}->{ignorePacketDally}, "\n";

    print "   packets sent: ";
    foreach my $key (sort keys %{$val->{rxstats}->{packets}}) {
      print $key, " ", $val->{rxstats}->{packets}->{$key}->{packetsSent}, " ";
    }
    print "\n";

    print "   other send counters: ack ", $val->{rxstats}->{ackPacketsSent},
          ", data ", $val->{rxstats}->{dataPacketsSent},
          " (not resends), resends ", $val->{rxstats}->{dataPacketsReSent},
          ", pushed ", $val->{rxstats}->{dataPacketsPushed},
          ", acked&ignored ", $val->{rxstats}->{ignoreAckedPacket}, "\n";
    print "   \t(these should be small) ",
          "sendFailed ", $val->{rxstats}->{netSendFailures},
          ", fatalErrors ", $val->{rxstats}->{fatalErrors}, "\n";

    if ($val->{rxstats}->{nRttSamples}) {
      my $avrtt = $val->{rxstats}->{totalRtt}->{usec} / 1000000.00;
         $avrtt = $avrtt + $val->{rxstats}->{totalRtt}->{sec};
         $avrtt = $avrtt / $val->{rxstats}->{nRttSamples};

      printf("   Average rtt is %0.3f, with %d samples\n",
                 $avrtt,
                 $val->{rxstats}->{nRttSamples});

      my $minrtt = $val->{rxstats}->{minRtt}->{usec} / 1000000.00;
         $minrtt = $minrtt + $val->{rxstats}->{minRtt}->{sec};
      my $maxrtt = $val->{rxstats}->{maxRtt}->{usec} / 1000000.00;
         $maxrtt = $maxrtt + $val->{rxstats}->{maxRtt}->{sec};
      printf("   Minimum rtt is %0.3f, maximum is %0.3f\n",
            $minrtt,
            $maxrtt);
    }

    print "   ", $val->{rxstats}->{nServerConns}, " server connections, ",
           $val->{rxstats}->{nClientConns}, " client connections, ",
           $val->{rxstats}->{nPeerStructs}, " peer structs, ",
           $val->{rxstats}->{nCallStructs}, " call structs, ",
           $val->{rxstats}->{nFreeCallStructs}, " free call structs\n";
    if (exists $val->{rxstats}->{clock_nUpdates}) {
      print "   ", $val->{rxstats}->{clock_nUpdates}, " clock updates\n";
    }
  }

  # print connections if they were returned
  if (exists $val->{connections}) {
    for (my $i = 0; $i <= $#{$val->{connections}}; $i++) { # print each connection
      print "Connection from host ", $val->{connections}->[$i]->{host},
            ", port ", $val->{connections}->[$i]->{port},", ";

      if ($val->{connections}->[$i]->{epoch}) {
        printf "Cuid %x/%x", $val->{connections}->[$i]->{epoch}, $val->{connections}->[$i]->{cid};
      } else {
        printf "cid %x", $val->{connections}->[$i]->{cid};
      }
      if ($val->{connections}->[$i]->{error}) {
        print ", error ", $val->{connections}->[$i]->{error};
      }
      print "\n  serial $val->{connections}->[$i]->{serial}, ";
      print " natMTU $val->{connections}->[$i]->{natMTU}, ";

      if ($val->{connections}->[$i]->{flags}) {
        print "flags";
        if ($val->{connections}->[$i]->{flags} & constant("RX_CONN_MAKECALL_WAITING")) {
          print " MAKECALL_WAITING";
        }
        if ($val->{connections}->[$i]->{flags} & constant("RX_CONN_DESTROY_ME")) {
          print " DESTROYED";
        }
        if ($val->{connections}->[$i]->{flags} & constant("RX_CONN_USING_PACKET_CKSUM")) {
          print " pktCksum";
        }
        print ", ";
      }

      print "security index $val->{connections}->[$i]->{securityIndex}, ";
      if ($val->{connections}->[$i]->{type} == constant("RX_CLIENT_CONNECTION")) {
        print "client conn\n";
      } else {
        print "server conn\n";
      }

      # print secStats if this connection has them
      if (exists $val->{connections}->[$i]->{secStats}) {
        my $secStatsType = $val->{connections}->[$i]->{secStats}->{type};
        if ($secStatsType == 0) {
          if ($val->{connections}->[$i]->{securityIndex} == 2) {
            print "  no GetStats procedure for security object\n";
          }
        } elsif ($secStatsType == 1) {
          print "  rxnull level=", $val->{connections}->[$i]->{secStats}->{level};
          print ", flags=", $val->{connections}->[$i]->{secStats}->{flags},"\n";
        } elsif ($secStatsType == 2) {
          print "  rxvab level=", $val->{connections}->[$i]->{secStats}->{level};
          print ", flags=", $val->{connections}->[$i]->{secStats}->{flags},"\n";
        } elsif ($secStatsType == 3) {
          my $secStatsLevel;
          my $secStatsFlags = $val->{connections}->[$i]->{secStats}->{flags};
          if ($val->{connections}->[$i]->{secStats}->{level} == 0) {
            $secStatsLevel = "clear";
          } elsif ($val->{connections}->[$i]->{secStats}->{level} == 1) {
            $secStatsLevel = "auth";
          } elsif ($val->{connections}->[$i]->{secStats}->{level} == 2) {
            $secStatsLevel = "crypt";
          } else {
            $secStatsLevel = "unknown";
          }
          print "  rxkad: level ", $secStatsLevel;
          if ($secStatsFlags) {
            print ", flags";
          }
          if ($secStatsFlags & 1) {
            print " unalloc";
          }
          if ($secStatsFlags & 2) {
            print " authenticated";
          }
          if ($secStatsFlags & 4) {
            print " expired";
          }
          if ($secStatsFlags & 8) {
            print " pktCksum";
          }
          if ($val->{connections}->[$i]->{secStats}->{expires}) {
            my $secStatsExpires = $val->{connections}->[$i]->{secStats}->{expires} - time();
            $secStatsExpires = $secStatsExpires / 3600.0;
            printf(", expires in %.1f hours", $secStatsExpires);
          }
          if (!($secStatsFlags & 1)) {
            print "\n  Received ", $val->{connections}->[$i]->{secStats}->{bytesReceived},
                  " bytes in ", $val->{connections}->[$i]->{secStats}->{packetsReceived}," packets\n";
            print "  Sent ", $val->{connections}->[$i]->{secStats}->{bytesSent},
                  " bytes in ", $val->{connections}->[$i]->{secStats}->{packetsSent}, " packets\n";
          } else {
            print "\n";
          }
        } else {
          print "  unknown\n";
        }
      } # done printing secStats

      # print calls for this connection
      for (my $j = 0; $j < constant("RX_MAXCALLS"); $j++) {
        print "    call ", $j, ": # ", $val->{connections}->[$i]->{callNumber}->[$j], ", state ";

        # print call state
        if ($val->{connections}->[$i]->{callState}->[$j] == constant("RX_STATE_NOTINIT")) {
          print "not initialized\n";
          next;
        } elsif ($val->{connections}->[$i]->{callState}->[$j] == constant("RX_STATE_PRECALL")) {
          print "precall, ";
        } elsif ($val->{connections}->[$i]->{callState}->[$j] == constant("RX_STATE_ACTIVE")) {
          print "active, ";
        } elsif ($val->{connections}->[$i]->{callState}->[$j] == constant("RX_STATE_DALLY")) {
          print "dally, ";
        } elsif ($val->{connections}->[$i]->{callState}->[$j] == constant("RX_STATE_HOLD")) {
          print "hold, ";
        }

        # print call mode
        print "mode: ";
        if ($val->{connections}->[$i]->{callMode}->[$j] == constant("RX_MODE_SENDING")) {
          print "sending";
        } elsif ($val->{connections}->[$i]->{callMode}->[$j] == constant("RX_MODE_RECEIVING")) {
          print "receiving";
        } elsif ($val->{connections}->[$i]->{callMode}->[$j] == constant("RX_MODE_ERROR")) {
          print "error";
        } elsif ($val->{connections}->[$i]->{callMode}->[$j] == constant("RX_MODE_EOF")) {
          print "eof";
        } else {
          print "unknown";
        }

        # print flags for this call
        if ($val->{connections}->[$i]->{callFlags}->[$j]) {
          printf(", flags:");
          if ($val->{connections}->[$i]->{callFlags}->[$j] & constant("RX_CALL_READER_WAIT")) {
            print " reader_wait";
          }
          if ($val->{connections}->[$i]->{callFlags}->[$j] & constant("RX_CALL_WAIT_WINDOW_ALLOC")) {
            print " window_alloc";
          }
          if ($val->{connections}->[$i]->{callFlags}->[$j] & constant("RX_CALL_WAIT_WINDOW_SEND")) {
            print " window_send";
          }
          if ($val->{connections}->[$i]->{callFlags}->[$j] & constant("RX_CALL_WAIT_PACKETS")) {
            print " wait_packets";
          }
          if ($val->{connections}->[$i]->{callFlags}->[$j] & constant("RX_CALL_WAIT_PROC")) {
            print " waiting_for_process";
          }
          if ($val->{connections}->[$i]->{callFlags}->[$j] & constant("RX_CALL_RECEIVE_DONE")) {
            print " receive_done";
          }
          if ($val->{connections}->[$i]->{callFlags}->[$j] & constant("RX_CALL_CLEARED")) {
            print " call_cleared";
          }
        }
        if ($val->{connections}->[$i]->{callOther}->[$j] & constant("RX_OTHER_IN")) {
          print ", has_input_packets";
        }
        if ($val->{connections}->[$i]->{callOther}->[$j] & constant("RX_OTHER_OUT")) {
          print ", has_output_packets";
        }
        print "\n";
      }
    }
    # if -nodally flag was set, print number of dallying connections skipped
    if (exists $val->{dallyCounter}) {
      print "Skipped ", $val->{dallyCounter}, " dallying connections.\n";
    }
  } # done printing connections

  # print peers if they were returned
  if (exists $val->{peers}) {
    for (my $i = 0; $i <= $#{$val->{peers}}; $i++) {
      print "Peer at host ", $val->{peers}->[$i]->{host},
            ", port ", $val->{peers}->[$i]->{port}, "\n";

      printf("\tifMTU %hu\tnatMTU %hu\tmaxMTU %hu\n",
              $val->{peers}->[$i]->{ifMTU},
              $val->{peers}->[$i]->{natMTU},
              $val->{peers}->[$i]->{maxMTU});
      printf("\tpackets sent %d\tpacket resends %d\n",
              $val->{peers}->[$i]->{nSent},
              $val->{peers}->[$i]->{reSends});
      printf("\tbytes sent high %d low %d\n",
              $val->{peers}->[$i]->{bytesSent}->{high},
              $val->{peers}->[$i]->{bytesSent}->{low});
      printf("\tbytes received high %d low %d\n",
              $val->{peers}->[$i]->{bytesReceived}->{high},
              $val->{peers}->[$i]->{bytesReceived}->{low});

      my $tpeer_rtt = $val->{peers}->[$i]->{rtt} >> 3;
      my $tpeer_rtt_dev = $val->{peers}->[$i]->{rtt_dev} >> 2;
      printf("\trtt %d msec, rtt_dev %d msec\n",
             $tpeer_rtt, $tpeer_rtt_dev);

      my $timeoutusec = $val->{peers}->[$i]->{timeout}->{usec};
      $timeoutusec = $timeoutusec / 1000;
      printf("\ttimeout %d.%03d sec\n",
              $val->{peers}->[$i]->{timeout}->{sec}, $timeoutusec);

      # prints extra information if -long flag was set
      if (exists $val->{peers}->[$i]->{inPacketSkew}) {
        printf("\tin/out packet skew: %d/%d\n",
                $val->{peers}->[$i]->{inPacketSkew},
                $val->{peers}->[$i]->{outPacketSkew});
        printf("\tcongestion window %d, MTU %d\n",
                $val->{peers}->[$i]->{cwind},
                $val->{peers}->[$i]->{MTU});
        printf("\tcurrent/if/max jumbogram size: %d/%d/%d\n",
                $val->{peers}->[$i]->{nDgramPackets},
                $val->{peers}->[$i]->{ifDgramPackets},
                $val->{peers}->[$i]->{maxDgramPackets});
      }
    }
  }
}

print "...Done\n";

examples/scout  view on Meta::CPAN

#!/usr/bin/perl -w
#
# Copyright © 2004 Alf Wachsmann <alfw@slac.stanford.edu> and
#                  Elizabeth Cassell <e_a_c@mailsnare.net>
#
# $Revision: 1.6 $ $Date: 2004/10/22 15:04:40 $ $Author: alfw $
#

use blib;
use strict;
use AFS::Monitor;
use Data::Dumper;

my @servers   = ("virtue");
my $debugfile = "debug_out/debug";
my $basename  = "openafs.org";

my @tests;      # choose which tests to run
$tests[1] = 1;  # blank
$tests[2] = 1;  # blank

my $all = 0;

my $showdump = 1;   # print entire contents of hash for each test
my $formatted = 0;  # print formatted, easy to read output
my $scout = 1;      # print only the information displayed by the original (c) scout program

print "# Starting now... #\n";
my $result;


if ($all || $tests[1]) {
  print "\n******** TEST 1: ********\n";

  print "\nscout -server ", join(" ", @servers),
        " -debug $debugfile -basename $basename\n\n";

  $result = scout(server   => \@servers,
                  debug    => $debugfile,
                  basename => $basename);
  parse_result($result);
}


if ($all || $tests[2]) {
  print "\n******** TEST 2: ********\n";

  print "\nscout -server virtue.openafs.org\n\n";

  $result = scout(server   => "virtue.openafs.org");
  parse_result($result);
}


sub parse_result {
  my $info = shift;

  if ($AFS::CODE) {
    print "Error case: ", ref($info), "\n" if (defined($info));
    # die("Error: AFS::CODE = $AFS::CODE (", ($AFS::CODE+0), ")\n");
    print "Error: AFS::CODE = $AFS::CODE (", ($AFS::CODE+0), ")\n";
    return;
  }

  if ($showdump) {
    local $Data::Dumper::Quotekeys = 0;
    local $Data::Dumper::Sortkeys = 1;
    local $Data::Dumper::Indent = 1;
    local $Data::Dumper::Varname = "scout";
    print Dumper($info);
  }

  if ($formatted) {
    foreach my $connection (@$info) {
      print $connection->{hostName}, "\n";
      if ($connection->{probeOK}) {
        print "  Results:\n";
        foreach my $stat (sort keys %{$connection->{stats}}) {
          print "    $stat  $connection->{stats}->{$stat}\n";
        }
      } else {
        print "  Probe Failed.\n";
      }
    }
  }

  if ($scout) {
    foreach my $connection (@$info) {
      print $connection->{hostName}, "\n";
      if ($connection->{probeOK}) {
        print "   Conn: $connection->{stats}->{CurrentConnections}\n";
        print "  Fetch: $connection->{stats}->{TotalFetchs}\n";
        print "  Store: $connection->{stats}->{TotalStores}\n";
        print "     Ws: $connection->{stats}->{WorkStations}\n";
        print "  Disk attn:\n";
        foreach my $disk (@{$connection->{stats}->{Disk}}) {
          print "         $disk->{Name}:$disk->{BlocksAvailable} (";
          printf "%0.2f%%)\n", ($disk->{TotalBlock} - $disk->{BlocksAvailable}) * 100 / $disk->{TotalBlock};
        }
      } else {
        print "  Probe Failed.\n";
      }
    }
  }
}

examples/scripts/HandlerScript  view on Meta::CPAN

#!/usr/bin/perl -w
#
# Copyright © 2004 Alf Wachsmann <alfw@slac.stanford.edu> and
#                  Elizabeth Cassell <e_a_c@mailsnare.net>
#
# $Revision: 1.1 $ $Date: 2004/08/05 20:52:03 $ $Author: alfw $
#

print "*** Handler Script called for an overflow!   ***\n";
print "*** Host name: ", shift, " type: ", shift, "  ***\n";
print "*** Overflow in field ", shift,
                " (threshold ", shift, ",
                      actual ", shift, ") ***\n";

my $otherargs = shift;

if ($otherargs) {
  print "*** Other arguments: ", $otherargs;
  while ($otherargs = shift) {
    print " ", $otherargs;
  }
  print " ***\n";
}

examples/udebug  view on Meta::CPAN

#!/usr/bin/perl -w
#
# Copyright © 2004 Alf Wachsmann <alfw@slac.stanford.edu> and
#                  Elizabeth Cassell <e_a_c@mailsnare.net>
#
# $Revision: 1.8 $ $Date: 2004/10/22 15:04:40 $ $Author: alfw $
#

use blib;
use strict;
use AFS::Monitor qw(udebug constant);
use Data::Dumper;

my $server          = "virtue.openafs.org";
my $non_sync_server = "andrew.e.kth.se";
my $port            = 7003;

my @tests;      # choose which tests to run
$tests[1] = 0;  # test of server $server, port $port, long output
$tests[2] = 0;  # test of server $non_sync_server, port $port, short output
$tests[3] = 0;  # test of server $non_sync_server, port $port, long output
$tests[4] = 0;  # test of server $server, no port
$tests[5] = 1;  # test of nonexistant server
$tests[6] = 1;  # test of server $server, bad port
$tests[7] = 0;  # test of server $server, port $port

my $all = 0;

my $showdump = 0;   # print entire contents of hash for each test
my $formatted = 1;  # print output formatted like the C udebug program


print "# Starting now... #\n";
my $result;

if ($all || $tests[1]) {
  print "\n******** TEST 1: ********\n";

  print "\nudebug -server $server -port $port -long\n\n";

  $result = udebug(server => $server,
                   port   => $port
                  );
  parse_result($result);
}

if ($all || $tests[2]) {
  print "\n******** TEST 2: ********\n";

  print "\nudebug -server $non_sync_server -port $port\n\n";

  $result = udebug(server => $non_sync_server,
                   port   => $port
                  );
  parse_result($result);
}

if ($all || $tests[3]) {
  print "\n******** TEST 3: ********\n";

  print "\nudebug -server $non_sync_server -port $port -long\n\n";

  $result = udebug(server => $non_sync_server,
                   port   => $port,
                   long   => 1
                  );
  parse_result($result);
}

if ($all || $tests[4]) {
  print "\n******** TEST 4: ********\n";

  print "\nudebug -server $server\n\n";

  $result =udebug(server => $server);
  parse_result($result);
}

if ($all || $tests[5]) {
  print "\n******** TEST 5: ********\n";

  print "\nudebug -server nonexistant\n\n";

  $result = udebug(server => "nonexistant");
  parse_result($result);
}

if ($all || $tests[6]) {
  print "\n******** TEST 6: ********\n";

  print "\nudebug -server $server -port 7001\n\n";

  $result = udebug(server => $server,
                   port   => 7001
                  );
  parse_result($result);
}

if ($all || $tests[7]) {
  print "\n******** TEST 7: ********\n";

  print "\nudebug -server $server -port $port\n\n";

  $result = udebug(server => $server,
                   port   => $port
                  );
  parse_result($result);
}


sub parse_result {
  my $info = shift;

  if ($AFS::CODE) {
    print "Error case: ", ref($info), "\n" if (defined($info));
    # die("Error: AFS::CODE = $AFS::CODE (", ($AFS::CODE+0), ")\n");
    print "Error: AFS::CODE = $AFS::CODE (", ($AFS::CODE+0), ")\n";
    return;
  }

  if ($showdump) {
    local $Data::Dumper::Indent = 1;
    local $Data::Dumper::Quotekeys = 0;
    local $Data::Dumper::Sortkeys = 1;
    print Dumper($info);
  }

  if ($formatted) {
    my $diff;

    if (exists $info->{interfaceAddr}) {
      print "Host's addresses are: ", join(" ", @{$info->{interfaceAddr}}),
            "\n";
    }
    printf("Host's %s time is %s\n",
           $info->{host},
           scalar localtime($info->{now}));

    $diff = time - $info->{now};
    printf("Local time is %s (time differential %d secs)\n",
           scalar localtime(time),
           $diff);
    if (abs($diff) >= constant("MAXSKEW")) {
      print "****clock may be bad\n";
    }
    if (exists $info->{lastYesHost}) {
      $diff = $info->{now} - $info->{lastYesTime};
      printf("Last yes vote for %s was %d secs ago (%ssync site); \n",
             $info->{lastYesHost}, $diff, $info->{lastYesState} ? "" : "not ");
      $diff = $info->{now} - $info->{lastYesClaim};
      printf("Last vote started %d secs ago (at %s)\n",
              $diff,
              scalar localtime(time - $diff));
    } else {
      print "Last yes vote not cast yet \n";
    }

    printf "Local db version is %d.%d\n",
            $info->{localVersion}->{epoch},
            $info->{localVersion}->{counter};
    if ($info->{amSyncSite}) {
      if ($info->{syncSiteUntil} == 0x7fffffff) {
        printf("I am sync site forever (%d server%s)\n",
		$info->{nServers},
                $info->{nServers} > 1 ? "s" : "");
      } else {
        $diff = $info->{syncSiteUntil} - $info->{now};
        printf("I am sync site until %d secs from now (at %s) (%d server%s)\n",
                $diff,
                scalar localtime(time + $diff),
                $info->{nServers},
                $info->{nServers} > 1 ? "s" : "");
      }
      printf("Recovery state %x\n", $info->{recoveryState});
      if ($info->{activeWrite}) {
        printf("I am currently managing write trans %d.%d\n",
                $info->{epochTime},
                $info->{tidCounter});
      }
    } else {
      if ($info->{isClone}) {
        print "I am a clone and never can become sync site\n";
      } else {
        print "I am not sync site\n";
      }
      $diff = $info->{now} - $info->{lowestTime};
      printf("Lowest host %s was set %d secs ago\n",
              $info->{lowestHost}, $diff);

      $diff = $info->{now} - $info->{syncTime};
      printf("Sync host %s was set %d secs ago\n",
              $info->{syncHost}, $diff);
    }

    printf("Sync site's db version is %d.%d\n",
	    $info->{syncVersion}->{epoch},
            $info->{syncVersion}->{counter});
    printf("%d locked pages, %d of them for write\n",
	    $info->{lockedPages},
            $info->{writeLockedPages});

    if ($info->{anyReadLocks}) {
      print "There are read locks held\n";
    }
    if ($info->{anyWriteLocks}) {
      print "There are write locks held\n";
    }

    if ($info->{currentTrans}) {
      if ($info->{writeTrans}) {
        print "There is an active write transaction\n";
      } else {
        print "There is at least one active read transaction\n";
      }
      printf("Transaction tid is %d.%d\n",
              $info->{syncTid}->{epoch},
              $info->{syncTid}->{counter});
    }
    if ($info->{epochTime}) {
      $diff = $info->{now} - $info->{epochTime};
      printf("Last time a new db version was labelled was:\n\t %d secs ago (at %s)\n",
	      $diff, scalar localtime(time - $diff));
    }

    if (exists $info->{servers}) {
      foreach my $current (@{$info->{servers}}) {
        printf("\nServer (%s", $current->{addr});
        if (exists $current->{altAddr}) {
          print " ", join(" ", @{$current->{altAddr}});
        }
        printf("): (db %d.%d)",
                $current->{remoteVersion}->{epoch},
                $current->{remoteVersion}->{counter});
        if ($current->{isClone}) {
          print "    is only a clone!";
        }
        print "\n";

        if ($current->{lastVoteTime} == 0) {
          print "    last vote never rcvd \n";
        } else {
          $diff = $info->{now} - $current->{lastVoteTime};
          printf("    last vote rcvd %d secs ago (at %s),\n",
                  $diff, scalar localtime(time - $diff));
        }

        if ($current->{lastBeaconSent} == 0) {
          print "    last beacon never sent \n";
        } else {
          $diff = $info->{now} - $current->{lastBeaconSent};
          printf("    last beacon sent %d secs ago (at %s), last vote was %s\n",
                 $diff,
                 scalar localtime(time - $diff),
                 $current->{lastVote} ? "yes" : "no");
        }

        printf("    dbcurrent=%d, up=%d beaconSince=%d\n",
                $current->{currentDB},
                $current->{up},
                $current->{beaconSinceDown});
      }
    }
  }
}

examples/xstat_cm_test  view on Meta::CPAN

#!/usr/bin/perl -w
#
# Copyright © 2004 Alf Wachsmann <alfw@slac.stanford.edu> and
#                  Elizabeth Cassell <e_a_c@mailsnare.net>
#
# $Revision: 1.8 $ $Date: 2006/05/31 16:22:51 $ $Author: alfw $
#

use blib;
use strict;
use AFS::Monitor qw(xstat_cm_test constant);
use Data::Dumper;

my @cmname = ("virtue.openafs.org", "andrew.e.kth.se");
my @collID = (0, 1, 2);

my @tests;      # choose which tests to run
$tests[1] = 1;  # test of cmname @cmname and collIDs @collID
$tests[2] = 0;  # test of cmname but no collID
$tests[3] = 0;  # test of single cmname with collID
$tests[4] = 0;  # test of single cmname but no single collID

my $all = 1;

my $showdump = 0;   # print entire contents of hash for each test
my $formatted = 1;  # print formatted like original xstat_cm_test program

print "# Starting now... #\n";
my $result;


if ($all || $tests[1]) {
  print "\n******** TEST 1: ********\n";

  print "\nxstat_cm_test -cmname ", join(" ", @cmname),
        " -collID ", join(" ", @collID), "\n\n";

  $result = xstat_cm_test(cmname => \@cmname,
                          collID => \@collID);
  parse_result($result);
}

if ($all || $tests[2]) {
  print "\n******** TEST 2: ********\n";

  print "\nxstat_cm_test -cmname ", join(" ", @cmname), "\n\n";

  $result = xstat_cm_test(cmname => \@cmname);
  parse_result($result);
}


if ($all || $tests[3]) {
  print "\n******** TEST 3: ********\n";

  print "\nxstat_cm_test -cmname ", $cmname[0],
                       " -collID 2\n\n";

  $result = xstat_cm_test(cmname => $cmname[0],
                          collID => 2);
  parse_result($result);
}


if ($all || $tests[4]) {
  print "\n******** TEST 4: ********\n";

  print "\nxstat_cm_test -cmname ", $cmname[0], "\n\n";

  $result = xstat_cm_test(cmname => $cmname[0]);
  parse_result($result);
}



sub parse_result {
  my $info = shift;

  if ($AFS::CODE) {
    print "Error case: ", ref($info), "\n" if (defined($info));
    # die("Error: AFS::CODE = $AFS::CODE (", ($AFS::CODE+0), ")\n");
    print "Error: AFS::CODE = $AFS::CODE (", ($AFS::CODE+0), ")\n";
    return;
  }

  if ($showdump) {
    local $Data::Dumper::Quotekeys = 0;
    local $Data::Dumper::Sortkeys = 1;
    local $Data::Dumper::Indent = 1;
    local $Data::Dumper::Maxdepth = 2;
    local $Data::Dumper::Varname = "xstat_cm_test";
    print Dumper($info);
  }

  if ($formatted) {
    foreach my $host (@$info) {
      if ($host->{probeOK} == 0) {
        printf("CM_Handler: Probe 1, collection %d to CM on '%s' failed\n",
                $host->{collectionNumber},
                $host->{hostName});
        return;
      }
      if ($host->{collectionNumber} == constant("AFSCB_XSTATSCOLL_CALL_INFO")) {
        PrintCallInfo($host);
      } elsif ($host->{collectionNumber} == constant("AFSCB_XSTATSCOLL_PERF_INFO")) {
        PrintPerfInfo($host);
      } elsif ($host->{collectionNumber} == constant("AFSCB_XSTATSCOLL_FULL_PERF_INFO")) {
        PrintFullPerfInfo($host);
      } else {
        printf "** Unknown collection: %d\n", $host->{collectionNumber};
      }
    }
  }
}


sub PrintPerfInfo {
  my $host = shift;

  printf("AFSCB_XSTATSCOLL_PERF_INFO (coll %d) for CM %s\n[Probe 1, %s]\n\n",
          $host->{collectionNumber},
          $host->{hostName},
          scalar localtime $host->{probeTime});

  PrintOverallPerfInfo($host->{data});
}


sub PrintFullPerfInfo {
  my $host = shift;

  printf("AFSCB_XSTATSCOLL_FULL_PERF_INFO (coll %d) for CM %s\n[Probe 1, %s]\n\n",
          $host->{collectionNumber},
          $host->{hostName},
          scalar localtime $host->{probeTime});

  print "Overall Performance Info:\n-------------------------\n";

  PrintOverallPerfInfo($host->{data}->{perf});

  print "\n";

  PrintRPCPerfInfo($host->{data}->{rpc});

  my $authentP = $host->{data}->{authent};
  print "\nAuthentication info:\n--------------------\n";

  printf("\t%d PAGS, %d records (%d auth, %d unauth), %d max in PAG, chain max: %d\n",
          $authentP->{curr_PAGs},
          $authentP->{curr_Records},
          $authentP->{curr_AuthRecords},
          $authentP->{curr_UnauthRecords},
          $authentP->{curr_MaxRecordsInPAG},
          $authentP->{curr_LongestChain});
  printf("\t%d PAG creations, %d tkt updates\n",
          $authentP->{PAGCreations},
          $authentP->{TicketUpdates});
  printf("\t[HWMs: %d PAGS, %d records, %d max in PAG, chain max: %d]\n",
          $authentP->{HWM_PAGs},
          $authentP->{HWM_Records},
          $authentP->{HWM_MaxRecordsInPAG},
          $authentP->{HWM_LongestChain});

  my $accessinfP = $host->{data}->{accessinf};
  print "\n[Un]replicated accesses:\n------------------------\n";
  printf("\t%d unrep, %d rep, %d reps accessed, %d max reps/ref, %d first OK\n\n",
          $accessinfP->{unreplicatedRefs},
          $accessinfP->{replicatedRefs},
          $accessinfP->{numReplicasAccessed},
          $accessinfP->{maxReplicasPerRef},
          $accessinfP->{refFirstReplicaOK});
}


sub PrintOverallPerfInfo {
  my $perf = shift;

  printf "\t%10d numPerfCalls\n", $perf->{numPerfCalls};

  printf "\t%10d epoch\n",	 $perf->{epoch};
  printf "\t%10d numCellsVisible\n", $perf->{numCellsVisible};
  printf "\t%10d numCellsContacted\n", $perf->{numCellsContacted};
  printf "\t%10d dlocalAccesses\n", $perf->{dlocalAccesses};
  printf "\t%10d vlocalAccesses\n", $perf->{vlocalAccesses};
  printf "\t%10d dremoteAccesses\n", $perf->{dremoteAccesses};
  printf "\t%10d vremoteAccesses\n", $perf->{vremoteAccesses};
  printf "\t%10d cacheNumEntries\n", $perf->{cacheNumEntries};
  printf "\t%10d cacheBlocksTotal\n", $perf->{cacheBlocksTotal};
  printf "\t%10d cacheBlocksInUse\n", $perf->{cacheBlocksInUse};
  printf "\t%10d cacheBlocksOrig\n", $perf->{cacheBlocksOrig};
  printf "\t%10d cacheMaxDirtyChunks\n", $perf->{cacheMaxDirtyChunks};
  printf "\t%10d cacheCurrDirtyChunks\n", $perf->{cacheCurrDirtyChunks};
  printf "\t%10d dcacheHits\n", $perf->{dcacheHits};
  printf "\t%10d vcacheHits\n", $perf->{vcacheHits};
  printf "\t%10d dcacheMisses\n", $perf->{dcacheMisses};
  printf "\t%10d vcacheMisses\n", $perf->{vcacheMisses};
  printf "\t%10d cacheFilesReused\n", $perf->{cacheFilesReused};
  printf "\t%10d vcacheXAllocs\n", $perf->{vcacheXAllocs};
  printf "\t%10d dcacheXAllocs\n", $perf->{dcacheXAllocs};

  printf "\t%10d bufAlloced\n", $perf->{bufAlloced};
  printf "\t%10d bufHits\n",	 $perf->{bufHits};
  printf "\t%10d bufMisses\n", $perf->{bufMisses};
  printf "\t%10d bufFlushDirty\n", $perf->{bufFlushDirty};

  printf "\t%10d LargeBlocksActive\n", $perf->{LargeBlocksActive};
  printf "\t%10d LargeBlocksAlloced\n", $perf->{LargeBlocksAlloced};
  printf "\t%10d SmallBlocksActive\n", $perf->{SmallBlocksActive};
  printf "\t%10d SmallBlocksAlloced\n", $perf->{SmallBlocksAlloced};
  printf "\t%10d OutStandingMemUsage\n", $perf->{OutStandingMemUsage};
  printf "\t%10d OutStandingAllocs\n", $perf->{OutStandingAllocs};
  printf "\t%10d CallBackAlloced\n", $perf->{CallBackAlloced};
  printf "\t%10d CallBackFlushes\n", $perf->{CallBackFlushes};
  printf "\t%10d CallBackLoops\n", $perf->{cbloops};

  printf "\t%10d srvRecords\n", $perf->{srvRecords};
  printf "\t%10d srvNumBuckets\n", $perf->{srvNumBuckets};
  printf "\t%10d srvMaxChainLength\n", $perf->{srvMaxChainLength};
  printf "\t%10d srvMaxChainLengthHWM\n", $perf->{srvMaxChainLengthHWM};
  printf "\t%10d srvRecordsHWM\n", $perf->{srvRecordsHWM};

  printf "\t%10d sysName_ID\n", $perf->{sysName_ID};

  print "\tFile Server up/downtimes, same cell:\n";
  PrintUpDownStats($perf->{fs_UpDown}->[0]);

  print "\tFile Server up/downtimes, diff cell:\n";
  PrintUpDownStats($perf->{fs_UpDown}->[1]);

  print "\tVL Server up/downtimes, same cell:\n";
  PrintUpDownStats($perf->{vl_UpDown}->[0]);

  print "\tVL Server up/downtimes, diff cell:\n";
  PrintUpDownStats($perf->{vl_UpDown}->[1]);
}


sub PrintUpDownStats {
  my $updown = shift;

  printf "\t\t%10d numTtlRecords\n",	$updown->{numTtlRecords};
  printf "\t\t%10d numUpRecords\n",	$updown->{numUpRecords};
  printf "\t\t%10d numDownRecords\n",	$updown->{numDownRecords};
  printf "\t\t%10d sumOfRecordAges\n",$updown->{sumOfRecordAges};
  printf "\t\t%10d ageOfYoungestRecord\n",$updown->{ageOfYoungestRecord};
  printf "\t\t%10d ageOfOldestRecord\n",$updown->{ageOfOldestRecord};
  printf "\t\t%10d numDowntimeIncidents\n",$updown->{numDowntimeIncidents};
  printf "\t\t%10d numRecordsNeverDown\n",$updown->{numRecordsNeverDown};
  printf "\t\t%10d maxDowntimesInARecord\n",$updown->{maxDowntimesInARecord};
  printf "\t\t%10d sumOfDowntimes\n",	$updown->{sumOfDowntimes};
  printf "\t\t%10d shortestDowntime\n",$updown->{shortestDowntime};
  printf "\t\t%10d longestDowntime\n",$updown->{longestDowntime};

  printf "\t\tDowntime duration distribution:\n";
  printf "\t\t\t%8d: 0 min .. 10 min\n",  $updown->{downDurations}->[0];
  printf "\t\t\t%8d: 10 min .. 30 min\n", $updown->{downDurations}->[1];
  printf "\t\t\t%8d: 30 min .. 1 hr\n",   $updown->{downDurations}->[2];
  printf "\t\t\t%8d: 1 hr .. 2 hr\n",     $updown->{downDurations}->[3];
  printf "\t\t\t%8d: 2 hr .. 4 hr\n",     $updown->{downDurations}->[4];
  printf "\t\t\t%8d: 4 hr .. 8 hr\n",     $updown->{downDurations}->[5];
  printf "\t\t\t%8d: > 8 hr\n",           $updown->{downDurations}->[6];

  printf "\t\tDowntime incident distribution:\n";
  printf "\t\t\t%8d: 0 times\n",        $updown->{downIncidents}->[0];
  printf "\t\t\t%8d: 1 time\n",         $updown->{downIncidents}->[1];
  printf "\t\t\t%8d: 2 .. 5 times\n",   $updown->{downIncidents}->[2];
  printf "\t\t\t%8d: 6 .. 10 times\n",  $updown->{downIncidents}->[3];
  printf "\t\t\t%8d: 10 .. 50 times\n", $updown->{downIncidents}->[4];
  printf "\t\t\t%8d: > 50 times\n",     $updown->{downIncidents}->[5];
}


sub PrintRPCPerfInfo {
  my $rpc = shift;

  print "FS Operation Timings:\n---------------------\n";
  foreach (sort keys %{$rpc->{fsRPCTimes}}) {
    printf "%15s: %d ops (%d OK); sum=%f, sqr=%f, min=%f, max=%f\n",
           $_,
           $rpc->{fsRPCTimes}->{$_}->{numOps}, $rpc->{fsRPCTimes}->{$_}->{numSuccesses},
           $rpc->{fsRPCTimes}->{$_}->{sumTime}, $rpc->{fsRPCTimes}->{$_}->{sqrTime},
           $rpc->{fsRPCTimes}->{$_}->{minTime}, $rpc->{fsRPCTimes}->{$_}->{maxTime};
  }

  print "\nError Info:\n-----------\n";
  foreach (sort keys %{$rpc->{fsRPCErrors}}) {
    printf "%15s: %d server, %d network, %d prot, %d vol, %d busies, %d other\n",
           $_,
           $rpc->{fsRPCErrors}->{$_}->{err_Server},
           $rpc->{fsRPCErrors}->{$_}->{err_Network},
           $rpc->{fsRPCErrors}->{$_}->{err_Protection},
           $rpc->{fsRPCErrors}->{$_}->{err_Volume},
           $rpc->{fsRPCErrors}->{$_}->{err_VolumeBusies},
           $rpc->{fsRPCErrors}->{$_}->{err_Other};
  }

  print "\nTransfer timings:\n-----------------\n";
  foreach (sort keys %{$rpc->{fsXferTimes}}) {
    printf "%s: %d xfers (%d OK), time sum=%f, sqr=%f, min=%f, max=%f\n",
           $_,
           $rpc->{fsXferTimes}->{$_}->{numXfers}, $rpc->{fsXferTimes}->{$_}->{numSuccesses},
           $rpc->{fsXferTimes}->{$_}->{sumTime},
           $rpc->{fsXferTimes}->{$_}->{sqrTime},
           $rpc->{fsXferTimes}->{$_}->{minTime},
           $rpc->{fsXferTimes}->{$_}->{maxTime};

    printf "\t[bytes: sum=%d, min=%d, max=%d]\n",
           $rpc->{fsXferTimes}->{$_}->{sumBytes},
           $rpc->{fsXferTimes}->{$_}->{minBytes},
           $rpc->{fsXferTimes}->{$_}->{maxBytes};

    printf "\t[buckets: 0: %d, 1: %d, 2: %d, 3: %d, 4: %d, 5: %d, 6: %d, 7: %d, 8: %d]\n",
           $rpc->{fsXferTimes}->{$_}->{count}->[0],
           $rpc->{fsXferTimes}->{$_}->{count}->[1],
           $rpc->{fsXferTimes}->{$_}->{count}->[2],
           $rpc->{fsXferTimes}->{$_}->{count}->[3],
           $rpc->{fsXferTimes}->{$_}->{count}->[4],
           $rpc->{fsXferTimes}->{$_}->{count}->[5],
           $rpc->{fsXferTimes}->{$_}->{count}->[6],
           $rpc->{fsXferTimes}->{$_}->{count}->[7],
           $rpc->{fsXferTimes}->{$_}->{count}->[8];
  }

  print "\nCM Operation Timings:\n---------------------\n";
  foreach (sort keys %{$rpc->{cmRPCTimes}}) {
    printf "%15s: %d ops (%d OK); sum=%f, sqr=%f, min=%f, max=%f\n",
           $_,
           $rpc->{cmRPCTimes}->{$_}->{numOps}, $rpc->{cmRPCTimes}->{$_}->{numSuccesses},
           $rpc->{cmRPCTimes}->{$_}->{sumTime}, $rpc->{cmRPCTimes}->{$_}->{sqrTime},
           $rpc->{cmRPCTimes}->{$_}->{minTime}, $rpc->{cmRPCTimes}->{$_}->{maxTime};
  }
}



sub PrintCallInfo {
  my $host = shift;

  printf "AFSCB_XSTATSCOLL_CALL_INFO (coll %d) for CM %s\n[Probe 1, %s]\n\n",
    $host->{collectionNumber},
    $host->{hostName},
    scalar localtime $host->{probeTime};

  my $data = $host->{data};

  printf "\t%10d afs_init\n", $data->{afs_init};
  printf "\t%10d gop_rdwr\n", $data->{gop_rdwr};
  printf "\t%10d aix_gnode_rele\n", $data->{aix_gnode_rele};
  printf "\t%10d gettimeofday\n", $data->{gettimeofday};
  printf "\t%10d m_cpytoc\n", $data->{m_cpytoc};
  printf "\t%10d aix_vattr_null\n", $data->{aix_vattr_null};
  printf "\t%10d afs_gn_frunc\n", $data->{afs_gn_ftrunc};
  printf "\t%10d afs_gn_rdwr\n", $data->{afs_gn_rdwr};
  printf "\t%10d afs_gn_ioctl\n", $data->{afs_gn_ioctl};
  printf "\t%10d afs_gn_locktl\n", $data->{afs_gn_lockctl};
  printf "\t%10d afs_gn_readlink\n", $data->{afs_gn_readlink};
  printf "\t%10d afs_gn_readdir\n", $data->{afs_gn_readdir};
  printf "\t%10d afs_gn_select\n", $data->{afs_gn_select};
  printf "\t%10d afs_gn_strategy\n", $data->{afs_gn_strategy};
  printf "\t%10d afs_gn_symlink\n", $data->{afs_gn_symlink};
  printf "\t%10d afs_gn_revoke\n", $data->{afs_gn_revoke};
  printf "\t%10d afs_gn_link\n", $data->{afs_gn_link};
  printf "\t%10d afs_gn_mkdir\n", $data->{afs_gn_mkdir};
  printf "\t%10d afs_gn_mknod\n", $data->{afs_gn_mknod};
  printf "\t%10d afs_gn_remove\n", $data->{afs_gn_remove};
  printf "\t%10d afs_gn_rename\n", $data->{afs_gn_rename};
  printf "\t%10d afs_gn_rmdir\n", $data->{afs_gn_rmdir};
  printf "\t%10d afs_gn_fid\n", $data->{afs_gn_fid};
  printf "\t%10d afs_gn_lookup\n", $data->{afs_gn_lookup};
  printf "\t%10d afs_gn_open\n", $data->{afs_gn_open};
  printf "\t%10d afs_gn_create\n", $data->{afs_gn_create};
  printf "\t%10d afs_gn_hold\n", $data->{afs_gn_hold};
  printf "\t%10d afs_gn_rele\n", $data->{afs_gn_rele};
  printf "\t%10d afs_gn_unmap\n", $data->{afs_gn_unmap};
  printf "\t%10d afs_gn_access\n", $data->{afs_gn_access};
  printf "\t%10d afs_gn_getattr\n", $data->{afs_gn_getattr};
  printf "\t%10d afs_gn_setattr\n", $data->{afs_gn_setattr};
  printf "\t%10d afs_gn_fclear\n", $data->{afs_gn_fclear};
  printf "\t%10d afs_gn_fsync\n", $data->{afs_gn_fsync};
  printf "\t%10d phash\n", $data->{pHash};
  printf "\t%10d DInit\n", $data->{DInit};
  printf "\t%10d DRead\n", $data->{DRead};
  printf "\t%10d FixupBucket\n", $data->{FixupBucket};
  printf "\t%10d afs_newslot\n", $data->{afs_newslot};
  printf "\t%10d DRelease\n", $data->{DRelease};
  printf "\t%10d DFlush\n", $data->{DFlush};
  printf "\t%10d DFlushEntry\n", $data->{DFlushEntry};
  printf "\t%10d DVOffset\n", $data->{DVOffset};
  printf "\t%10d DZap\n", $data->{DZap};
  printf "\t%10d DNew\n", $data->{DNew};
  printf "\t%10d afs_RemoveVCB\n", $data->{afs_RemoveVCB};
  printf "\t%10d afs_NewVCache\n", $data->{afs_NewVCache};
  printf "\t%10d afs_FlushActiveVcaches\n", $data->{afs_FlushActiveVcaches};
  printf "\t%10d afs_VerifyVCache\n", $data->{afs_VerifyVCache};
  printf "\t%10d afs_WriteVCache\n", $data->{afs_WriteVCache};
  printf "\t%10d afs_GetVCache\n", $data->{afs_GetVCache};
  printf "\t%10d afs_StuffVcache\n", $data->{afs_StuffVcache};
  printf "\t%10d afs_FindVCache\n", $data->{afs_FindVCache};
  printf "\t%10d afs_PutDCache\n", $data->{afs_PutDCache};
  printf "\t%10d afs_PutVCache\n", $data->{afs_PutVCache};
  printf "\t%10d CacheStoreProc\n", $data->{CacheStoreProc};
  printf "\t%10d afs_FindDcache\n", $data->{afs_FindDCache};
  printf "\t%10d afs_TryToSmush\n", $data->{afs_TryToSmush};
  printf "\t%10d afs_AdjustSize\n", $data->{afs_AdjustSize};
  printf "\t%10d afs_CheckSize\n", $data->{afs_CheckSize};
  printf "\t%10d afs_StoreWarn\n", $data->{afs_StoreWarn};
  printf "\t%10d CacheFetchProc\n", $data->{CacheFetchProc};
  printf "\t%10d UFS_CacheStoreProc\n", $data->{UFS_CacheStoreProc};
  printf "\t%10d UFS_CacheFetchProc\n", $data->{UFS_CacheFetchProc};
  printf "\t%10d afs_GetDCache\n", $data->{afs_GetDCache};
  printf "\t%10d afs_SimpleVStat\n", $data->{afs_SimpleVStat};
  printf "\t%10d afs_ProcessFS\n", $data->{afs_ProcessFS};
  printf "\t%10d afs_InitCacheInfo\n", $data->{afs_InitCacheInfo};
  printf "\t%10d afs_InitVolumeInfo\n", $data->{afs_InitVolumeInfo};
  printf "\t%10d afs_InitCacheFile\n", $data->{afs_InitCacheFile};
  printf "\t%10d afs_CacheInit\n", $data->{afs_CacheInit};
  printf "\t%10d afs_GetDSlot\n", $data->{afs_GetDSlot};
  printf "\t%10d afs_WriteThroughDSlots\n", $data->{afs_WriteThroughDSlots};
  printf "\t%10d afs_MemGetDSlot\n", $data->{afs_MemGetDSlot};
  printf "\t%10d afs_UFSGetDSlot\n", $data->{afs_UFSGetDSlot};
  printf "\t%10d afs_StoreDCache\n", $data->{afs_StoreDCache};
  printf "\t%10d afs_StoreMini\n", $data->{afs_StoreMini};
  printf "\t%10d afs_StoreAllSegments\n", $data->{afs_StoreAllSegments};
  printf "\t%10d afs_InvalidateAllSegments\n", $data->{afs_InvalidateAllSegments};
  printf "\t%10d afs_TruncateAllSegments\n", $data->{afs_TruncateAllSegments};
  printf "\t%10d afs_CheckVolSync\n", $data->{afs_CheckVolSync};
  printf "\t%10d afs_wakeup\n", $data->{afs_wakeup};
  printf "\t%10d afs_CFileOpen\n", $data->{afs_CFileOpen};
  printf "\t%10d afs_CFileTruncate\n", $data->{afs_CFileTruncate};
  printf "\t%10d afs_GetDownD\n", $data->{afs_GetDownD};
  printf "\t%10d afs_WriteDCache\n", $data->{afs_WriteDCache};
  printf "\t%10d afs_FlushDCache\n", $data->{afs_FlushDCache};
  printf "\t%10d afs_GetDownDSlot\n", $data->{afs_GetDownDSlot};
  printf "\t%10d afs_FlushVCache\n", $data->{afs_FlushVCache};
  printf "\t%10d afs_GetDownV\n", $data->{afs_GetDownV};
  printf "\t%10d afs_QueueVCB\n", $data->{afs_QueueVCB};
  printf "\t%10d afs_call\n", $data->{afs_call};
  printf "\t%10d afs_syscall_call\n", $data->{afs_syscall_call};
  printf "\t%10d afs_syscall_icreate\n", $data->{afs_syscall_icreate};
  printf "\t%10d afs_syscall_iopen\n", $data->{afs_syscall_iopen};
  printf "\t%10d afs_syscall_iincdec\n", $data->{afs_syscall_iincdec};
  printf "\t%10d afs_syscall_ireadwrite\n", $data->{afs_syscall_ireadwrite};
  printf "\t%10d afs_syscall\n", $data->{afs_syscall};
  printf "\t%10d lpioctl\n", $data->{lpioctl};
  printf "\t%10d lsetpag\n", $data->{lsetpag};
  printf "\t%10d afs_CheckInit\n", $data->{afs_CheckInit};
  printf "\t%10d ClearCallback\n", $data->{ClearCallBack};
  printf "\t%10d SRXAFSCB_GetCE\n", $data->{SRXAFSCB_GetCE};
  printf "\t%10d SRXAFSCB_GetLock\n", $data->{SRXAFSCB_GetLock};
  printf "\t%10d SRXAFSCB_CallBack\n", $data->{SRXAFSCB_CallBack};
  printf "\t%10d SRXAFSCB_InitCallBackState\n", $data->{SRXAFSCB_InitCallBackState};
  printf "\t%10d SRXAFSCB_Probe\n", $data->{SRXAFSCB_Probe};
  printf "\t%10d afs_Chunk\n", $data->{afs_Chunk};
  printf "\t%10d afs_ChunkBase\n", $data->{afs_ChunkBase};
  printf "\t%10d afs_ChunkOffset\n", $data->{afs_ChunkOffset};
  printf "\t%10d afs_ChunkSize\n", $data->{afs_ChunkSize};
  printf "\t%10d afs_ChunkToBase\n", $data->{afs_ChunkToBase};
  printf "\t%10d afs_ChunkToSize\n", $data->{afs_ChunkToSize};
  printf "\t%10d afs_SetChunkSize\n", $data->{afs_SetChunkSize};
  printf "\t%10d afs_config\n", $data->{afs_config};
  printf "\t%10d mem_freebytes\n", $data->{mem_freebytes};
  printf "\t%10d mem_getbytes\n", $data->{mem_getbytes};
  printf "\t%10d afs_Daemon\n", $data->{afs_Daemon};
  printf "\t%10d afs_CheckRootVolume\n", $data->{afs_CheckRootVolume};
  printf "\t%10d BPath\n", $data->{BPath};
  printf "\t%10d BPrefetch\n", $data->{BPrefetch};
  printf "\t%10d BStore\n", $data->{BStore};
  printf "\t%10d afs_BBusy\n", $data->{afs_BBusy};
  printf "\t%10d afs_BQueue\n", $data->{afs_BQueue};
  printf "\t%10d afs_BRelease\n", $data->{afs_BRelease};
  printf "\t%10d afs_BackgroundDaemon\n", $data->{afs_BackgroundDaemon};
  printf "\t%10d exporter_add\n", $data->{exporter_add};
  printf "\t%10d exporter_find\n", $data->{exporter_find};
  printf "\t%10d afs_gfs_kalloc\n", $data->{afs_gfs_kalloc};
  printf "\t%10d afs_gfs_kfree\n", $data->{afs_gfs_kfree};
  printf "\t%10d gop_lookupname\n", $data->{gop_lookupname};
  printf "\t%10d afs_uniqtime\n", $data->{afs_uniqtime};
  printf "\t%10d gfs_vattr_null\n", $data->{gfs_vattr_null};
  printf "\t%10d afs_lock\n", $data->{afs_lock};
  printf "\t%10d afs_unlock\n", $data->{afs_unlock};
  printf "\t%10d afs_update\n", $data->{afs_update};
  printf "\t%10d afs_gclose\n", $data->{afs_gclose};
  printf "\t%10d afs_gopen\n", $data->{afs_gopen};
  printf "\t%10d afs_greadlink\n", $data->{afs_greadlink};
  printf "\t%10d afs_select\n", $data->{afs_select};
  printf "\t%10d afs_gbmap\n", $data->{afs_gbmap};
  printf "\t%10d afs_getfsdata\n", $data->{afs_getfsdata};
  printf "\t%10d afs_gsymlink\n", $data->{afs_gsymlink};
  printf "\t%10d afs_namei\n", $data->{afs_namei};
  printf "\t%10d afs_gmount\n", $data->{afs_gmount};
  printf "\t%10d afs_gget\n", $data->{afs_gget};
  printf "\t%10d afs_glink\n", $data->{afs_glink};
  printf "\t%10d afs_gmkdir\n", $data->{afs_gmkdir};
  printf "\t%10d afs_unlink\n", $data->{afs_unlink};
  printf "\t%10d afs_grmdir\n", $data->{afs_grmdir};
  printf "\t%10d afs_makenode\n", $data->{afs_makenode};
  printf "\t%10d afs_grename\n", $data->{afs_grename};
  printf "\t%10d afs_rele\n", $data->{afs_rele};
  printf "\t%10d afs_syncgp\n", $data->{afs_syncgp};
  printf "\t%10d afs_getval\n", $data->{afs_getval};
  printf "\t%10d afs_trunc\n", $data->{afs_trunc};
  printf "\t%10d afs_rwgp\n", $data->{afs_rwgp};
  printf "\t%10d afs_stat\n", $data->{afs_stat};
  printf "\t%10d afsc_link\n", $data->{afsc_link};
  printf "\t%10d afs_vfs_mount\n", $data->{afs_vfs_mount};
  printf "\t%10d afs_uniqtime\n", $data->{afs_uniqtime};
  printf "\t%10d iopen\n", $data->{iopen};
  printf "\t%10d idec\n", $data->{idec};
  printf "\t%10d iinc\n", $data->{iinc};
  printf "\t%10d ireadwrite\n", $data->{ireadwrite};
  printf "\t%10d iread\n", $data->{iread};
  printf "\t%10d iwrite\n", $data->{iwrite};
  printf "\t%10d iforget\n", $data->{iforget};
  printf "\t%10d icreate\n", $data->{icreate};
  printf "\t%10d igetinode\n", $data->{igetinode};
  printf "\t%10d osi_SleepR\n", $data->{osi_SleepR};
  printf "\t%10d osi_SleepS\n", $data->{osi_SleepS};
  printf "\t%10d osi_SleepW\n", $data->{osi_SleepW};
  printf "\t%10d osi_Sleep\n", $data->{osi_Sleep};
  printf "\t%10d afs_LookupMCE\n", $data->{afs_LookupMCE};
  printf "\t%10d afs_MemReadBlk\n", $data->{afs_MemReadBlk};
  printf "\t%10d afs_MemReadUIO\n", $data->{afs_MemReadUIO};
  printf "\t%10d afs_MemWriteBlk\n", $data->{afs_MemWriteBlk};
  printf "\t%10d afs_MemWriteUIO\n", $data->{afs_MemWriteUIO};
  printf "\t%10d afs_MemCacheStoreProc\n", $data->{afs_MemCacheStoreProc};
  printf "\t%10d afs_MemCacheFetchProc\n", $data->{afs_MemCacheFetchProc};
  printf "\t%10d afs_MemCacheTruncate\n", $data->{afs_MemCacheTruncate};
  printf "\t%10d afs_MemCacheStoreProc\n", $data->{afs_MemCacheStoreProc};
  printf "\t%10d afs_GetNfsClientPag\n", $data->{afs_GetNfsClientPag};
  printf "\t%10d afs_FindNfsClientPag\n", $data->{afs_FindNfsClientPag};
  printf "\t%10d afs_PutNfsClientPag\n", $data->{afs_PutNfsClientPag};
  printf "\t%10d afs_nfsclient_reqhandler\n", $data->{afs_nfsclient_reqhandler};
  printf "\t%10d afs_nfsclient_GC\n", $data->{afs_nfsclient_GC};
  printf "\t%10d afs_nfsclient_hold\n", $data->{afs_nfsclient_hold};
  printf "\t%10d afs_nfsclient_stats\n", $data->{afs_nfsclient_stats};
  printf "\t%10d afs_nfsclient_sysname\n", $data->{afs_nfsclient_sysname};
  printf "\t%10d afs_rfs_dispatch\n", $data->{afs_rfs_dispatch};
  printf "\t%10d afs_nfs2afscall\n", $data->{Nfs2AfsCall};
  printf "\t%10d afs_sun_xuntext\n", $data->{afs_sun_xuntext};
  printf "\t%10d osi_Active\n", $data->{osi_Active};
  printf "\t%10d osi_FlushPages\n", $data->{osi_FlushPages};
  printf "\t%10d osi_FlushText\n", $data->{osi_FlushText};
  printf "\t%10d osi_CallProc\n", $data->{osi_CallProc};
  printf "\t%10d osi_CancelProc\n", $data->{osi_CancelProc};
  printf "\t%10d osi_Invisible\n", $data->{osi_Invisible};
  printf "\t%10d osi_Time\n", $data->{osi_Time};
  printf "\t%10d osi_Alloc\n", $data->{osi_Alloc};
  printf "\t%10d osi_SetTime\n", $data->{osi_SetTime};
  printf "\t%10d osi_Dump\n", $data->{osi_Dump};
  printf "\t%10d osi_Free\n", $data->{osi_Free};
  printf "\t%10d osi_UFSOpen\n", $data->{osi_UFSOpen};
  printf "\t%10d osi_Close\n", $data->{osi_Close};
  printf "\t%10d osi_Stat\n", $data->{osi_Stat};
  printf "\t%10d osi_Truncate\n", $data->{osi_Truncate};
  printf "\t%10d osi_Read\n", $data->{osi_Read};
  printf "\t%10d osi_Write\n", $data->{osi_Write};
  printf "\t%10d osi_MapStrategy\n", $data->{osi_MapStrategy};
  printf "\t%10d osi_AllocLargeSpace\n", $data->{osi_AllocLargeSpace};
  printf "\t%10d osi_FreeLargeSpace\n", $data->{osi_FreeLargeSpace};
  printf "\t%10d osi_AllocSmallSpace\n", $data->{osi_AllocSmallSpace};
  printf "\t%10d osi_FreeSmallSpace\n", $data->{osi_FreeSmallSpace};
  printf "\t%10d osi_CloseToTheEdge\n", $data->{osi_CloseToTheEdge};
  printf "\t%10d osi_xgreedy\n", $data->{osi_xgreedy};
  printf "\t%10d osi_FreeSocket\n", $data->{osi_FreeSocket};
  printf "\t%10d osi_NewSocket\n", $data->{osi_NewSocket};
  printf "\t%10d osi_NetSend\n", $data->{osi_NetSend};
  printf "\t%10d WaitHack\n", $data->{WaitHack};
  printf "\t%10d osi_CancelWait\n", $data->{osi_CancelWait};
  printf "\t%10d osi_Wakeup\n", $data->{osi_Wakeup};
  printf "\t%10d osi_Wait\n", $data->{osi_Wait};
  printf "\t%10d dirp_Read\n", $data->{dirp_Read};
  printf "\t%10d dirp_Cpy\n", $data->{dirp_Cpy};
  printf "\t%10d dirp_Eq\n", $data->{dirp_Eq};
  printf "\t%10d dirp_Write\n", $data->{dirp_Write};
  printf "\t%10d dirp_Zap\n", $data->{dirp_Zap};
  printf "\t%10d afs_ioctl\n", $data->{afs_ioctl};
  printf "\t%10d handleIoctl\n", $data->{HandleIoctl};
  printf "\t%10d afs_xioctl\n", $data->{afs_xioctl};
  printf "\t%10d afs_pioctl\n", $data->{afs_pioctl};
  printf "\t%10d HandlePioctl\n", $data->{HandlePioctl};
  printf "\t%10d PGetVolumeStatus\n", $data->{PGetVolumeStatus};
  printf "\t%10d PSetVolumeStatus\n", $data->{PSetVolumeStatus};
  printf "\t%10d PFlush\n", $data->{PFlush};
  printf "\t%10d PFlushVolumeData\n", $data->{PFlushVolumeData};
  printf "\t%10d PNewStatMount\n", $data->{PNewStatMount};
  printf "\t%10d PGetTokens\n", $data->{PGetTokens};
  printf "\t%10d PSetTokens\n", $data->{PSetTokens};
  printf "\t%10d PUnlog\n", $data->{PUnlog};
  printf "\t%10d PCheckServers\n", $data->{PCheckServers};
  printf "\t%10d PCheckAuth\n", $data->{PCheckAuth};
  printf "\t%10d PCheckVolNames\n", $data->{PCheckVolNames};
  printf "\t%10d PFindVolume\n", $data->{PFindVolume};
  printf "\t%10d Prefetch\n", $data->{Prefetch};
  printf "\t%10d PGetCacheSize\n", $data->{PGetCacheSize};
  printf "\t%10d PSetCacheSize\n", $data->{PSetCacheSize};
  printf "\t%10d PSetSysName\n", $data->{PSetSysName};
  printf "\t%10d PExportAfs\n", $data->{PExportAfs};
  printf "\t%10d HandleClientContext\n", $data->{HandleClientContext};
  printf "\t%10d PViceAccess\n", $data->{PViceAccess};
  printf "\t%10d PRemoveCallBack\n", $data->{PRemoveCallBack};
  printf "\t%10d PRemoveMount\n", $data->{PRemoveMount};
  printf "\t%10d PSetVolumeStatus\n", $data->{PSetVolumeStatus};
  printf "\t%10d PListCells\n", $data->{PListCells};
  printf "\t%10d PNewCell\n", $data->{PNewCell};
  printf "\t%10d PGetUserCell\n", $data->{PGetUserCell};
  printf "\t%10d PGetCellStatus\n", $data->{PGetCellStatus};
  printf "\t%10d PSetCellStatus\n", $data->{PSetCellStatus};
  printf "\t%10d PVenusLogging\n", $data->{PVenusLogging};
  printf "\t%10d PGetAcl\n", $data->{PGetAcl};
  printf "\t%10d PGetFID\n", $data->{PGetFID};
  printf "\t%10d PSetAcl\n", $data->{PSetAcl};
  printf "\t%10d PGetFileCell\n", $data->{PGetFileCell};
  printf "\t%10d PGetWSCell\n", $data->{PGetWSCell};
  printf "\t%10d PGetSPrefs\n", $data->{PGetSPrefs};
  printf "\t%10d PSetSPrefs\n", $data->{PSetSPrefs};
  printf "\t%10d afs_ResetAccessCache\n", $data->{afs_ResetAccessCache};
  printf "\t%10d afs_FindUser\n", $data->{afs_FindUser};
  printf "\t%10d afs_GetUser\n", $data->{afs_GetUser};
  printf "\t%10d afs_GCUserData\n", $data->{afs_GCUserData};
  printf "\t%10d afs_PutUser\n", $data->{afs_PutUser};
  printf "\t%10d afs_SetPrimary\n", $data->{afs_SetPrimary};
  printf "\t%10d afs_ResetUserConns\n", $data->{afs_ResetUserConns};
  printf "\t%10d afs_RemoveUserConns\n", $data->{RemoveUserConns};
  printf "\t%10d afs_ResourceInit\n", $data->{afs_ResourceInit};
  printf "\t%10d afs_GetCell\n", $data->{afs_GetCell};
  printf "\t%10d afs_GetCellByIndex\n", $data->{afs_GetCellByIndex};
  printf "\t%10d afs_GetCellByName\n", $data->{afs_GetCellByName};
  if (exists $data->{afs_GetRealCellByIndex}) {
    printf "\t%10d afs_GetRealCellByIndex\n", $data->{afs_GetRealCellByIndex};
  }
  printf "\t%10d afs_NewCell\n", $data->{afs_NewCell};
  printf "\t%10d CheckVLDB\n", $data->{CheckVLDB};
  printf "\t%10d afs_GetVolume\n", $data->{afs_GetVolume};
  printf "\t%10d afs_PutVolume\n", $data->{afs_PutVolume};
  printf "\t%10d afs_GetVolumeByName\n", $data->{afs_GetVolumeByName};
  printf "\t%10d afs_random\n", $data->{afs_random};
  printf "\t%10d InstallVolumeEntry\n", $data->{InstallVolumeEntry};
  printf "\t%10d InstallVolumeInfo\n", $data->{InstallVolumeInfo};
  printf "\t%10d afs_ResetVolumeInfo\n", $data->{afs_ResetVolumeInfo};
  printf "\t%10d afs_FindServer\n", $data->{afs_FindServer};
  printf "\t%10d afs_GetServer\n", $data->{afs_GetServer};
  printf "\t%10d afs_SortServers\n", $data->{afs_SortServers};
  printf "\t%10d afs_CheckServers\n", $data->{afs_CheckServers};
  printf "\t%10d ServerDown\n", $data->{ServerDown};
  printf "\t%10d afs_Conn\n", $data->{afs_Conn};
  printf "\t%10d afs_PutConn\n", $data->{afs_PutConn};
  printf "\t%10d afs_ConnByHost\n", $data->{afs_ConnByHost};
  printf "\t%10d afs_ConnByMHosts\n", $data->{afs_ConnByMHosts};
  printf "\t%10d afs_Analyze\n", $data->{afs_Analyze};
  printf "\t%10d afs_CheckLocks\n", $data->{afs_CheckLocks};
  printf "\t%10d CheckVLServer\n", $data->{CheckVLServer};
  printf "\t%10d afs_CheckCacheResets\n", $data->{afs_CheckCacheResets};
  printf "\t%10d afs_CheckVolumeNames\n", $data->{afs_CheckVolumeNames};
  printf "\t%10d afs_CheckCode\n", $data->{afs_CheckCode};
  printf "\t%10d afs_CopyError\n", $data->{afs_CopyError};
  printf "\t%10d afs_FinalizeReq\n", $data->{afs_FinalizeReq};
  printf "\t%10d afs_GetVolCache\n", $data->{afs_GetVolCache};
  printf "\t%10d afs_GetVolSlot\n", $data->{afs_GetVolSlot};
  printf "\t%10d afs_UFSGetVolSlot\n", $data->{afs_UFSGetVolSlot};
  printf "\t%10d afs_MemGetVolSlot\n", $data->{afs_MemGetVolSlot};
  printf "\t%10d afs_WriteVolCache\n", $data->{afs_WriteVolCache};
  printf "\t%10d haveCallbacksfrom\n", $data->{HaveCallBacksFrom};
  printf "\t%10d afs_getpage\n", $data->{afs_getpage};
  printf "\t%10d afs_putpage\n", $data->{afs_putpage};
  printf "\t%10d afs_nfsrdwr\n", $data->{afs_nfsrdwr};
  printf "\t%10d afs_map\n", $data->{afs_map};
  printf "\t%10d afs_cmp\n", $data->{afs_cmp};
  printf "\t%10d afs_PageLeft\n", $data->{afs_PageLeft};
  printf "\t%10d afs_mount\n", $data->{afs_mount};
  printf "\t%10d afs_unmount\n", $data->{afs_unmount};
  printf "\t%10d afs_root\n", $data->{afs_root};
  printf "\t%10d afs_statfs\n", $data->{afs_statfs};
  printf "\t%10d afs_sync\n", $data->{afs_sync};
  printf "\t%10d afs_vget\n", $data->{afs_vget};
  printf "\t%10d afs_index\n", $data->{afs_index};
  printf "\t%10d afs_setpag\n", $data->{afs_setpag};
  printf "\t%10d genpag\n", $data->{genpag};
  printf "\t%10d getpag\n", $data->{getpag};
  printf "\t%10d afs_GetMariner\n", $data->{afs_GetMariner};
  printf "\t%10d afs_AddMarinerName\n", $data->{afs_AddMarinerName};
  printf "\t%10d afs_open\n", $data->{afs_open};
  printf "\t%10d afs_close\n", $data->{afs_close};
  printf "\t%10d afs_closex\n", $data->{afs_closex};
  printf "\t%10d afs_write\n", $data->{afs_write};
  printf "\t%10d afs_UFSwrite\n", $data->{afs_UFSWrite};
  printf "\t%10d afs_Memwrite\n", $data->{afs_MemWrite};
  printf "\t%10d afs_rdwr\n", $data->{afs_rdwr};
  printf "\t%10d afs_read\n", $data->{afs_read};
  printf "\t%10d afs_UFSread\n", $data->{afs_UFSRead};
  printf "\t%10d afs_Memread\n", $data->{afs_MemRead};
  printf "\t%10d afs_CopyOutAttrs\n", $data->{afs_CopyOutAttrs};
  printf "\t%10d afs_access\n", $data->{afs_access};
  printf "\t%10d afs_getattr\n", $data->{afs_getattr};
  printf "\t%10d afs_setattr\n", $data->{afs_setattr};
  printf "\t%10d afs_VAttrToAS\n", $data->{afs_VAttrToAS};
  printf "\t%10d EvalMountPoint\n", $data->{EvalMountPoint};
  printf "\t%10d afs_lookup\n", $data->{afs_lookup};
  printf "\t%10d afs_create\n", $data->{afs_create};
  printf "\t%10d afs_LocalHero\n", $data->{afs_LocalHero};
  printf "\t%10d afs_remove\n", $data->{afs_remove};
  printf "\t%10d afs_link\n", $data->{afs_link};
  printf "\t%10d afs_rename\n", $data->{afs_rename};
  printf "\t%10d afs_InitReq\n", $data->{afs_InitReq};
  printf "\t%10d afs_mkdir\n", $data->{afs_mkdir};
  printf "\t%10d afs_rmdir\n", $data->{afs_rmdir};
  printf "\t%10d afs_readdir\n", $data->{afs_readdir};
  printf "\t%10d afs_read1dir\n", $data->{afs_read1dir};
  printf "\t%10d afs_readdir_move\n", $data->{afs_readdir_move};
  printf "\t%10d afs_readdir_iter\n", $data->{afs_readdir_iter};
  printf "\t%10d afs_symlink\n", $data->{afs_symlink};
  printf "\t%10d afs_HandleLink\n", $data->{afs_HandleLink};
  printf "\t%10d afs_MemHandleLink\n", $data->{afs_MemHandleLink};
  printf "\t%10d afs_UFSHandleLink\n", $data->{afs_UFSHandleLink};
  printf "\t%10d HandleFlock\n", $data->{HandleFlock};
  printf "\t%10d afs_readlink\n", $data->{afs_readlink};
  printf "\t%10d afs_fsync\n", $data->{afs_fsync};
  printf "\t%10d afs_inactive\n", $data->{afs_inactive};
  printf "\t%10d afs_ustrategy\n", $data->{afs_ustrategy};
  printf "\t%10d afs_strategy\n", $data->{afs_strategy};
  printf "\t%10d afs_bread\n", $data->{afs_bread};
  printf "\t%10d afs_brelse\n", $data->{afs_brelse};
  printf "\t%10d afs_bmap\n", $data->{afs_bmap};
  printf "\t%10d afs_fid\n", $data->{afs_fid};
  printf "\t%10d afs_FakeOpen\n", $data->{afs_FakeOpen};
  printf "\t%10d afs_FakeClose\n", $data->{afs_FakeClose};
  printf "\t%10d afs_StoreOnLastReference\n", $data->{afs_StoreOnLastReference};
  printf "\t%10d afs_AccessOK\n", $data->{afs_AccessOK};
  printf "\t%10d afs_GetAccessBits\n", $data->{afs_GetAccessBits};
  printf "\t%10d afsio_copy\n", $data->{afsio_copy};
  printf "\t%10d afsio_trim\n", $data->{afsio_trim};
  printf "\t%10d afsio_skip\n", $data->{afsio_skip};
  printf "\t%10d afs_page_read\n", $data->{afs_page_read};
  printf "\t%10d afs_page_write\n", $data->{afs_page_write};
  printf "\t%10d afs_page_read\n", $data->{afs_page_read};
  printf "\t%10d afs_get_groups_from_pag\n", $data->{afs_get_groups_from_pag};
  printf "\t%10d afs_get_pag_from_groups\n", $data->{afs_get_pag_from_groups};
  printf "\t%10d AddPag\n", $data->{AddPag};
  printf "\t%10d PagInCred\n", $data->{PagInCred};
  printf "\t%10d afs_getgroups\n", $data->{afs_getgroups};
  printf "\t%10d afs_page_in\n", $data->{afs_page_in};
  printf "\t%10d afs_page_out\n", $data->{afs_page_out};
  printf "\t%10d afs_AdvanceFD\n", $data->{afs_AdvanceFD};
  printf "\t%10d afs_lockf\n", $data->{afs_lockf};
  printf "\t%10d afs_xsetgroups\n", $data->{afs_xsetgroups};
  printf "\t%10d afs_nlinks\n", $data->{afs_nlinks};
  printf "\t%10d afs_lockctl\n", $data->{afs_lockctl};
  printf "\t%10d afs_xflock\n", $data->{afs_xflock};
  printf "\t%10d PGetCPrefs\n", $data->{PGetCPrefs};
  printf "\t%10d PSetCPrefs\n", $data->{PSetCPrefs};
  if (exists $host->{afs_pagein}) {
    printf "\t%10d afs_pagein\n", $data->{afs_pagein};
    printf "\t%10d afs_pageout\n", $data->{afs_pageout};
    printf "\t%10d afs_hp_strategy\n", $data->{afs_hp_strategy};
  }
  printf "\t%10d PFlushMount\n", $data->{PFlushMount};
}

examples/xstat_fs_test  view on Meta::CPAN

#!/usr/bin/perl -w
#
# Copyright © 2004-2006
#		Alf Wachsmann <alfw@slac.stanford.edu> and
#		Elizabeth Cassell <e_a_c@mailsnare.net>
#
# $Revision: 1.8 $ $Date: 2006/07/05 22:25:10 $ $Author: alfw $
#

use blib;
use strict;
use AFS::Monitor qw(xstat_fs_test constant);
use Data::Dumper;

#my @fsname = ("virtue.openafs.org", "andrew.e.kth.se");
my @fsname = ("afs101.slac.stanford.edu");
my @collID = (0, 1, 2, 3);

my @tests;      # choose which tests to run
$tests[1] = 0;  # test of fsname @fsname and collIDs @collID
$tests[2] = 0;  # test of fsname but no collID
$tests[3] = 1;  # test of single fsname with collID 0
$tests[4] = 1;  # test of single fsname with collID 1
$tests[5] = 0;  # test of single fsname with collID 2
$tests[6] = 1;  # test of single fsname with collID 3
$tests[7] = 0;  # test of single fsname but no single collID

my $all = 0;

my $showdump = 0;   # print entire contents of hash for each test
my $formatted = 1;  # print formatted like original xstat_fs_test program

print "# Starting now... #\n";
my $result;

if ($all || $tests[1]) {
  print "\n******** TEST 1: ********\n";

  print "\nxstat_fs_test -fsname ", join(" ", @fsname),
        " -collID ", join(" ", @collID), "\n\n";

  $result = xstat_fs_test(fsname => \@fsname,
                          collID => \@collID);
  parse_result($result);
}

if ($all || $tests[2]) {
  print "\n******** TEST 2: ********\n";

  print "\nxstat_fs_test -fsname ", join(" ", @fsname), "\n\n";

  $result = xstat_fs_test(fsname => \@fsname);
  parse_result($result);
}


if ($all || $tests[3]) {
  print "\n******** TEST 3: ********\n";

  print "\nxstat_fs_test -fsname ", $fsname[0],
                       " -collID 0\n\n";

  $result = xstat_fs_test(fsname => $fsname[0],
                          collID => 0);
  parse_result($result);
}

if ($all || $tests[4]) {
  print "\n******** TEST 4: ********\n";

  print "\nxstat_fs_test -fsname ", $fsname[0],
                       " -collID 1\n\n";

  $result = xstat_fs_test(fsname => $fsname[0],
                          collID => 1);
  parse_result($result);
}

if ($all || $tests[5]) {
  print "\n******** TEST 5: ********\n";

  print "\nxstat_fs_test -fsname ", $fsname[0],
                       " -collID 2\n\n";

  $result = xstat_fs_test(fsname => $fsname[0],
                          collID => 2);
  parse_result($result);
}


if ($all || $tests[6]) {
  print "\n******** TEST 6: ********\n";

  print "\nxstat_fs_test -fsname ", $fsname[0],
                       " -collID 3\n\n";

  $result = xstat_fs_test(fsname => $fsname[0],
                          collID => 3);
  parse_result($result);
}


if ($all || $tests[7]) {
  print "\n******** TEST 7: ********\n";

  print "\nxstat_fs_test -fsname ", $fsname[0], "\n\n";

  $result = xstat_fs_test(fsname => $fsname[0]);
  parse_result($result);
}


sub parse_result {
  my $info = shift;

  if ($AFS::CODE) {
    print "Error case: ", ref($info), "\n" if (defined($info));
    # die("Error: AFS::CODE = $AFS::CODE (", ($AFS::CODE+0), ")\n");
    print "Error: AFS::CODE = $AFS::CODE (", ($AFS::CODE+0), ")\n";
    return;
  }

  if ($showdump) {
    local $Data::Dumper::Quotekeys = 0;
    local $Data::Dumper::Sortkeys = 1;
    local $Data::Dumper::Indent = 1;
    local $Data::Dumper::Varname = "xstat_fs_test";
    local $Data::Dumper::Maxdepth = 2;
    print Dumper($info);
  }

  if ($formatted) {
    foreach my $host (@$info) {
      print "\n------------------------------------------------------------\n";
      if ($host->{probeOK} == 0) {
        printf "FS_Handler: Probe 1 to File Server '$host->{hostName}' failed\n",
      } elsif($host->{collectionNumber} == constant("AFS_XSTATSCOLL_CALL_INFO")) {
        parse_CallInfo($host);
      } elsif($host->{collectionNumber} == constant("AFS_XSTATSCOLL_PERF_INFO")) {
        parse_PerfInfo($host);
      } elsif($host->{collectionNumber} == constant("AFS_XSTATSCOLL_FULL_PERF_INFO")) {
        parse_FullPerfInfo($host);
      } elsif($host->{collectionNumber} == constant("AFS_XSTATSCOLL_CBSTATS")) {
        parse_CbCounters($host);
      } else {
        print "Unknown collection: $host->{collectionNumber}\n";
      }
    }
  }
}


sub parse_CallInfo {
  my $host = shift;

  printf("AFS_XSTATSCOLL_CALL_INFO (coll %d) for FS %s\n[Probe 1, %s]\n\n",
          $host->{collectionNumber},
          $host->{hostName},
          scalar localtime $host->{probeTime});

  for (my $i = 0; $i < $host->{data}->{AFS_CollData_len}; $i++) {
    print $host->{i}, " ";
  }
  print "\n";
}


sub parse_PerfInfo {
  my $host = shift;

  printf("AFS_XSTATSCOLL_PERF_INFO (coll %d) for FS %s\n[Probe 1, %s]\n\n",
          $host->{collectionNumber},
          $host->{hostName},
          scalar localtime($host->{probeTime}));
  parse_OverallPerfInfo($host->{data});
}


sub parse_FullPerfInfo {
  my $host = shift;

  printf("AFS_XSTATSCOLL_FULL_PERF_INFO (coll %d) for FS %s\n[Probe 1, %s]\n\n",
          $host->{collectionNumber},
          $host->{hostName},
          scalar localtime($host->{probeTime}));
  parse_OverallPerfInfo($host->{data});
  parse_DetailedPerfInfo($host->{data});
}


sub parse_OverallPerfInfo {
  my $data = shift;

  printf "\t%10d numPerfCalls\n\n",      $data->{numPerfCalls};

  printf "\t%10d vcache_L_Entries\n",    $data->{vcache_L_Entries};
  printf "\t%10d vcache_L_Allocs\n",     $data->{vcache_L_Allocs};
  printf "\t%10d vcache_L_Gets\n",       $data->{vcache_L_Gets};
  printf "\t%10d vcache_L_Reads\n",      $data->{vcache_L_Reads};
  printf "\t%10d vcache_L_Writes\n\n",   $data->{vcache_L_Writes};

  printf "\t%10d vcache_S_Entries\n",    $data->{vcache_S_Entries};
  printf "\t%10d vcache_S_Allocs\n",     $data->{vcache_S_Allocs};
  printf "\t%10d vcache_S_Gets\n",       $data->{vcache_S_Gets};
  printf "\t%10d vcache_S_Reads\n",      $data->{vcache_S_Reads};
  printf "\t%10d vcache_S_Writes\n\n",   $data->{vcache_S_Writes};

  printf "\t%10d vcache_H_Entries\n",    $data->{vcache_H_Entries};
  printf "\t%10d vcache_H_Gets\n",       $data->{vcache_H_Gets};
  printf "\t%10d vcache_H_Replacements\n\n",     $data->{vcache_H_Replacements};

  printf "\t%10d dir_Buffers\n",     $data->{dir_Buffers};
  printf "\t%10d dir_Calls\n",       $data->{dir_Calls};
  printf "\t%10d dir_IOs\n\n",       $data->{dir_IOs};

  printf "\t%10d rx_packetRequests\n",     $data->{rx_packetRequests};
  printf "\t%10d rx_noPackets_RcvClass\n", $data->{rx_noPackets_RcvClass};
  printf "\t%10d rx_noPackets_SendClass\n",      $data->{rx_noPackets_SendClass};
  printf "\t%10d rx_noPackets_SpecialClass\n",   $data->{rx_noPackets_SpecialClass};
  printf "\t%10d rx_socketGreedy\n",       $data->{rx_socketGreedy};
  printf "\t%10d rx_bogusPacketOnRead\n",  $data->{rx_bogusPacketOnRead};
  printf "\t%10d rx_bogusHost\n",        $data->{rx_bogusHost};
  printf "\t%10d rx_noPacketOnRead\n",   $data->{rx_noPacketOnRead};
  printf "\t%10d rx_noPacketBuffersOnRead\n",    $data->{rx_noPacketBuffersOnRead};
  printf "\t%10d rx_selects\n",          $data->{rx_selects};
  printf "\t%10d rx_sendSelects\n",      $data->{rx_sendSelects};
  printf "\t%10d rx_packetsRead_RcvClass\n",     $data->{rx_packetsRead_RcvClass};
  printf "\t%10d rx_packetsRead_SendClass\n",    $data->{rx_packetsRead_SendClass};
  printf "\t%10d rx_packetsRead_SpecialClass\n", $data->{rx_packetsRead_SpecialClass};
  printf "\t%10d rx_dataPacketsRead\n",    $data->{rx_dataPacketsRead};
  printf "\t%10d rx_ackPacketsRead\n",     $data->{rx_ackPacketsRead};
  printf "\t%10d rx_dupPacketsRead\n",     $data->{rx_dupPacketsRead};
  printf "\t%10d rx_spuriousPacketsRead\n",      $data->{rx_spuriousPacketsRead};
  printf "\t%10d rx_packetsSent_RcvClass\n",     $data->{rx_packetsSent_RcvClass};
  printf "\t%10d rx_packetsSent_SendClass\n",    $data->{rx_packetsSent_SendClass};
  printf "\t%10d rx_packetsSent_SpecialClass\n", $data->{rx_packetsSent_SpecialClass};
  printf "\t%10d rx_ackPacketsSent\n",     $data->{rx_ackPacketsSent};
  printf "\t%10d rx_pingPacketsSent\n",    $data->{rx_pingPacketsSent};
  printf "\t%10d rx_abortPacketsSent\n",   $data->{rx_abortPacketsSent};
  printf "\t%10d rx_busyPacketsSent\n",    $data->{rx_busyPacketsSent};
  printf "\t%10d rx_dataPacketsSent\n",    $data->{rx_dataPacketsSent};
  printf "\t%10d rx_dataPacketsReSent\n",  $data->{rx_dataPacketsReSent};
  printf "\t%10d rx_dataPacketsPushed\n",  $data->{rx_dataPacketsPushed};
  printf "\t%10d rx_ignoreAckedPacket\n",  $data->{rx_ignoreAckedPacket};
  printf "\t%10d rx_totalRtt_Sec\n",       $data->{rx_totalRtt_Sec};
  printf "\t%10d rx_totalRtt_Usec\n",      $data->{rx_totalRtt_Usec};
  printf "\t%10d rx_minRtt_Sec\n",         $data->{rx_minRtt_Sec};
  printf "\t%10d rx_minRtt_Usec\n",        $data->{rx_minRtt_Usec};
  printf "\t%10d rx_maxRtt_Sec\n",         $data->{rx_maxRtt_Sec};
  printf "\t%10d rx_maxRtt_Usec\n",        $data->{rx_maxRtt_Usec};
  printf "\t%10d rx_nRttSamples\n",        $data->{rx_nRttSamples};
  printf "\t%10d rx_nServerConns\n",       $data->{rx_nServerConns};
  printf "\t%10d rx_nClientConns\n",       $data->{rx_nClientConns};
  printf "\t%10d rx_nPeerStructs\n",       $data->{rx_nPeerStructs};
  printf "\t%10d rx_nCallStructs\n",       $data->{rx_nCallStructs};
  printf "\t%10d rx_nFreeCallStructs\n", $data->{rx_nFreeCallStructs};
  if (defined($data->{rx_nBusies})) {  # only on OpenAFS-1.4.1
    printf "\t%10d rx_nBusies\n\n", $data->{rx_nBusies};

    printf "\t%10d fs_nBusies\n", $data->{fs_nBusies};
    printf "\t%10d fs_GetCapabilities\n\n", $data->{fs_GetCapabilities};
  }

  printf "\t%10d host_NumHostEntries\n",   $data->{host_NumHostEntries};
  printf "\t%10d host_HostBlocks\n",       $data->{host_HostBlocks};
  printf "\t%10d host_NonDeletedHosts\n",  $data->{host_NonDeletedHosts};
  printf "\t%10d host_HostsInSameNetOrSubnet\n", $data->{host_HostsInSameNetOrSubnet};
  printf "\t%10d host_HostsInDiffSubnet\n",      $data->{host_HostsInDiffSubnet};
  printf "\t%10d host_HostsInDiffNetwork\n",     $data->{host_HostsInDiffNetwork};
  printf "\t%10d host_NumClients\n",       $data->{host_NumClients};
  printf "\t%10d host_ClientBlocks\n\n",   $data->{host_ClientBlocks};

  printf "\t%10d sysname_ID\n",      $data->{sysname_ID};
}


sub parse_DetailedPerfInfo {
  my $data = shift;

  printf "\t%10d epoch\n", $data->{epoch};

  my $rpcop = $data->{rpcOpTimes};

  parse_OpTiming("FetchData", $rpcop);
  parse_OpTiming("FetchACL", $rpcop);
  parse_OpTiming("FetchStatus", $rpcop);
  parse_OpTiming("StoreData", $rpcop);
  parse_OpTiming("StoreACL", $rpcop);
  parse_OpTiming("StoreStatus", $rpcop);
  parse_OpTiming("RemoveFile", $rpcop);
  parse_OpTiming("CreateFile", $rpcop);
  parse_OpTiming("Rename", $rpcop);
  parse_OpTiming("Symlink", $rpcop);
  parse_OpTiming("Link", $rpcop);
  parse_OpTiming("MakeDir", $rpcop);
  parse_OpTiming("RemoveDir", $rpcop);
  parse_OpTiming("SetLock", $rpcop);
  parse_OpTiming("ExtendLock", $rpcop);
  parse_OpTiming("ReleaseLock", $rpcop);
  parse_OpTiming("GetStatistics", $rpcop);
  parse_OpTiming("GiveUpCallbacks", $rpcop);
  parse_OpTiming("GetVolumeInfo", $rpcop);
  parse_OpTiming("GetVolumeStatus", $rpcop);
  parse_OpTiming("SetVolumeStatus", $rpcop);
  parse_OpTiming("GetRootVolume", $rpcop);
  parse_OpTiming("CheckToken", $rpcop);
  parse_OpTiming("GetTime", $rpcop);
  parse_OpTiming("NGetVolumeInfo", $rpcop);
  parse_OpTiming("BulkStatus", $rpcop);
  parse_OpTiming("XStatsVersion", $rpcop);
  parse_OpTiming("GetXStats", $rpcop);

  my $xferop = $data->{xferOpTimes};

  parse_XferTiming("FetchData", $xferop);
  parse_XferTiming("StoreData", $xferop);
}


sub parse_CbCounters {
  my $host = shift;

  printf("AFS_XSTATSCOLL_CBSTATS (coll %d) for FS %s\n[Probe 1, %s]\n\n",
          $host->{collectionNumber},
          $host->{hostName},
          scalar localtime($host->{probeTime}));

  printf "\t%10d DeleteFiles\n",        $host->{CbCounters}->{DeleteFiles};
  printf "\t%10d DeleteCallBacks\n",    $host->{CbCounters}->{DeleteCallBacks};
  printf "\t%10d BreakCallBacks\n",     $host->{CbCounters}->{BreakCallBacks};
  printf "\t%10d AddCallBack\n",        $host->{CbCounters}->{AddCallBack};
  printf "\t%10d GotSomeSpaces\n",      $host->{CbCounters}->{GotSomeSpaces};
  printf "\t%10d DeleteAllCallBacks\n", $host->{CbCounters}->{DeleteAllCallBacks};
  printf "\t%10d nFEs\n",               $host->{CbCounters}->{nFEs};
  printf "\t%10d nCBs\n",               $host->{CbCounters}->{nCBs};
  printf "\t%10d nblks\n",              $host->{CbCounters}->{nblks};
  printf "\t%10d CBsTimedOut\n",        $host->{CbCounters}->{CBsTimedOut};
  printf "\t%10d nbreakers\n",          $host->{CbCounters}->{nbreakers};
  printf "\t%10d GSS1\n",               $host->{CbCounters}->{GSS1};
  printf "\t%10d GSS2\n",               $host->{CbCounters}->{GSS2};
  printf "\t%10d GSS3\n",               $host->{CbCounters}->{GSS3};
  printf "\t%10d GSS4\n",               $host->{CbCounters}->{GSS4};
  printf "\t%10d GSS5\n",               $host->{CbCounters}->{GSS5};
}


sub parse_OpTiming {
  my ($name, $rpcop) = @_;

  printf("%15s: %d ops (%d OK); sum=%f, sqr=%f, min=%f, max=%f\n",
          $name, $rpcop->{$name}->{numOps}, $rpcop->{$name}->{numSuccesses},
          $rpcop->{$name}->{sumTime}, $rpcop->{$name}->{sqrTime},
          $rpcop->{$name}->{minTime}, $rpcop->{$name}->{maxTime});
}


sub parse_XferTiming {
  my ($name, $xferop) = @_;

  printf("%s: %d xfers (%d OK), time sum=%f, sqr=%f, min=%f, max=%f\n",
          $name, $xferop->{$name}->{numXfers}, $xferop->{$name}->{numSuccesses},
          $xferop->{$name}->{sumTime}, $xferop->{$name}->{sqrTime},
          $xferop->{$name}->{minTime}, $xferop->{$name}->{maxTime});

  printf("\t[bytes: sum=%lu, min=%d, max=%d]\n",
          $xferop->{$name}->{sumBytes},
          $xferop->{$name}->{minBytes},
          $xferop->{$name}->{maxBytes});

  printf("\t[buckets: 0: %d, 1: %d, 2: %d, 3: %d, 4: %d, 5: %d, 6: %d, 7: %d, 8: %d]\n",
          $xferop->{$name}->{count}->[0],
          $xferop->{$name}->{count}->[1],
          $xferop->{$name}->{count}->[2],
          $xferop->{$name}->{count}->[3],
          $xferop->{$name}->{count}->[4],
          $xferop->{$name}->{count}->[5],
          $xferop->{$name}->{count}->[6],
          $xferop->{$name}->{count}->[7],
          $xferop->{$name}->{count}->[8]);
}

pod/Makefile  view on Meta::CPAN

CONVERTERS = pod2html

POD2HTML = $(P2H) \
	    --htmlroot=./ \
	    --podpath=./ \
	    --verbose \
	    --noindex \
	    --libpods=Monitor:afsmon_stats:afsmonitor:cmdebug:rxdebug:scout:udebug:xstat_cm_test:xstat_fs_test

all: $(CONVERTERS)

converters: $(CONVERTERS)

P2H = /usr/local/bin/pod2html

POD = \
	afsmon_stats.pod  \
	afsmonitor.pod    \
	Monitor.pod  \
	cmdebug.pod       \
	rxdebug.pod       \
	scout.pod         \
	udebug.pod        \
	xstat_cm_test.pod \
	xstat_fs_test.pod

HTML = \
	afsmon_stats.html  \
	afsmonitor.html    \
	Monitor.html  \
	cmdebug.html       \
	rxdebug.html       \
	scout.html         \
	udebug.html        \
	xstat_cm_test.html \
	xstat_fs_test.html

html:	$(P2H) $(HTML)

.SUFFIXES: .pm .pod

.SUFFIXES: .html

.pod.html:
	$(POD2HTML) --infile=$*.pod --outfile=$*.html

clean:
	rm -f $(HTML)
	rm -f pod2html-*cache
	rm -f pod2htmi.x* pod2htmd.x*

realclean:	clean
	rm -f $(CONVERTERS)

distclean:	realclean

pod/Monitor.pod  view on Meta::CPAN

#------------------------------------------------------------------------------
# afsperldebug.pod
#
# Copyright © 2004-2006 Alf Wachsmann <alfw@slac.stanford.edu> and
#                  Elizabeth Cassell <e_a_c@mailsnare.net>
#
# $Revision: 1.2 $ $Date: 2006/07/05 22:25:10 $ $Author: alfw $
#
# This library is free software; you can redistribute it and/or modify it
# under the same terms as Perl itself.
#------------------------------------------------------------------------------

=head1 NAME

B<AFS::Monitor> - Perl interface to AFS monitoring and debugging tools

=head1 DESCRIPTION

=over

=item B<afsmonitor>

Gathers statistics about specified File Server and Cache Manager operations.
There are 271 available File Server statistics and 571 available Cache Manager
statistics, listed in L<afsmon_stats(1)>.
See L<afsmonitor(1)>

=item B<cmdebug>

Reports status of cache manager and cache entries on a particular AFS
client machine. See L<cmdebug(1)>

=item B<rxdebug>

Provides debugging trace of Rx activity for a specified server or client
machine. See L<rxdebug(1)>

=item B<scout>

Gathers statistics from the File Server processes running on the specified
machines. See L<scout(1)>

=item B<udebug>

Reports the status of the Ubik process associated with a database server
process. See L<udebug(1)>

=item B<xstat_cm_test>

Gathers the specified data collections associated with the specified Cache
Manager. See L<xstat_cm_test(1)>

=item B<xstat_fs_test>

Gathers the specified data collections associated with the specified File
Server process. See L<xstat_fs_test(1)>

=back

=head1 COMPATIBILITY

The configurations that this package has been tested on are listed below:

  OS              @sys            Perl            	OpenAFS
  -----------------------------------------------------------------------------
  FC5             amd64_linux26   v5.8.8			1.4.2-beta1
  RHEL4-64        amd64_linux26   v5.8.5			1.4.1
  RHEL4-32        no machine
  RHEL3-32        i386linux24     v5.8.0, v5.8.8, v5.6.0	1.4.1, 1.2.10
  RHEL3-64        no machine
  SLES9           ia64_linux26    v5.8.3			1.4.1

  Solaris 5.8     sun4x_58        v5.8.8, v5.6.0, 5.005_03	1.4.1, 1.2.10
  Solaris 5.9     sun4x_59        v5.8.8, v5.6.0		1.4.1, 1.2.10
  Solaris 5.10    sun4x_510       v5.8.8, v5.6.0		1.4.1, 1.2.10

  Mac OS X 10.3   ppc_darwin_70   v5.8.1-RC3			1.4.1
  Mac OS x 10.4   ppc_darwin_80   v5.8.6			1.4.1


Perl 5.6.0 or newer. No problems were found with threaded Perl.
AFS system libraries and header files from B<OpenAFS 1.2.x> or newer.
It is not know whether version 0.3.0 of this module works with
B<IBM/Transarc AFS> because I don't have this version available any more.


=head1 PREREQUISITES

This package does not depend on any other Perl modules.

=head1 KNOWN BUGS

This package depends on the corresponding OpenAFS libraries.
These underlying libraries still don't work properly on or with
64bit Linux systems. The problem manifests itself in statistic
values beeing zero instead of the real value.
This problem will go away once the OpenAFS libraries are fixed.

=head1 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

=over

=item Elizabeth Cassell <e_a_c@mailsnare.net> and

=item Alf Wachsmann <alfw@slac.stanford.edu>

=back

=head1 COPYRIGHT AND DISCLAIMER

 Copyright 2004-2006
		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.

pod/afsmon_stats.pod  view on Meta::CPAN

#------------------------------------------------------------------------------
# afsmonitor.pod
#
# Copyright © 2004 Alf Wachsmann <alfw@slac.stanford.edu> and
#                  Elizabeth Cassell <e_a_c@mailsnare.net>
#
# $Revision: 1.4 $ $Date: 2004/08/05 20:52:03 $ $Author: alfw $
#
# This library is free software; you can redistribute it and/or modify it
# under the same terms as Perl itself.
#------------------------------------------------------------------------------

=head1 NAME

B<afsmonitor Program Statistics> - a list of the statistics you can gather with the afsmonitor program.

=head1 DESCRIPTION

A complete listing of Cache Manager and File Server statistics gathered by the
L<afsmonitor(1)> function. The statistics are grouped by category and section,
with a brief description of each field, group, and section. For more information
about the L<afsmonitor(1)> function, see the L<afsmonitor(1)> documentation.

=head1 The Cache Manager Statistics

Cache Manager statistics fields are classified into the following sections and
groups:

=over

=item *

PerfStats_section - Performance Statistics Section.

=over

=item *

PerfStats_group - Performance Statistics Group.

=item *

misc_group - Miscellaneous Group.

=back

=item *

Server_UpDown_section - Server Up/Down Statistics Section.

=over

=item *

FS_upDown_SC_group - File Server Up/Down Statistics in Same Cell Group.

=item *

FS_upDown_OC_group - File Server Up/Down Statistics in Other Cells Group.

=item *

VL_upDown_SC_group - VL Server Up/Down Statistics in Same Cell Group.

=item *

VL_upDown_OC_group - VL Server Up/Down Statistics in Other Cells Group.

=back

=item *

RPCop_section - RPC Operation Measurements Section.

=over

=item *

FS_RPCopTimes_group - File Server RPC Operation Timings Group.

=item *

FS_RPCopErrors_group - File Server RPC Operation Errors Group.

=item *

FS_RPCopBytes_group - File Server RPC Transfer Timings Group.

=item *

CM_RPCopTimes_group - Cache Manager RPC Operation Timings Group.

=back

=item *

Auth_Access_section - Authentication and Replicated File Access Section.

=over

=item *

Auth_Stats_group - Authentication Information for Cache Manager Group.

=item *

Access_Stats_group - Unreplicated File Access Group.

=back

=back

All Cache Manager variables categorized under these sections and groups names
are listed below.

=head2 Performance Statistics Section (PerfStats_section)

Performance Statistics Group (PerfStats_group)

=over

=item *

dlocalAccesses: Number of data accesses to files within local cell.

=item *

vlocalAccesses: Number of stat accesses to files within local cell.

=item *

dremoteAccesses: Number of data accesses to files outside of local cell.

=item *

vremoteAccesses: Number of stat accesses to files outside of local cell.

=item *

cacheNumEntries: Number of cache entries.

=item *

cacheBlocksTotal: Number of (1K) blocks configured for cache.

=item *

cacheBlocksInUse: Number of cache blocks actively in use.

=item *

cacheBlocksOrig: Number of cache blocks at bootup.

=item *

cacheMaxDirtyChunks: Maximum number of dirty cache chunks tolerated.

=item *

cacheCurrDirtyChunks: Current number of dirty cache chunks.

=item *

dcacheHits: Number of data files found in local cache.

=item *

vcacheHits: Number of stat entries found in local cache.

=item *

dcacheMisses: Number of data files not found in local cache.

=item *

vcacheMisses: Number of stat entries not found in local cache.

=item *

cacheFlushes: Number of files flushed from cache.

=item *

cacheFilesReused: Number of cache files reused.

=item *

vcacheXAllocs: Additionally allocated vcaches.

=item *

dcacheXAllocs: Additionally allocated dcaches.

=item *

bufAlloced: Number of buffers allocated by AFS.

=item *

bufHits: Number of pages found on buffer cache.

=item *

bufMisses: Number of pages not found on buffer cache.

=item *

bufFlushDirty: Number of cached dirty buffers flushed because all were busy.

=item *

LargeBlocksActive: Number of currently used large free pool entries.

=item *

LargeBlocksAlloced: Number of allocated large free pool entries.

=item *

SmallBlocksActive: Number of currently used small free pool entries.

=item *

SmallBlocksAlloced: Number of allocated used small free pool entries.

=item *

OutStandingMemUsage: Amount of allocated memory.

=item *

OutStandingAllocs: Outstanding osi_allocs (no osi_frees yet).

=item *

CallBackAlloced: Number of callback structures allocated.

=item *

CallBackFlushes: Number of callback flush operations performed.

=item *

srvRecords: Number of servers currently on record.

=item *

srvRecordsHWM: Server record high water mark.

=item *

srvNumBuckets: Number of server hash chain buckets.

=item *

srvMaxChainLength: Maximum server hash chain length.

=item *

srvMaxChainLengthHWM: Server hash chain high water mark.

=item *

sysName_ID: Sysname ID for host hardware.

=back

Miscellaneous Group (misc_group)

=over

=item *

numPerfCalls: Number of performance calls received.

=item *

epoch: Cache Manager epoch time.

=item *

numCellsVisible: Number of cells we know about.

=item *

numCellsContacted: Number of cells contacted.

=back

=head2 Server Up/Down Statistics Section (Server_UpDown_section)

File Server Up/Down Statistics in Same Cell Group (FS_upDown_SC_group)

Note: The records referred to in this section are the internal records kept by the afsmonitor program to track the processes from which data is being gathered.

=over

=item *

fs_sc_numTtlRecords: Number of fileserver records, active or inactive.

=item *

fs_sc_numUpRecords: Number of (active) fileserver records currently marked up.

=item *

fs_sc_numDownRecords: Number of (active) fileserver records currently marked down.

=item *

fs_sc_sumOfRecordAges: Sum of fileserver record lifetimes.

=item *

fs_sc_ageOfYoungestRecord: Age of youngest fileserver record.

=item *

fs_sc_ageOfOldestRecord: Age of oldest fileserver record.

=item *

fs_sc_numDowntimeIncidents: Number of (completed) downtime incidents.

=item *

fs_sc_numRecordsNeverDown: Number of fileserver records never marked down.

=item *

fs_sc_maxDowntimesInARecord: Maximum downtimes seen by any fileserver record.

=item *

fs_sc_sumOfDowntimes: Sum of all (completed) downtimes, in seconds.

=item *

fs_sc_shortestDowntime: Shortest downtime, in seconds.

=item *

fs_sc_longestDowntime: Longest downtime, in seconds.

=item *

fs_sc_down_0_10_min: Down time incidents: 0-10 minutes.

=item *

fs_sc_down_10_30_min: Down time incidents: 10-30 minutes.

=item *

fs_sc_down_half_1_hr: Down time incidents: 30-60 minutes.

=item *

fs_sc_down_1_2_hr: Down time incidents: 1-2 hours.

=item *

fs_sc_down_2_4_hr: Down time incidents: 2-4 hours.

=item *

fs_sc_down_4_8_hr: Down time incidents: 4-8 hours.

=item *

fs_sc_down_more_8_hr: Down time incidents: more than 8 hours.

=item *

fs_sc_downDst_0: Down time incidents: 0 times.

=item *

fs_sc_downDst_1: Down time incidents: 1 time.

=item *

fs_sc_downDst_2_5: Down time incidents: 2-5 times.

=item *

fs_sc_downDst_6_10: Down time incidents: 6-10 times.

=item *

fs_sc_downDst_10_50: Down time incidents: 10-50 times.

=item *

fs_sc_downDst_more_50: Down time incidents: more than 50 times.

=back

File Server Up/Down Statistics in Other Cells Group (FS_upDown_OC_group)

=over

=item *

fs_oc_numTtlRecords: Number of fileserver records, active or inactive.

=item *

fs_oc_numUpRecords: Number of (active) fileserver records currently marked up.

=item *

fs_oc_numDownRecords: Number of (active) fileserver records currently marked down.

=item *

fs_oc_sumOfRecordAges: Sum of server record lifetimes.

=item *

fs_oc_ageOfYoungestRecord: Age of youngest fileserver record.

=item *

fs_oc_ageOfOldestRecord: Age of oldest fileserver record.

=item *

fs_oc_numDowntimeIncidents: Number of (completed) downtime incidents.

=item *

fs_oc_numRecordsNeverDown: Number of fileserver records never marked down.

=item *

fs_oc_maxDowntimesInARecord: Maximum downtimes seen by any fileserver.

=item *

fs_oc_sumOfDowntimes: Sum of all (completed) downtimes, in seconds.

=item *

fs_oc_shortestDowntime: Shortest downtime, in seconds.

=item *

fs_oc_longestDowntime: Longest downtime, in seconds.

=item *

fs_oc_down_0_10_min: Down time incidents: 0-10 minutes.

=item *

fs_oc_down_10_30_min: Down time incidents: 10-30 minutes.

=item *

fs_oc_down_half_1_hr: Down time incidents: 30-60 minutes.

=item *

fs_oc_down_1_2_hr: Down time incidents: 1-2 hours.

=item *

fs_oc_down_2_4_hr: Down time incidents: 2-4 hours.

=item *

fs_oc_down_4_8_hr: Down time incidents: 4-8 hours.

=item *

fs_oc_down_more_8_hr: Down time incidents: more than 8 hours.

=item *

fs_oc_downDst_0: Down time incidents: 0 times.

=item *

fs_oc_downDst_1: Down time incidents: 1 time.

=item *

fs_oc_downDst_2_5: Down time incidents: 2-5 times.

=item *

fs_oc_downDst_6_10: Down time incidents: 6-10 times.

=item *

fs_oc_downDst_10_50: Down time incidents: 10-50 times.

=item *

fs_oc_downDst_more_50: Down time incidents: more than 50 times.

=back

VL Server Up/Down Statistics in Same Cell Group (VL_upDown_SC_group)

=over

=item *

vl_sc_numTtlRecords: Number of vlserver records, active or inactive.

=item *

vl_sc_numUpRecords: Number of (active) vlserver records currently marked up.

=item *

vl_sc_numDownRecords: Number of (active) vlserver records currently marked down.

=item *

vl_sc_sumOfRecordAges: Sum of vlserver record lifetimes.

=item *

vl_sc_ageOfYoungestRecord: Age of youngest vlserver record.

=item *

vl_sc_ageOfOldestRecord: Age of oldest vlserver record.

=item *

vl_sc_numDowntimeIncidents: Number of (completed) downtime incidents.

=item *

vl_sc_numRecordsNeverDown: Number of vlserver records never marked down.

=item *

vl_sc_maxDowntimesInARecord: Maximum downtimes seen by any vlserver record.

=item *

vl_sc_sumOfDowntimes: Sum of all (completed) downtimes, in seconds.

=item *

vl_sc_shortestDowntime: Shortest downtime, in seconds.

=item *

vl_sc_longestDowntime: Longest downtime, in seconds.

=item *

vl_sc_down_0_10_min: Down time incidents: 0-10 minutes.

=item *

vl_sc_down_10_30_min: Down time incidents: 10-30 minutes.

=item *

vl_sc_down_half_1_hr: Down time incidents: 30-60 minutes.

=item *

vl_sc_down_1_2_hr: Down time incidents: 1-2 hours.

=item *

vl_sc_down_2_4_hr: Down time incidents: 2-4 hours.

=item *

vl_sc_down_4_8_hr: Down time incidents: 4-8 hours.

=item *

vl_sc_down_more_8_hr: Down time incidents: more than 8 hours.

=item *

vl_sc_downDst_0: Down time incidents: 0 times.

=item *

vl_sc_downDst_1: Down time incidents: 1 time.

=item *

vl_sc_downDst_2_5: Down time incidents: 2-5 times.

=item *

vl_sc_downDst_6_10: Down time incidents: 6-10 times.

=item *

vl_sc_downDst_10_50: Down time incidents: 10-50 times.

=item *

vl_sc_downDst_more_50: Down time incidents: more than 50 times.

=back

VL Server Up/Down Statistics in Other Cells Group (VL_upDown_DC_group)

=over

=item *

vl_oc_numTtlRecords: Number of vlserver records, active or inactive.

=item *

vl_oc_numUpRecords: Number of (active) vlserver records currently marked up.

=item *

vl_oc_numDownRecords: Number of (active) vlserver records currently marked down.

=item *

vl_oc_sumOfRecordAges: Sum of vlserver record lifetimes.

=item *

vl_oc_ageOfYoungestRecord: Age of youngest vlserver record.

=item *

vl_oc_ageOfOldestRecord: Age of oldest vlserver record.

=item *

vl_oc_numDowntimeIncidents: Number of (completed) downtime incidents.

=item *

vl_oc_numRecordsNeverDown: Number of vlserver records never marked down.

=item *

vl_oc_maxDowntimesInARecord: Maximum downtimes seen by any vlserver record.

=item *

vl_oc_sumOfDowntimes: Sum of all (completed) downtimes, in seconds.

=item *

vl_oc_shortestDowntime: Shortest downtime, in seconds.

=item *

vl_oc_longestDowntime: Longest downtime, in seconds.

=item *

vl_oc_down_0_10_min: Down time incidents: 0-10 minutes.

=item *

vl_oc_down_10_30_min: Down time incidents: 10-30 minutes.

=item *

vl_oc_down_half_1_hr: Down time incidents: 30-60 minutes.

=item *

vl_oc_down_1_2_hr: Down time incidents: 1-2 hours.

=item *

vl_oc_down_2_4_hr: Down time incidents: 2-4 hours.

=item *

vl_oc_down_4_8_hr: Down time incidents: 4-8 hours.

=item *

vl_oc_down_more_8_hr: Down time incidents: more than 8 hours.

=item *

vl_oc_downDst_0: Down time incidents: 0 times.

=item *

vl_oc_downDst_1: Down time incidents: 1 time.

=item *

vl_oc_downDst_2_5: Down time incidents: 2-5 times.

=item *

vl_oc_downDst_6_10: Down time incidents: 6-10 times.

=item *

vl_oc_downDst_10_50: Down time incidents: 10-50 times.

=item *

vl_oc_downDst_more_50: Down time incidents: more than 50 times.

=back

=head2 RPC Operation Measurements Section (RPCop_section)

File Server RPC Operation Timings Group (FS_RPCopTimes_group)

=over

=item *

FetchData_ops: Number of FetchData operations executed.

=item *

FetchData_ops_ok: Number of successful FetchData operations.

=item *

FetchData_sum: Sum of timings for FetchData operations.

=item *

FetchData_sqr: Sum of squares of sample timings for FetchData operations.

=item *

FetchData_min: Minimum execution time observed for FetchData operations.

=item *

FetchData_max: Maximum execution time observed for FetchData operations.

=item *

FetchACL_ops: Number of FetchACL operations executed.

=item *

FetchACL_ops_ok: Number of successful FetchACL operations.

=item *

FetchACL_sum: Sum of timings for FetchACL operations.

=item *

FetchACL_sqr: Sum of squares of sample timings for FetchACL operations.

=item *

FetchACL_min: Minimum execution time observed for FetchACL operations.

=item *

FetchACL_max: Maximum execution time observed for FetchACL operations.

=item *

FetchStatus_ops: Number of FetchStatus operations executed.

=item *

FetchStatus_ops_ok: Number of successful FetchStatus operations.

=item *

FetchStatus_sum: Sum of timings for FetchStatus operations.

=item *

FetchStatus_sqr: Sum of squares of sample timings for FetchStatus operations.

=item *

FetchStatus_min: Minimum execution time observed for FetchStatus operations.

=item *

FetchStatus_max: Maximum execution time observed for FetchStatus operations.

=item *

StoreData_ops: Number of StoreData operations executed.

=item *

StoreData_ops_ok: Number of successful StoreData operations.

=item *

StoreData_sum: Sum of timings for StoreData operations.

=item *

StoreData_sqr: Sum of squares of sample timings for StoreData operations.

=item *

StoreData_min: Minimum execution time observed for StoreData operations.

=item *

StoreData_max: Maximum execution time observed for StoreData operations.

=item *

StoreACL_ops: Number of StoreACL operations executed.

=item *

StoreACL_ops_ok: Number of successful StoreACL operation.

=item *

StoreACL_sum: Sum of timings for StoreACL operations.

=item *

StoreACL_sqr: Sum of squares of sample timings for StoreACL operations.

=item *

StoreACL_min: Minimum execution time observed for StoreACL operations.

=item *

StoreACL_max: Maximum execution time observed for StoreACL operations.

=item *

StoreStatus_ops: Number of StoreStatus operations executed.

=item *

StoreStatus_ops_ok: Number of successful StoreStatus operations.

=item *

StoreStatus_sum: Sum of timings for StoreStatus operations.

=item *

StoreStatus_sqr: Sum of squares of sample timings for StoreStatus operations.

=item *

StoreStatus_min: Minimum execution time observed for StoreStatus operations.

=item *

StoreStatus_max: Maximum execution time observed for StoreStatus operations.

=item *

RemoveFile_ops: Number of RemoveFile operations executed.

=item *

RemoveFile_ops_ok: Number of successful RemoveFile operations.

=item *

RemoveFile_sum: Sum of timings for RemoveFile operations.

=item *

RemoveFile_sqr: Sum of squares of sample timings for RemoveFile operations.

=item *

RemoveFile_min: Minimum execution time observed for RemoveFile operations.

=item *

RemoveFile_max: Maximum execution time observed for RemoveFile operations.

=item *

CreateFile_ops: Number of CreateFile operations executed.

=item *

CreateFile_ops_ok: Number of successful CreateFile operations.

=item *

CreateFile_sum: Sum of timings for CreateFile operations.

=item *

CreateFile_sqr: Sum of squares of sample timings for CreateFile operations.

=item *

CreateFile_min: Minimum execution time observed for CreateFile operations.

=item *

CreateFile_max: Maximum execution time observed for CreateFile operations.

=item *

Rename_ops: Number of Rename operations executed.

=item *

Rename_ops_ok: Number of successful Rename operations.

=item *

Rename_sum: Sum of timings for Rename operations.

=item *

Rename_sqr: Sum of squares of sample timings for Rename operations.

=item *

Rename_min: Minimum execution time observed for Rename operations.

=item *

Rename_max: Maximum execution time observed for Rename operations.

=item *

Symlink_ops: Number of Symlink operations executed.

=item *

Symlink_ops_ok: Number of successful Symlink operations.

=item *

Symlink_sum: Sum of timings for Symlink operations.

=item *

Symlink_sqr: Sum of squares of sample timings for Symlink operations.

=item *

Symlink_min: Minimum execution time observed for Symlink operations.

=item *

Symlink_max: Maximum execution time observed for Symlink operations.

=item *

Link_ops: Number of Link operations executed.

=item *

Link_ops_ok: Number of successful Link operations.

=item *

Link_sum: Sum of timings for Link operations.

=item *

Link_sqr: Sum of squares of sample timings for Link operations.

=item *

Link_min: Minimum execution time observed for Link operations.

=item *

Link_max: Maximum execution time observed for Link operations.

=item *

MakeDir_ops: Number of MakeDir operations executed.

=item *

MakeDir_ops_ok: Number of successful MakeDir operations.

=item *

MakeDir_sum: Sum of timings for MakeDir operations.

=item *

MakeDir_sqr: Sum of squares of sample timings for MakeDir operations.

=item *

MakeDir_min: Minimum execution time observed for MakeDir operations.

=item *

MakeDir_max: Maximum execution time observed for MakeDir operations.

=item *

RemoveDir_ops: Number of RemoveDir operations executed.

=item *

RemoveDir_ops_ok: Number of successful RemoveDir operations.

=item *

RemoveDir_sum: Sum of timings for RemoveDir operations.

=item *

RemoveDir_sqr: Sum of squares of sample timings for RemoveDir operations.

=item *

RemoveDir_min: Minimum execution time observed for RemoveDir operations.

=item *

RemoveDir_max: Maximum execution time observed for RemoveDir operations.

=item *

SetLock_ops: Number of SetLock operations executed.

=item *

SetLock_ops_ok: Number of successful SetLock operations.

=item *

SetLock_sum: Sum of timings for SetLock operations.

=item *

SetLock_sqr: Sum of squares of sample timings for SetLock operations.

=item *

SetLock_min: Minimum execution time observed for SetLock operations.

=item *

SetLock_max: Maximum execution time observed for SetLock operations.

=item *

ExtendLock_ops: Number of ExtendLock operations executed.

=item *

ExtendLock_ops_ok: Number of successful ExtendLock operations.

=item *

ExtendLock_sum: Sum of timings for ExtendLock operations.

=item *

ExtendLock_sqr: Sum of squares of sample timings for ExtendLock operations.

=item *

ExtendLock_min: Minimum execution time observed for ExtendLock operations.

=item *

ExtendLock_max: Maximum execution time observed for ExtendLock operations.

=item *

ReleaseLock_ops: Number of ReleaseLock operations executed.

=item *

ReleaseLock_ops_ok: Number of successful ReleaseLock operations.

=item *

ReleaseLock_sum: Sum of timings for ReleaseLock operations.

=item *

ReleaseLock_sqr: Sum of squares of sample timings for StoreStatus operations.

=item *

ReleaseLock_min: Minimum execution time observed for ReleaseLock operations.

=item *

ReleaseLock_max: Maximum execution time observed for ReleaseLock operations.

=item *

GetStatistics_ops: Number of GetStatistics operations executed.

=item *

GetStatistics_ops_ok: Number of successful GetStatistics operations.

=item *

GetStatistics_sum: Sum of timings for GetStatistics operations.

=item *

GetStatistics_sqr: Sum of squares of sample timings for GetStatistics operations.

=item *

GetStatistics_min: Minimum execution time observed for GetStatistics operations.

=item *

GetStatistics_max: Maximum execution time observed for GetStatistics operations.

=item *

GiveUpCallbacks_ops: Number of GiveUpCallbacks operations executed.

=item *

GiveUpCallbacks_ops_ok: Number of successful GiveUpCallbacks operations.

=item *

GiveUpCallbacks_sum: Sum of timings for GiveUpCallbacks operations.

=item *

GiveUpCallbacks_sqr: Sum of squares of sample timings for GiveUpCallbacks operations.

=item *

GiveUpCallbacks_min: Minimum execution time observed for GiveUpCallbacks operations.

=item *

GiveUpCallbacks_max: Maximum execution time observed for GiveUpCallbacks operations.

=item *

GetVolumeInfo_ops: Number of GetVolumeInfo operations executed.

=item *

GetVolumeInfo_ops_ok: Number of successful GetVolumeInfo operations.

=item *

GetVolumeInfo_sum: Sum of timings for GetVolumeInfo operations.

=item *

GetVolumeInfo_sqr: Sum of squares of sample timings for GetVolumeInfo operations.

=item *

GetVolumeInfo_min: Minimum execution time observed for GetVolumeInfo operations.

=item *

GetVolumeInfo_max: Maximum execution time observed for GetVolumeInfo operations.

=item *

GetVolumeStatus_ops: Number of GetVolumeStatus operations executed.

=item *

GetVolumeStatus_ops_ok: Number of successful GetVolumeStatus operations.

=item *

GetVolumeStatus_sum: Sum of timings for GetVolumeStatus operations.

=item *

GetVolumeStatus_sqr: Sum of squares of sample timings for GetVolumeStatus operations.

=item *

GetVolumeStatus_min: Minimum execution time observed for GetVolumeStatus operations.

=item *

GetVolumeStatus_max: Maximum execution time observed for GetVolumeStatus operations.

=item *

SetVolumeStatus_ops: Number of SetVolumeStatus operations executed.

=item *

SetVolumeStatus_ops_ok: Number of successful SetVolumeStatus operations.

=item *

SetVolumeStatus_sum: Sum of timings for SetVolumeStatus operations.

=item *

SetVolumeStatus_sqr: Sum of squares of sample timings for SetVolumeStatus operations.

=item *

SetVolumeStatus_min: Minimum execution time observed for SetVolumeStatus operations.

=item *

SetVolumeStatus_max: Maximum execution time observed for SetVolumeStatus operations.

=item *

GetRootVolume_ops: Number of GetRootVolume operations executed.

=item *

GetRootVolume_ops_ok: Number of successful GetRootVolume operations.

=item *

GetRootVolume_sum: Sum of timings for GetRootVolume operations.

=item *

GetRootVolume_sqr: Sum of squares of sample timings for GetRootVolume operations.

=item *

GetRootVolume_min: Minimum execution time observed for GetRootVolume operations.

=item *

GetRootVolume_max: Maximum execution time observed for GetRootVolume operations.

=item *

CheckToken_ops: Number of CheckToken operations executed.

=item *

CheckToken_ops_ok: Number of successful CheckToken operations.

=item *

CheckToken_sum: Sum of timings for CheckToken operations.

=item *

CheckToken_sqr: Sum of squares of sample timings for CheckToken operations.

=item *

CheckToken_min: Minimum execution time observed for CheckToken operations.

=item *

CheckToken_max: Maximum execution time observed for CheckToken operations.

=item *

GetTime_ops: Number of GetTime operations executed.

=item *

GetTime_ops_ok: Number of successful GetTime operations.

=item *

GetTime_sum: Sum of timings for GetTime operations.

=item *

GetTime_sqr: Sum of squares of sample timings for GetTime operations.

=item *

GetTime_min: Minimum execution time observed for GetTime operations.

=item *

GetTime_max: Maximum execution time observed for GetTime operations.

=item *

NGetVolumeInfo_ops: Number of NGetVolumeInfo operations executed.

=item *

NGetVolumeInfo_ops_ok: Number of successful NGetVolumeInfo operations.

=item *

NGetVolumeInfo_sum: Sum of timings for NGetVolumeInfo operations.

=item *

NGetVolumeInfo_sqr: Sum of squares of sample timings for NGetVolumeInfo operations.

=item *

NGetVolumeInfo_min: Minimum execution time observed for NGetVolumeInfo operations.

=item *

NGetVolumeInfo_max: Maximum execution time observed for NGetVolumeInfo operations.

=item *

BulkStatus_ops: Number of BulkStatus operations executed.

=item *

BulkStatus_ops_ok: Number of successful BulkStatus operations.

=item *

BulkStatus_sum: Sum of timings for BulkStatus operations.

=item *

BulkStatus_sqr: Sum of squares of sample timings for BulkStatus operations.

=item *

BulkStatus_min: Minimum execution time observed for BulkStatus operations.

=item *

BulkStatus_max: Maximum execution time observed for BulkStatus operations.

=item *

XStatsVersion_ops: Number of XStatsVersion operations executed.

=item *

XStatsVersion_ops_ok: Number of successful XStatsVersion operations.

=item *

XStatsVersion_sum: Sum of timings for XStatsVersion operations.

=item *

XStatsVersion_sqr: Sum of squares of sample timings for XStatsVersion operations.

=item *

XStatsVersion_min: Minimum execution time observed for XStatsVersion operations.

=item *

XStatsVersion_max: Maximum execution time observed for XStatsVersion operations.

=item *

GetXStats_ops: Number of GetXStats operations executed.

=item *

GetXStats_ops_ok: Number of successful GetXStats operations.

=item *

GetXStats_sum: Sum of timings for GetXStats operations.

=item *

GetXstats_sqr: Sum of squares of sample timings for GetXStats operations.

=item *

GetXStats_min: Minimum execution time observed for GetXStats operations.

=item *

GetXStats_max: Maximum execution time observed for GetXStats operations.

=back

File Server RPC Operation Errors Group (FS_RPCopErrors_group)

=over

=item *

FetchData_srv_err: Number of server-down errors during FetchData operations.

=item *

FetchData_net_err: Number of network errors during FetchData operations.

=item *

FetchData_prot_err_err: Number of protection violations during FetchData operations.

=item *

FetchData_vol_err: Number of volume related errors during FetchData operations.

=item *

FetchData_busy_err: Number of volume busy conditions during FetchData operations.

=item *

FetchData_other_err: Number of miscellaneous other errors during FetchData operations.

=item *

FetchACL_srv_err: Number of server-down errors during FetchACL operations.

=item *

FetchACL_net_err: Number of network errors during FetchACL operations.

=item *

FetchACL_prot_err: Number of protection violations during FetchACL operations.

=item *

FetchACL_vol_err: Number of volume related errors during FetchACL operations.

=item *

FetchACL_busy_err: Number of volume busy conditions encountered during FetchACL operations.

=item *

FetchACL_other_err: Number of miscellaneous other errors during FetchACL operations.

=item *

FetchStatus_srv_err: Number of server-down errors during FetchStatus operations.

=item *

FetchStatus_net_err: Number of network errors during FetchStatus operations.

=item *

FetchStatus_prot_err: Number of protection violations during FetchStatus operations.

=item *

FetchStatus_vol_err: Number of volume related errors during FetchStatus operations.

=item *

FetchStatus_busy_err: Number of volume busy conditions encountered during FetchStatus operations.

=item *

FetchStatus_other_err: Number of miscellaneous other errors during FetchStatus operations.

=item *

StoreData_srv_err: Number of server-down errors during StoreData operations.

=item *

StoreData_net_err: Number of network errors during StoreData operations.

=item *

StoreData_prot_err: Number of protection violations during StoreData operations.

=item *

StoreData_vol_err: Number of volume related errors during StoreData operations.

=item *

StoreData_busy_err: Number of volume busy conditions encountered during StoreData operations.

=item *

StoreData_other_err: Number of miscellaneous other errors during StoreData operations.

=item *

StoreACL_srv_err: Number of server-down errors during StoreACL operations.

=item *

StoreACL_net_err: Number of network errors during StoreACL operations.

=item *

StoreACL_prot_err: Number of protection violations during StoreACL operations.

=item *

StoreACL_vol_err: Number of volume related errors during StoreACL operations.

=item *

StoreACL_busy_err: Number of volume busy conditions encountered during StoreACL operations.

=item *

StoreACL_other_err: Number of miscellaneous other errors during StoreACL operations.

=item *

StoreStatus_srv_err: Number of server-down errors during StoreStatus operations.

=item *

StoreStatus_net_err: Number of network errors during StoreStatus operations.

=item *

StoreStatus_prot_err: Number of protection violations during StoreStatus operations.

=item *

StoreStatus_vol_err: Number of volume related errors during StoreStatus operations.

=item *

StoreStatus_busy_err: Number of volume busy conditions encountered during StoreStatus operations.

=item *

StoreStatus_other_err: Number of miscellaneous other errors during StoreStatus operations.

=item *

RemoveFile_srv_err: Number of server-down errors during RemoveFile operations.

=item *

RemoveFile_net_err: Number of network errors during RemoveFile operations.

=item *

RemoveFile_prot_err: Number of protection violations during RemoveFile operations.

=item *

RemoveFile_vol_err: Number of volume related errors during RemoveFile operations.

=item *

RemoveFile_busy_err: Number of volume busy conditions encountered during RemoveFile operations.

=item *

RemoveFile_other_err: Number of miscellaneous other errors during RemoveFile operations.

=item *

CreateFile_srv_err: Number of server-down errors during CreateFile operations.

=item *

CreateFile_net_err: Number of network errors during CreateFile operations.

=item *

CreateFile_prot_err: Number of protection violations during CreateFile operations.

=item *

CreateFile_vol_err: Number of volume related errors during CreateFile operations.

=item *

CreateFile_busy_err: Number of volume busy conditions encountered during CreateFile operations.

=item *

CreateFile_other_err: Number of miscellaneous other errors during CreateFile operations.

=item *

Rename_srv_err: Number of server-down errors during Rename operations.

=item *

Rename_net_err: Number of network errors during Rename operations.

=item *

Rename_prot_err: Number of protection violations during Rename operations.

=item *

Rename_vol_err: Number of volume related errors during Rename operations.

=item *

Rename_busy_err: Number of volume busy conditions encountered during Rename operations.

=item *

Rename_other_err: Number of miscellaneous other errors during Rename operations.

=item *

Symlink_srv_err: Number of server-down errors during Symlink operations.

=item *

Symlink_net_err: Number of network errors during Symlink operations.

=item *

Symlink_prot_err: Number of protection violations during Symlink operations.

=item *

Symlink_vol_err: Number of volume related errors during Symlink operations.

=item *

Symlink_busy_err: Number of volume busy conditions encountered during Symlink operations.

=item *

Symlink_other_err: Number of miscellaneous other errors during Symlink operations.

=item *

Link_srv_err: Number of server-down errors during Link operations.

=item *

Link_net_err: Number of network errors during Link operations.

=item *

Link_prot_err: Number of protection violations during Link operations.

=item *

Link_vol_err: Number of volume related errors during Link operations.

=item *

Link_busy_err: Number of volume busy conditions encountered during Link operations.

=item *

Link_other_err: Number of miscellaneous other errors during Link operations.

=item *

MakeDir_srv_err: Number of server-down errors during MakeDir operations.

=item *

MakeDir_net_err: Number of network errors during MakeDir operations.

=item *

MakeDir_prot_err: Number of protection violations during MakeDir operations.

=item *

MakeDir_vol_err: Number of volume related errors during MakeDir operations.

=item *

MakeDir_busy_err: Number of volume busy conditions encountered during MakeDir operations.

=item *

MakeDir_other_err: Number of miscellaneous other errors during MakeDir operations.

=item *

RemoveDir_srv_err: Number of server-down errors during RemoveDir operations.

=item *

RemoveDir_net_err: Number of network errors during RemoveDir operations.

=item *

RemoveDir_prot_err: Number of protection violations during RemoveDir operations.

=item *

RemoveDir_vol_err: Number of volume related errors during RemoveDir operations.

=item *

RemoveDir_busy_err: Number of volume busy conditions encountered during RemoveDir operations.

=item *

RemoveDir_other_err: Number of miscellaneous other errors during RemoveDir operations.

=item *

SetLock_srv_err: Number of server-down errors during SetLock operations.

=item *

SetLock_net_err: Number of network errors during SetLock operations.

=item *

SetLock_prot_err: Number of protection violations during SetLock operations.

=item *

SetLock_vol_err: Number of volume related errors during SetLock operations.

=item *

SetLock_busy_err: Number of volume busy conditions encountered during SetLock operations.

=item *

SetLock_other_err: Number of miscellaneous other errors during SetLock operations.

=item *

ExtendLock_srv_err: Number of server-down errors during ExtendLock operations.

=item *

ExtendLock_net_err: Number of network errors during ExtendLock operations.

=item *

ExtendLock_prot_err: Number of protection violations during ExtendLock operations.

=item *

ExtendLock_vol_err: Number of volume related errors during ExtendLock operations.

=item *

ExtendLock_busy_err: Number of volume busy conditions encountered during ExtendLock operations.

=item *

ExtendLock_other_err: Number of miscellaneous other errors during ExtendLock operations.

=item *

ReleaseLock_srv_err: Number of server-down errors during ReleaseLock operations.

=item *

ReleaseLock_net_err: Number of network errors during ReleaseLock operations.

=item *

ReleaseLock_prot_err: Number of protection violations during ReleaseLock operations.

=item *

ReleaseLock_vol_err: Number of volume related errors during ReleaseLock operations.

=item *

ReleaseLock_busy_err: Number of volume busy conditions encountered during ReleaseLock operations.

=item *

ReleaseLock_other_err: Number of miscellaneous other errors during ReleaseLock operations.

=item *

GetStatistics_srv_err: Number of server-down errors during GetStatistics operations.

=item *

GetStatistics_net_err: Number of network errors during GetStatistics operations.

=item *

GetStatistics_prot_err: Number of protection violations during GetStatistics operations.

=item *

GetStatistics_vol_err: Number of volume related errors during GetStatistics operations.

=item *

GetStatistics_busy_err: Number of volume busy conditions encountered during GetStatistics operations.

=item *

GetStatistics_other_err: Number of miscellaneous other errors during GetStatistics operations.

=item *

GiveUpCallbacks_srv_err: Number of server-down errors during GiveUpCallbacks operations.

=item *

GiveUpCallbacks_net_err: Number of network errors during GiveUpCallbacks operations.

=item *

GiveUpCallbacks_prot_err: Number of protection violations during GiveUpCallbacks operations.

=item *

GiveUpCallbacks_vol_err: Number of volume related errors during GiveUpCallbacks operations.

=item *

GiveUpCallbacks_busy_err: Number of volume busy conditions encountered during GiveUpCallbacks operations.

=item *

GiveUpCallbacks_other_err: Number of miscellaneous other errors during GiveUpCallbacks operations.

=item *

GetVolumeInfo_srv_err: Number of server-down errors during GetVolumeInfo operations.

=item *

GetVolumeInfo_net_err: Number of network errors during GetVolumeInfo operations.

=item *

GetVolumeInfo_prot_err: Number of protection violations during GetVolumeInfo operations.

=item *

GetVolumeInfo_vol_err: Number of volume related errors during GetVolumeInfo operations.

=item *

GetVolumeInfo_busy_err: Number of volume busy conditions encountered during GetVolumeInfo operations.

=item *

GetVolumeInfo_other_err: Number of miscellaneous other errors during GetVolumeInfo operations.

=item *

GetVolumeStatus_srv_err: Number of server-down errors during GetVolumeStatus operations.

=item *

GetVolumeStatus_net_err: Number of network errors during GetVolumeStatus operations.

=item *

GetVolumeStatus_prot_err: Number of protection violations during GetVolumeStatus operations.

=item *

GetVolumeStatus_vol_err: Number of volume related errors during GetVolumeStatus operations.

=item *

GetVolumeStatus_busy_err: Number of volume busy conditions encountered during GetVolumeStatus operations.

=item *

GetVolumeStatus_other_err: Number of miscellaneous other errors during GetVolumeStatus operations.

=item *

SetVolumeStatus_srv_err : Number of server-down errors during SetVolumeStatus operations.

=item *

SetVolumeStatus_net_err: Number of network errors during SetVolumeStatus operations.

=item *

SetVolumeStatus_prot_err: Number of protection violations during SetVolumeStatus operations.

=item *

SetVolumeStatus_vol_err: Number of volume related errors during SetVolumeStatus operations.

=item *

SetVolumeStatus_busy_err: Number of volume busy conditions encountered during SetVolumeStatus operations.

=item *

SetVolumeStatus_other_err: Number of miscellaneous other errors during SetVolumeStatus operations.

=item *

GetRootVolume_srv_err: Number of server-down errors during GetRootVolume operations.

=item *

GetRootVolume_net_err: Number of network errors during GetRootVolume operations.

=item *

GetRootVolume_prot_err: Number of protection violations during GetRootVolume operations.

=item *

GetRootVolume_vol_err: Number of volume related errors during GetRootVolume operations.

=item *

GetRootVolume_busy_err: Number of volume busy conditions encountered during GetRootVolume operations.

=item *

GetRootVolume_other_err: Number of miscellaneous other errors during GetRootVolume operations.

=item *

CheckToken_srv_err: Number of server-down errors during CheckToken operations.

=item *

CheckToken_net_err: Number of network errors during CheckToken operations.

=item *

CheckToken_prot_err: Number of protection violations during CheckToken operations.

=item *

CheckToken_vol_err: Number of volume related errors during CheckToken operations.

=item *

CheckToken_busy_err: Number of volume busy conditions encountered during CheckToken operations.

=item *

CheckToken_other_err: Number of miscellaneous other errors during CheckToken operations.

=item *

GetTime_srv_err: Number of server-down errors during GetTime operations.

=item *

GetTime_net_err: Number of network errors during GetTime operations.

=item *

GetTime_prot_err: Number of protection violations during GetTime operations.

=item *

GetTime_vol_err: Number of volume related errors during GetTime operations.

=item *

GetTime_busy_err: Number of volume busy conditions encountered during GetTime operations.

=item *

GetTime_other_err: Number of miscellaneous other errors during GetTime operations.

=item *

NGetVolumeInfo_srv_err: Number of server-down errors during NGetVolumeInfo operations.

=item *

NGetVolumeInfo_net_err: Number of network errors during NGetVolumeInfo operations.

=item *

NGetVolumeInfo_prot_err: Number of protection violations during NGetVolumeInfo operations.

=item *

NGetVolumeInfo_vol_err: Number of volume related errors during NGetVolumeInfo operations.

=item *

NGetVolumeInfo_busy_err: Number of volume busy conditions encountered during NGetVolumeInfo operations.

=item *

NGetVolumeInfo_other_err: Number of miscellaneous other errors during NGetVolumeInfo operations.

=item *

BulkStatus_srv_err: Number of server-down errors during BulkStatus operations.

=item *

BulkStatus_net_err: Number of network errors during BulkStatus operations.

=item *

BulkStatus_prot_err: Number of protection violations during BulkStatus operations.

=item *

BulkStatus_vol_err: Number of volume related errors during BulkStatus operations.

=item *

BulkStatus_busy_err: Number of volume busy conditions encountered during BulkStatus operations.

=item *

BulkStatus_other_err: Number of miscellaneous other errors during BulkStatus operations.

=item *

XStatsVersion_srv_err: Number of server-down errors during XStatsVersion operations.

=item *

XStatsVersion_net_err: Number of network errors during XStatsVersion operations.

=item *

XStatsVersion_prot_err: Number of protection violations during XStatsVersion operations.

=item *

XStatsVersion_vol_err: Number of volume related errors during XStatsVersion operations.

=item *

XStatsVersion_busy_err: Number of volume busy conditions encountered during XStatsVersion operations.

=item *

XStatsVersion_other_err: Number of miscellaneous other errors during XStatsVersion operations.

=item *

GetXStats_srv_err: Number of server-down errors during GetXStats operations.

=item *

GetXStats_net_err: Number of network errors during GetXStats operations.

=item *

GetXStats_prot_err: Number of protection violations during GetXStats operations.

=item *

GetXStats_vol_err: Number of volume related errors during GetXStats operations.

=item *

GetXStats_busy_err: Number of volume busy conditions encountered during GetXStats operations.

=item *

GetXStats_other_err: Number of miscellaneous other errors during GetXStats operations.

=back

File Server RPC Transfer Timings Group (FS_RPCopBytes_group)

=over

=item *

FetchData_xfers: Number of FetchData operations.

=item *

FetchData_xfers_ok: Number of successful FetchData operations.

=item *

FetchData_xfers_sum: Sum of timing values for FetchData operations.

=item *

FetchData_xfers_sqr: Sum of squares of sample timings for FetchData operations.

=item *

FetchData_xfers_min: Minimum transfer time observed for FetchData operations.

=item *

FetchData_xfers_max: Maximum transfer time observed for FetchData operations.

=item *

FetchData_xfers_bytes_sum: Sum of bytes transferred for FetchData operations.

=item *

FetchData_xfers_bytes_min: Minimum byte transfer observed for FetchData operations.

=item *

FetchData_xfers_bytes_max: Maximum byte transfer observed for FetchData operations.

=item *

FetchData_xfers_bucket0: Tally in bucket0 for FetchData operations.

=item *

FetchData_xfers_bucket1: Tally in bucket1 for FetchData operations.

=item *

FetchData_xfers_bucket2: Tally in bucket2 for FetchData operations.

=item *

FetchData_xfers_bucket3: Tally in bucket3 for FetchData operations.

=item *

FetchData_xfers_bucket4: Tally in bucket4 for FetchData operations.

=item *

FetchData_xfers_bucket5: Tally in bucket5 for FetchData operations.

=item *

FetchData_xfers_bucket6: Tally in bucket6 for FetchData operations.

=item *

FetchData_xfers_bucket7: Tally in bucket7 for FetchData operations.

=item *

FetchData_xfers_bucket8: Tally in bucket8 for FetchData operations.

=item *

StoreData_xfers: Number of StoreData operations.

=item *

StoreData_xfers_ok: Number of successful StoreData operations.

=item *

StoreData_xfers_sum: Sum of timing values for StoreData operations.

=item *

StoreData_xfers_sqr: Sum of squares of sample timings for StoreData operations.

=item *

StoreData_xfers_min: Minimum transfer time observed for StoreData operations.

=item *

StoreData_xfers_max: Maximum transfer time observed for StoreData operations.

=item *

StoreData_xfers_bytes_sum: Sum of bytes transferred for StoreData operations.

=item *

StoreData_xfers_bytes_min: Minimum byte transfer observed for StoreData operations.

=item *

StoreData_xfers_bytes_max: Maximum byte transfer observed for StoreData operations.

=item *

StoreData_xfers_bucket0: Tally in bucket0 for StoreData operations.

=item *

StoreData_xfers_bucket1: Tally in bucket1 for StoreData operations.

=item *

StoreData_xfers_bucket2: Tally in bucket2 for StoreData operations.

=item *

StoreData_xfers_bucket3: Tally in bucket3 for StoreData operations.

=item *

StoreData_xfers_bucket4: Tally in bucket4 for StoreData operations.

=item *

StoreData_xfers_bucket5: Tally in bucket5 for StoreData operations.

=item *

StoreData_xfers_bucket6: Tally in bucket6 for StoreData operations.

=item *

StoreData_xfers_bucket7: Tally in bucket7 for StoreData operations.

=item *

StoreData_xfers_bucket8: Tally in bucket8 for StoreData operations.

=back

Cache Manager RPC Operation Timings Group (CM_RPCopTimes_group)

=over

=item *

CallBack_ops: Number of CallBack operations executed.

=item *

CallBack_ops_ok: Number of successful CallBack operations.

=item *

CallBack_ops_sum: Sum of timings for CallBack operations.

=item *

CallBack_ops_sqr: Sum of squares of sample timings for CallBack operations.

=item *

CallBack_ops_min: Minimum execution time observed for CallBack operations.

=item *

CallBack_ops_max: Maximum execution time observed for CallBack operations.

=item *

InitCallBackState_ops: Number of InitCallBackState operations executed.

=item *

InitCallBackState_ops_ok: Number of successful InitCallBackState operations.

=item *

InitCallBackState_ops_sum: Sum of timings for InitCallBackState operations.

=item *

InitCallBackState_ops_sqr: Sum of squares of sample timings for InitCallBackState operations.

=item *

InitCallBackState_ops_min: Minimum execution time observed for InitCallBackState operations.

=item *

InitCallBackState_ops_max: Maximum execution time observed for InitCallBackState operations.

=item *

Probe_ops: Number of Probe operations executed.

=item *

Probe_ops_ok: Number of successful Probe operations.

=item *

Probe_ops_sum: Sum of timings for Probe operations.

=item *

Probe_ops_sqr: Sum of squares of sample timings for Probe operations.

=item *

Probe_ops_min: Minimum execution time observed for Probe operations.

=item *

Probe_ops_max: Maximum execution time observed for Probe operations.

=item *

GetLock_ops: Number of GetLock operations executed.

=item *

GetLock_ops_ok: Number of successful GetLock operations.

=item *

GetLock_ops_sum: Sum of timings for GetLock operations.

=item *

GetLock_ops_sqr: Sum of squares of sample timings for GetLock operations.

=item *

GetLock_ops_min: Minimum execution time observed for GetLock operations.

=item *

GetLock_ops_max: Maximum execution time observed for GetLock operations.

=item *

GetCE_ops: Number of GetCE operations executed.

=item *

GetCE_ops_ok: Number of successful GetCE operations.

=item *

GetCE_ops_sum: Sum of timings for GetCE operations.

=item *

GetCE_ops_sqr: Sum of squares of sample timings for GetCE operations.

=item *

GetCE_ops_min: Minimum execution time observed for GetCE operations.

=item *

GetCE_ops_max: Maximum execution time observed for GetCE operations.

=item *

XStatsVersion_CM_ops: Number of XStatsVersion operations executed.

=item *

XStatsVersion_CM_ops_ok: Number of successful XStatsVersion operations.

=item *

XStatsVersion_CM_ops_sum: Sum of timings for XStatsVersion operations.

=item *

XStatsVersion_CM_ops_sqr: Sum of squares of sample timings for XStatsVersion operations.

=item *

XStatsVersion_CM_ops_min: Minimum execution time observed for XStatsVersion operations.

=item *

XStatsVersion_CM_ops_max: Maximum execution time observed for XStatsVersion operations.

=item *

GetXStats_CM_ops: Number of GetXStats operations executed.

=item *

GetXStats_CM_ops_ok: Number of successful GetXStats operations.

=item *

GetXStats_CM_ops_sum: Sum of timings for GetXStats operations.

=item *

GetXStats_CM_ops_sqr: Sum of squares of sample timings for GetXStats operations.

=item *

GetXStats_CM_ops_min: Minimum execution time observed for GetXStats operations.

=item *

GetXStats_CM_ops_max: Maximum execution time observed for GetXStats operations.

=back

=head2 Authentication and Replicated File Access Section (Auth_Access_section)

Authentication Information for Cache Manager Group (Auth_Stats_group)

=over

=item *

curr_PAGs: Current number of PAGs.

=item *

curr_Records: Current number of records in table.

=item *

curr_AuthRecords: Current number of of authenticated records (with valid ticket).

=item *

curr_UnauthRecords: Current number of of unauthenticated records (without any ticket at all).

=item *

curr_MaxRecordsInPAG: Maximum records for a single PAG.

=item *

curr_LongestChain: Length of longest current hash chain.

=item *

PAGCreations: Number of PAG creations.

=item *

TicketUpdates: Number of ticket additions/refreshes.

=item *

HWM_PAGS: High water mark - number of PAGs.

=item *

HWM_Records: High water mark - number of records.

=item *

HWM_MaxRecordsInPAG: High water mark - maximum records for a single PAG.

=item *

HWM_LongestChain: High water mark - longest hash chain.

=back

Unreplicated File Access Group (Access_Stats_group)

=over

=item *

unreplicatedRefs: Number of references to unreplicated data.

=item *

replicatedRefs: Number of references to replicated data.

=item *

numReplicasAccessed: Number of replicas accessed.

=item *

maxReplicasPerRef: Maximum number of replicas accessed per reference.

=item *

refFirstReplicaOK: Number of references satisfied by 1st replica.

=back

=head1 The File Server Statistics


File Server statistics are classified into the following sections and groups:

=over

=item *

PerfStats_section: Performance Statistics Section.

=over

=item *

VnodeCache_group: Vnode Cache Group.

=item *

Directory_group: Directory Package Group.

=item *

Rx_group: Rx Group.

=item *

HostModule_group: Host Module Fields Group.

=item *

misc_group: Miscellaneous Variables Group.

=back

=item *

RPCop_section: RPC Operations Section.

=over

=item *

RPCopTimes_group: Individual RPC Operation Timings.

=item *

RPCopBytes_group: Byte Information for Certain RPC Operations.

=back

=back

All File Server variables categorized under the above sections and groups names are listed below.

=head2 Performance Statistics Section (PerfStats_section)

Vnode Cache Group (VnodeCache_group)

=over

=item *

vcache_L_Entries: Number of entries in LARGE vnode cache.

=item *

vcache_L_Allocs: Number of allocs (large).

=item *

vcache_L_Gets: Number of gets (large).

=item *

vcache_L_Reads: Number of reads (large).

=item *

vcache_L_Writes: Number of writes (large).

=item *

vcache_S_Entries: Number of entries in SMALL vnode cache.

=item *

vcache_S_Allocs: Number of allocs (small).

=item *

vcache_S_Gets: Number of gets (small).

=item *

vcache_S_Reads: Number of reads (small).

=item *

vcache_S_Writes: Number of writes (small).

=item *

vcache_H_Entries: Number of entries in HEADER vnode cache.

=item *

vcache_H_Gets: Number of gets (header)

=item *

vcache_H_Replacements: Number of replacements (header)

=back

Directory Package Group (Directory_group)

=over

=item *

dir_Buffers: Number of buffers in use.

=item *

dir_Calls: Number of read calls made.

=item *

dir_IOs: I/O operations performed.

=back

Rx Group (Rx_group)

=over

=item *

rx_packetRequests: Packet allocation requests.

=item *

rx_noPackets_RcvClass: Failed packet requests (receive class).

=item *

rx_noPackets_SendClass: Failed packet requests (send class).

=item *

rx_noPackets_SpecialClass: Failed packet requests (special class).

=item *

rx_socketGreedy: Did SO_GREEDY succeed?

=item *

rx_bogusPacketOnRead: Short packets received.

=item *

rx_bogusHost: Host address from bogus packets.

=item *

rx_noPacketOnRead: Read packets with no packet there.

=item *

rx_noPacketBuffersOnRead: Packets dropped due to buffer shortage.

=item *

rx_selects: Selects waiting on packet or timeout.

=item *

rx_sendSelects: Selects forced upon sends.

=item *

rx_packetsRead_RcvClass: Packets read (receive class).

=item *

rx_packetsRead_SendClass: Packets read (send class).

=item *

rx_packetsRead_SpecialClass: Packets read (special class).

=item *

rx_dataPacketsRead: Unique data packets read off wire.

=item *

rx_ackPacketsRead: ACK packets read.

=item *

rx_dupPacketsRead: Duplicate data packets read.

=item *

rx_spuriousPacketsRead: Inappropriate packets read.

=item *

rx_packetsSent_RcvClass: Packets sent (receive class).

=item *

rx_packetsSent_SendClass: Packets sent (send class).

=item *

rx_packetsSent_SpecialClass: Packets sent (special class).

=item *

rx_ackPacketsSent: ACK packets sent.

=item *

rx_pingPacketsSent: Ping packets sent.

=item *

rx_abortPacketsSent: Abort packets sent.

=item *

rx_busyPacketsSent: Busy packets sent.

=item *

rx_dataPacketsSent: Unique data packets sent.

=item *

rx_dataPacketsReSent: Retransmissions sent.

=item *

rx_dataPacketsPushed: Retransmissions pushed by NACK.

=item *

rx_ignoreAckedPacket: Packets with ACKed flag on rxi_Start.

=item *

rx_totalRtt_Sec and rx_totalRtt_Usec: Total round trip time (in seconds and milliseconds).

=item *

rx_minRtt_Sec and rx_minRtt_Usec: Minimum round trip time (in seconds and milliseconds).

=item *

rx_maxRtt_Sec and rx_maxRtt_Usec: Maximum round trip time (in seconds and milliseconds).

=item *

rx_nRttSamples: Round trip samples.

=item *

rx_nServerConns: Total server connections.

=item *

rx_nClientConns: Total client connections.

=item *

rx_nPeerStructs: Total peer structures.

=item *

rx_nCallStructs: Total call structures.

=item *

rx_nFreeCallStructs: Total free call structures.

=back

Host Module Fields Group (HostModule_group)

=over

=item *

host_NumHostEntries: Number of host entries.

=item *

host_HostBlocks: Blocks in use for hosts.

=item *

host_NonDeletedHosts: Non-deleted hosts.

=item *

host_HostsInSameNetOrSubnet: Hosts in same subnet as server.

=item *

host_HostsInDiffSubnet: Hosts in different subnet than server.

=item *

host_HostsInDiffNetwork: Hosts in different network than server.

=item *

host_NumClients: Number of client entries.

=item *

host_ClientBlocks: Blocks in use for clients.

=back

Miscellaneous Variables Group (misc_group)

=over

=item *

numPerfCalls: Number of performance calls received.

=back

=head2 RPC Operations Section (RPCop_section)

Individual RPC Operation Timings Group (RPCopTimes_group)

=over

=item *

epoch: Time when data collection began.

=item *

FetchData_ops: Number of FetchData operations executed.

=item *

FetchData_ops_ok: Number of successful FetchData operations.

=item *

FetchData_sum: Sum of timings for FetchData operations.

=item *

FetchData_sqr: Sum of squares of sample timings for FetchData operations.

=item *

FetchData_min: Minimum execution time observed for FetchData operations.

=item *

FetchData_max: Maximum execution time observed for FetchData operations.

=item *

FetchACL_ops: Number of FetchACL operations executed.

=item *

FetchACL_ops_ok: Number of successful FetchACL operations.

=item *

FetchACL_sum: Sum of timings for FetchACL operations.

=item *

FetchACL_sqr: Sum of squares of sample timings for FetchACL operations.

=item *

FetchACL_min: Minimum execution time observed for FetchACL operations.

=item *

FetchACL_max: Maximum execution time observed for FetchACL operations.

=item *

FetchStatus_ops: Number of FetchStatus operations executed.

=item *

FetchStatus_ops_ok: Number of successful FetchStatus operations.

=item *

FetchStatus_sum: Sum of timings for FetchStatus operations.

=item *

FetchStatus_sqr: Sum of squares of sample timings for FetchStatus operations.

=item *

FetchStatus_min: Minimum execution time observed for FetchStatus operations.

=item *

FetchStatus_max: Maximum execution time observed for FetchStatus operations.

=item *

StoreData_ops: Number of StoreData operations executed.

=item *

StoreData_ops_ok: Number of successful StoreData operations.

=item *

StoreData_sum: Sum of timings for StoreData operations.

=item *

StoreData_sqr: Sum of squares of sample timings for StoreData operations.

=item *

StoreData_min: Minimum execution time observed for StoreData operations.

=item *

StoreData_max: Maximum execution time observed for StoreData operations.

=item *

StoreACL_ops: Number of StoreACL operations executed.

=item *

StoreACL_ops_ok: Number of successful StoreACL operations.

=item *

StoreACL_sum: Sum of timings for StoreACL operations.

=item *

StoreACL_sqr: Sum of squares of sample timings for StoreACL operations.

=item *

StoreACL_min: Minimum execution time observed for StoreACL operations.

=item *

StoreACL_max: Maximum execution time observed for StoreACL operations.

=item *

StoreStatus_ops: Number of StoreStatus operations executed.

=item *

StoreStatus_ops_ok: Number of successful StoreStatus operations.

=item *

StoreStatus_sum: Sum of timings for StoreStatus operations.

=item *

StoreStatus_sqr: Sum of squares of sample timings for StoreStatus operations.

=item *

StoreStatus_min: Minimum execution time observed for StoreStatus operations.

=item *

StoreStatus_max: Maximum execution time observed for StoreStatus operations.

=item *

RemoveFile_ops: Number of RemoveFile operations executed.

=item *

RemoveFile_ops_ok: Number of successful RemoveFile operations.

=item *

RemoveFile_sum: Sum of timings for RemoveFile operations.

=item *

RemoveFile_sqr: Sum of squares of sample timings for RemoveFile operations.

=item *

RemoveFile_min: Minimum execution time observed for RemoveFile operations.

=item *

RemoveFile_max: Maximum execution time observed for RemoveFile operations.

=item *

CreateFile_ops: Number of CreateFile operations executed.

=item *

CreateFile_ops_ok: Number of successful CreateFile operations.

=item *

CreateFile_sum: Sum of timings for CreateFile operations.

=item *

CreateFile_sqr: Sum of squares of sample timings for CreateFile operations.

=item *

CreateFile_min: Minimum execution time observed for CreateFile operations.

=item *

CreateFile_max: Maximum execution time observed for CreateFile operations.

=item *

Rename_ops: Number of Rename operations executed.

=item *

Rename_ops_ok: Number of successful Rename operations.

=item *

Rename_sum: Sum of timings for Rename operations.

=item *

Rename_sqr: Sum of squares of sample timings for Rename operations.

=item *

Rename_min: Minimum execution time observed for Rename operations.

=item *

Rename_max: Maximum execution time observed for Rename operations.

=item *

Symlink_ops: Number of Symlink operations executed.

=item *

Symlink_ops_ok: Number of successful Symlink operations.

=item *

Symlink_sum: Sum of timings for Symlink operations.

=item *

Symlink_sqr: Sum of squares of sample timings for Symlink operations.

=item *

Symlink_min: Minimum execution time observed for Symlink operations.

=item *

Symlink_max: Maximum execution time observed for Symlink operations.

=item *

Link_ops: Number of Link operations executed.

=item *

Link_ops_ok: Number of successful Link operations.

=item *

Link_sum: Sum of timings for Link operations.

=item *

Link_sqr: Sum of squares of sample timings for Link operations.

=item *

Link_min: Minimum execution time observed for Link operations.

=item *

Link_max: Maximum execution time observed for Link operations.

=item *

MakeDir_ops: Number of MakeDir operations executed.

=item *

MakeDir_ops_ok: Number of successful MakeDir operations.

=item *

MakeDir_sum: Sum of timings for MakeDir operations.

=item *

MakeDir_sqr: Sum of squares of sample timings for MakeDir operations.

=item *

MakeDir_min: Minimum execution time observed for MakeDir operations.

=item *

MakeDir_max: Maximum execution time observed for MakeDir operations.

=item *

RemoveDir_ops: Number of RemoveDir operations executed.

=item *

RemoveDir_ops_ok: Number of successful RemoveDir operations.

=item *

RemoveDir_sum: Sum of timings for RemoveDir operations.

=item *

RemoveDir_sqr: Sum of squares of sample timings for RemoveDir operations.

=item *

RemoveDir_min: Minimum execution time observed for RemoveDir operations.

=item *

RemoveDir_max: Maximum execution time observed for RemoveDir operations.

=item *

SetLock_ops: Number of SetLock operations executed.

=item *

SetLock_ops_ok: Number of successful SetLock operations.

=item *

SetLock_sum: Sum of timings for SetLock operations.

=item *

SetLock_sqr: Sum of squares of sample timings for SetLock operations.

=item *

SetLock_min: Minimum execution time observed for SetLock operations.

=item *

SetLock_max: Maximum execution time observed for SetLock operations.

=item *

ExtendLock_ops: Number of ExtendLock operations executed.

=item *

ExtendLock_ops_ok: Number of successful ExtendLock operations.

=item *

ExtendLock_sum: Sum of timings for ExtendLock operations.

=item *

ExtendLock_sqr: Sum of squares of sample timings for ExtendLock operations.

=item *

ExtendLock_min: Minimum execution time observed for ExtendLock operations.

=item *

ExtendLock_max: Maximum execution time observed for ExtendLock operations.

=item *

ReleaseLock_ops: Number of ReleaseLock operations executed.

=item *

ReleaseLock_ops_ok: Number of successful ReleaseLock operations.

=item *

ReleaseLock_sum: Sum of timings for ReleaseLock operations.

=item *

ReleaseLock_sqr: Sum of squares of sample timings for ReleaseLock operations.

=item *

ReleaseLock_min: Minimum execution time observed for ReleaseLock operations.

=item *

ReleaseLock_max: Maximum execution time observed for ReleaseLock operations.

=item *

GetStatistics_ops: Number of GetStatistics operations executed.

=item *

GetStatistics_ops_ok: Number of successful GetStatistics operations.

=item *

GetStatistics_sum: Sum of timings for GetStatistics operations.

=item *

GetStatistics_sqr: Sum of squares of sample timings for GetStatistics operations.

=item *

GetStatistics_min: Minimum execution time observed for GetStatistics operations.

=item *

GetStatistics_max: Maximum execution time observed for GetStatistics operations.

=item *

GiveUpCallbacks_ops: Number of GiveUpCallbacks operations executed.

=item *

GiveUpCallbacks_ops_ok: Number of successful GiveUpCallbacks operations.

=item *

GiveUpCallbacks_sum: Sum of timings for GiveUpCallbacks operations.

=item *

GiveUpCallbacks_sqr: Sum of squares of sample timings for GiveUpCallbacks operations.

=item *

GiveUpCallbacks_min: Minimum execution time observed for GiveUpCallbacks operations.

=item *

GiveUpCallbacks_max: Maximum execution time observed for GiveUpCallbacks operations.

=item *

GetVolumeInfo_ops: Number of GetVolumeInfo operations executed.

=item *

GetVolumeInfo_ops_ok: Number of successful GetVolumeInfo operations.

=item *

GetVolumeInfo_sum: Sum of timings for GetVolumeInfo operations.

=item *

GetVolumeInfo_sqr: Sum of squares of sample timings for GetVolumeInfo operations.

=item *

GetVolumeInfo_min: Minimum execution time observed for GetVolumeInfo operations.

=item *

GetVolumeInfo_max: Maximum execution time observed for GetVolumeInfo operations.

=item *

GetVolumeStatus_ops: Number of GetVolumeStatus operations executed.

=item *

GetVolumeStatus_ops_ok: Number of successful GetVolumeStatus operations.

=item *

GetVolumeStatus_sum: Sum of timings for GetVolumeStatus operations.

=item *

GetVolumeStatus_sqr: Sum of squares of sample timings for GetVolumeStatus operations.

=item *

GetVolumeStatus_min: Minimum execution time observed for GetVolumeStatus operations.

=item *

GetVolumeStatus_max: Maximum execution time observed for GetVolumeStatus operations.

=item *

SetVolumeStatus_ops: Number of SetVolumeStatus operations executed.

=item *

SetVolumeStatus_ops_ok: Number of successful SetVolumeStatus operations.

=item *

SetVolumeStatus_sum: Sum of timings for SetVolumeStatus operations.

=item *

SetVolumeStatus_sqr: Sum of squares of sample timings for SetVolumeStatus operations.

=item *

SetVolumeStatus_min: Minimum execution time observed for SetVolumeStatus operations.

=item *

SetVolumeStatus_max: Maximum execution time observed for SetVolumeStatus operations.

=item *

GetRootVolume_ops: Number of GetRootVolume operations executed.

=item *

GetRootVolume_ops_ok: Number of successful GetRootVolume operations.

=item *

GetRootVolume_sum: Sum of timings for GetRootVolume operations.

=item *

GetRootVolume_sqr: Sum of squares of sample timings for GetRootVolume operations.

=item *

GetRootVolume_min: Minimum execution time observed for GetRootVolume operations.

=item *

GetRootVolume_max: Maximum execution time observed for GetRootVolume operations.

=item *

CheckToken_ops: Number of CheckToken operations executed.

=item *

CheckToken_ops_ok: Number of successful CheckToken operations.

=item *

CheckToken_sum: Sum of timings for CheckToken operations.

=item *

CheckToken_sqr: Sum of squares of sample timings for CheckToken operations.

=item *

CheckToken_min: Minimum execution time observed for CheckToken operations.

=item *

CheckToken_max: Maximum execution time observed for CheckToken operations.

=item *

GetTime_ops: Number of GetTime operations executed.

=item *

GetTime_ops_ok: Number of successful GetTime operations.

=item *

GetTime_sum: Sum of timings for GetTime operations.

=item *

GetTime_sqr: Sum of squares of sample timings for GetTime operations.

=item *

GetTime_min: Minimum execution time observed for GetTime operations.

=item *

GetTime_max: Maximum execution time observed for GetTime operations.

=item *

NGetVolumeInfo_ops: Number of NGetVolumeInfo operations executed.

=item *

NGetVolumeInfo_ops_ok: Number of successful NGetVolumeInfo operations.

=item *

NGetVolumeInfo_sum: Sum of timings for NGetVolumeInfo operations.

=item *

NGetVolumeInfo_sqr: Sum of squares of sample timings for NGetVolumeInfo operations.

=item *

NGetVolumeInfo_min: Minimum execution time observed for NGetVolumeInfo operations.

=item *

NGetVolumeInfo_max: Maximum execution time observed for NGetVolumeInfo operations.

=item *

BulkStatus_ops: Number of BulkStatus operations executed.

=item *

BulkStatus_ops_ok: Number of successful BulkStatus operations.

=item *

BulkStatus_sum: Sum of timings for BulkStatus operations.

=item *

BulkStatus_sqr: Sum of squares of sample timings for BulkStatus operations.

=item *

BulkStatus_min: Minimum execution time observed for BulkStatus operations.

=item *

BulkStatus_max: Maximum execution time observed for BulkStatus operations.

=item *

XStatsVersion_ops: Number of XStatsVersion operations executed.

=item *

XStatsVersion_ops_ok: Number of successful XStatsVersion operations.

=item *

XStatsVersion_sum: Sum of timings for XStatsVersion operations.

=item *

XStatsVersion_sqr: Sum of squares of sample timings for XStatsVersion operations.

=item *

XStatsVersion_min: Minimum execution time observed for XStatsVersion operations.

=item *

XStatsVersion_max: Maximum execution time observed for XStatsVersion operations.

=item *

GetXStats_ops: Number of GetXStats operations executed.

=item *

GetXStats_ops_ok: Number of successful GetXStats operations.

=item *

GetXStats_sum: Sum of timings for GetXStats operations.

=item *

GetXStats_sqr: Sum of squares of sample timings for GetXStats operations.

=item *

GetXStats_min: Minimum execution time observed for GetXStats operations.

=item *

GetXStats_max: Maximum execution time observed for GetXStats operations.

=back

Byte Information for Certain RPC Operations Group (RPCopBytes_group)

=over

=item *

FetchData_xfers: Number of FetchData operations.

=item *

FetchData_xfers_ok: Number of successful FetchData operations.

=item *

FetchData_xfers_sum: Sum of timing values for FetchData operations.

=item *

FetchData_xfers_sqr: Sum of squares of sample timings for FetchData operations.

=item *

FetchData_xfers_min: Minimum transfer time observed for FetchData operations.

=item *

FetchData_xfers_max: Maximum transfer time observed for FetchData operations.

=item *

FetchData_xfers_bytes_sum: Sum of bytes transferred for FetchData operations.

=item *

FetchData_xfers_bytes_min: Minimum byte transfer observed for FetchData operations.

=item *

FetchData_xfers_bytes_max: Maximum byte transfer observed for FetchData operations.

=item *

FetchData_xfers_bucket0: Tally in bucket0 for FetchData operations.

=item *

FetchData_xfers_bucket1: Tally in bucket1 for FetchData operations.

=item *

FetchData_xfers_bucket2: Tally in bucket2 for FetchData operations.

=item *

FetchData_xfers_bucket3: Tally in bucket3 for FetchData operations.

=item *

FetchData_xfers_bucket4: Tally in bucket4 for FetchData operations.

=item *

FetchData_xfers_bucket5: Tally in bucket5 for FetchData operations.

=item *

FetchData_xfers_bucket6: Tally in bucket6 for FetchData operations.

=item *

FetchData_xfers_bucket7: Tally in bucket7 for FetchData operations.

=item *

FetchData_xfers_bucket8: Tally in bucket8 for FetchData operations.

=item *

StoreData_xfers: Number of StoreData operations.

=item *

StoreData_xfers_ok: Number of successful StoreData operations.

=item *

StoreData_xfers_sum: Sum of timing values for StoreData operations.

=item *

StoreData_xfers_sqr: Sum of squares of sample timings for StoreData operations.

=item *

StoreData_xfers_min: Minimum transfer time observed for StoreData operations.

=item *

StoreData_xfers_max: Maximum transfer time observed for StoreData operations.

=item *

StoreData_xfers_bytes_sum: Sum of bytes transferred for StoreData operations.

=item *

StoreData_xfers_bytes_min: Minimum byte transfer observed for StoreData operations.

=item *

StoreData_xfers_bytes_max: Maximum byte transfer observed for StoreData operations.

=item *

StoreData_xfers_bucket0: Tally in bucket0 for StoreData operations.

=item *

StoreData_xfers_bucket1: Tally in bucket1 for StoreData operations.

=item *

StoreData_xfers_bucket2: Tally in bucket2 for StoreData operations.

=item *

StoreData_xfers_bucket3: Tally in bucket3 for StoreData operations.

=item *

StoreData_xfers_bucket4: Tally in bucket4 for StoreData operations.

=item *

StoreData_xfers_bucket5: Tally in bucket5 for StoreData operations.

=item *

StoreData_xfers_bucket6: Tally in bucket6 for StoreData operations.

=item *

StoreData_xfers_bucket7: Tally in bucket7 for StoreData operations.

=item *

StoreData_xfers_bucket8: Tally in bucket8 for StoreData operations.

=back


=head1 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

=over

=item Elizabeth Cassell <e_a_c@mailsnare.net> and

=item Alf Wachsmann <alfw@slac.stanford.edu>

=back

=head1 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.

pod/afsmonitor.pod  view on Meta::CPAN

#------------------------------------------------------------------------------
# afsmonitor.pod
#
# Copyright © 2004-2006 Alf Wachsmann <alfw@slac.stanford.edu> and
#                  Elizabeth Cassell <e_a_c@mailsnare.net>
#
# $Revision: 1.12 $ $Date: 2006/07/05 22:25:10 $ $Author: alfw $
#
# This library is free software; you can redistribute it and/or modify it
# under the same terms as Perl itself.
#------------------------------------------------------------------------------

=head1 NAME

B<afsmonitor> - Gathers statistics about File Servers and Cache Managers

=head1 SYNOPSIS

  use AFS::Monitor;
  my ($fs, $cm);

  ($fs, $cm) = afsmonitor(cmhosts => "hostName1");

  ($fs, $cm) = afsmonitor(
                          cmhosts => ["hostName1", "hostName2"],
                          fshosts => ["hostName3", "hostName4"],
                         );

  ($fs, $cm) = afsmonitor(
                          config => "configfilename",
                          output => "outputfilename",
                          detailed => 1,
                         );

  foreach $host (@$fs) {
    print "FS Host: $host->{hostName}\n";
    if($host->{probeOK}) {
      print "probe successful\n";
    }
    else {
      print "probe failed\n";
    }
  }

  ($fs, $cm) =
    afsmonitor(
           cmhosts  => ["hostName1", "hostName2"],
           fshosts  => ["hostName3", "hostName4", "hostName5"],
           cmshow   => ["PerfStats_section", "fs_oc_downDst_more_50"],
           fsshow   => ["VnodeCache_group", "FetchData_sqr"],
           fsthresh => [
                        { vcache_S_Entries => 10
                        },
                        { vcache_L_Allocs  => 30
                        },
                        { host => "hostName3",
                          vcache_L_Writes => 20,
                          handler => "HandlerScript arg1 arg2"
                        },
                        { host => "hostName5",
                          vcache_L_Writes => 40,
                        }
                       ],
           cmthresh => [
                        { host => "hostName1",
                          numPerfCalls => 80,
                          handler => "HandlerScript arg"
                        },
                        { fs_oc_downDst_more_50 => 90
                        },
                        { cacheNumEntries => 60,
                          handler => "HandlerScript"
                        },
                        { host => "hostName2",
                          dlocalAccesses => 70
                        }
                       ],
           );

=head1 DESCRIPTION

The B<afsmonitor> function gathers statistics about specified File Server
and Cache Manager operations. It allows the issuer to monitor, from a
single location, a wide range of File Server and Cache Manager
operations on any number of machines in both local and foreign cells.

There are 271 available File Server statistics and 571 available Cache
Manager statistics, listed in the L<afsmon_stats(1)> documentation. By default,
the command displays all of the relevant statistics for the file server
machines named by the B<fshosts> argument and the client machines named
by the B<cmhosts> argument. To limit the display to only the statistics
of interest, list them in the configuration file specified by the
B<config> argument. In addition, use the configuration file for the
following purposes:

=over

=item *

To set threshold values for any statistic. The statistics with values exceeding
their thresholds are indicated in the returned data structure. There are no
default threshold values.

=item *

To specify a program or script to associate with a statistic when it exceeds its
threshold. The script and all of it's arguments will be included in the returned
data structure in a format easy to invoke from within a Perl script. The AFS
distribution does not include any such scripts.

=item *

To list the file server and client machines to gather statistics on, instead of
using the B<fshosts> and B<cmhosts> arguments.

=back

For a description of the configuration file, see the
L<"configuration file"|/"THE CONFIGURATION FILE"> section below.

=head1 OPTIONS

=over

=item B<config>

Names the configuration file which lists the machines to probe,
statistics to display, and threshold values, if any. A partial
pathname is interpreted relative to the current working directory.
Provide this argument if not providing the B<fshosts> argument or
B<cmhosts> argument. For instructions on creating this file, see the
L<"configuration file"|/"THE CONFIGURATION FILE"> section below.

=item B<output>

Names the file to which the B<afsmonitor> function writes all of the
statistics that it collects. By default, no output file is created.
See the L<"writing to an output file"|/"WRITING TO AN OUTPUT FILE">
section below for more information on this file.

=item B<detailed>

Formats the information in the output file named by B<output> argument in a
maximally readable format. Provide the B<output> argument along with this one.

=item B<fshosts>

String with one name or reference to an array with names of one or
more machines from which to gather File Server
statistics. For each machine, provide either a fully qualified
host name, or an unambiguous abbreviation (the ability to resolve
an abbreviation depends on the state of the cell's name service
at the time the command is issued). This argument can be combined
with the B<cmhosts> argument, but not with the B<config> argument.

=item B<cmhosts>

String with one name or reference to an array with names of one or
more machines from which to gather Cache Manager
statistics. For each machine, provide either a fully qualified
host name, or an unambiguous abbreviation (the ability to resolve
an abbreviation depends on the state of the cell's name service
at the time the command is issued). This argument can be combined
with the B<fshosts> argument, but not with the B<config> argument.

=item B<fsshow>

Reference to an array with the names of individual statistics, groups of
statistics, or sections of statistics to include in the File Servers (fs)
data structure. Use this only if not using a configuration file. The
L<afsmon_stats(1)> documentation specifies the group and section to which
each statistic belongs. By default, all of the statistics will be included.

=item B<cmshow>

Reference to an array with the names of individual statistics, groups of
statistics, or sections of statistics to include in the Cache Managers (cm)
data structure. Use thi sonly if not using a configuration file. The
L<afsmon_stats(1)> documentation specifies the group and section to which
each statistic belongs. By default, all of the statistics will be included.

=item B<fsthresh>

Reference to an array of hash references containing thresholds to set. Each
hash should contain a key that is the name of an individual File Server
statistic, with it's value being the desired threshold value for that
statistic. If it is a host-specific threshold, then the key B<host> should
be included, with a value corresponding to one of the File Server hosts
specified in the B<fshosts> argument. If a handler function is to be
associated with the threshold, the key B<handler>'s value should be the name
of the handler function and any arguments to be passed to the handler.

=item B<cmthresh>

Reference to an array of hash references containing thresholds to set. Each
hash should contain a key that is the name of an individual Cache Manager
statistic, with it's value being the desired threshold value for that
statistic. If it is a host-specific threshold, then the key B<host> should
be included, with a value corresponding to one of the Cache Manager hosts
specified in the B<cmhosts> argument. If a handler function is to be
associated with the threshold, the key B<handler>'s value should be the name
of the handler function and any arguments to be passed to the handler.

=back

=head1 OUTPUT

The return values are references to two arrays, one for file
servers and one for cache managers. Each entry in each array
is a reference to a hash containing information about one of
the hosts specified either by the fshosts or cmhosts options,
or in the config file. Each hash in these arrays contains the
following entries:

=over

=item B<hostName>

The name of the host that these statistics represent.

=item B<probeOK>

1 if the statistics were gathered successfully, 0 if the probe failed and no statistics were gathered.

=item B<section_names>

The rest of the keys are the names of sections of statistics (specified in the
L<afsmon_stats(1)> documentation).
Each section entry points to another hash containing entries for each group of
statistics (with keys corresponding to the group name) within that section.
Each group entry points to another hash containing entries for all of the
individual statistics (with keys corresponding to the name of the statistic)
within that group.
The individual statistics also point to hashes, containing up to three entries:

=over

=item B<value>

The value of the statistic for this host.

=item B<overflow>

This key will be present if the value has exceeded a threshold provided in the configuration file.
If a command to execute was specified for this threshold, this entry will contain a string with
the name of the command and all of the parameters that should be passed to the command.
If no command to execute was specified, the value of this entry will be 1.

=item B<threshold>

If this value has exceeded a threshold, this entry will contain the threshold value.
The threshold key will not exist in the hash if no threshold was specified, or if the
specified threshold was not exceeded.

=back

If a config file with "show" directives was given, then only the statistics specified
in the config file will be included, and any groups or sections that were not specified
by a "show" statement and in which no individual statistics were specified by a "show"
statement will not be included.

=back

For examples of accessing the information in the returned data structures
and printing it in a readable format, refer to the B<afsmonitor> script
in the B<examples> directory.

=head1 WRITING TO AN OUTPUT FILE

Include the B<output> argument to name the file into which the
B<afsmonitor> function writes all of the statistics it collects.

The output file is in ASCII format and records the same
information as is returned in the File Server and Cache Manager
data structures. The output file has the following format:

   time  host_name  CM|FS   list_of_measured_values

and specifies the time at which the list_of_measured_values were
gathered from the Cache Manager (CM) or File Server (FS) process
housed on host_name. On those occasion where probes fail, the
value -1 is reported instead of the list_of_measured_values.

If the administrator usually reviews the output file manually,
rather than using it as input to an automated analysis program or
script, including the B<detail> flag formats the data in a more
easily readable form.

=head1 THE CONFIGURATION FILE

To customize the B<afsmonitor> function, create an ASCII-format
configuration file and use the B<config> argument to name it. You
can specify the following in the configuration file:

=over

=item *

The File Servers, Cache Managers, or both, to gather statistics on.

=item *

The statistics to display. By default, the display includes 271
statistics for File Servers and 571 statistics for Cache Managers.
For information on the available statistics, see the L<afsmon_stats(1)>
documentation.

=item *

The threshold values to set for statistics and a script or program
to associate with the statistic if a threshold is exceeded. By
default, no threshold values are defined.

=back

The following list describes the instructions that can appear
in the configuration file:

=over

=item B<cm I<host_name>>

Names a client machine for which to display statistics.

=item B<fs I<host_name>>

Names a file server machine for which to display statistics.

=item B<thresh fs | cm I<field_name> I<thresh_val> [cmd_to_execute] [arg1] ... [argn]>

Assigns the threshold value thresh_val to the statistic field_name,
for either a File Server statistic (fs) or a Cache Manager statistic
(cm). The optional cmd_to_execute field names a binary or script to
associate with the statistic if the value of the statistic exceeds
thresh_val. The optional arg1 through argn fields are additional values
that the B<afsmonitor> function adds as arguments for the cmd_to_execute
command. If any of them include one or more spaces, enclose the
entire field in double quotes.

If a statistic exceeds its threshold and there is a cmd_to_execute
associated with it, afsmonitor will provide a string which can be
used to easily execute the cmd_to_execute from within perl with the
following parameters:

cmd_to_execute I<host_name> fs|cm I<field_name threshold_val actual_val> [E<lt>arg1E<gt>] . . . [E<lt>argnE<gt>]

The parameters cmd_to_execute, fs, cm, field_name, threshold_val,
and arg1 through argn correspond to the values with the same name
on the thresh line. The host_name parameter identifies the file
server or client machine where the statistic has exceeded the
threshold, and the actual_val parameter is the actual value of
field_name that equals or exceeds the threshold value.

Use the thresh line to set either a global threshold, which applies
to all file server machines listed on fs lines or client machines
listed on cm lines in the configuration file, or a machine-specific
threshold, which applies to only one file server or client machine.
To set a global threshold, place the thresh line before any of the
fs or cm lines in the file. To set a machine-specific threshold,
place the thresh line below the corresponding fs or cm line, and
above any other fs or cm lines. A machine-specific threshold value
always overrides the corresponding global threshold, if set. Do not
place a thresh fs line directly after a cm line or a thresh cm line
directly after a fs line.

=item B<show fs | cm I<field/group/section>>

Specifies which individual statistic, group of statistics, or
section of statistics to include in the File Servers (fs) and/or
Cache Managers (cm) data structure. The L<afsmon_stats(1)> documentation
specifies the group and section to which each statistic belongs.
Include as many show lines as necessary to customize the results
as desired, and place them anywhere in the file.

If there are no show lines in the configuration file, then all
statistics for both Cache Managers and File Servers will be
included. Similarly, if there are no show fs lines, then the File
Servers data structure will contain all file server statistics,
or if there are no show cm lines, then the Cache Managers data
structure will display all client statistics.

=item B<# I<comments>>

Displays a line of text that the B<afsmonitor> function ignores because
of the initial number (#) sign, which must appear in the very first
column of the line.

=back

=head1 KNOWN BUGS

Some statistical values reported by L<xstat_fs_test(1)> are not yet
included in afsmonitor. This is a problem of the underlying OpenAFS
libraries and will be fixed in this Perl module as soon as those
libraries are fixed.

=head1 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

=over

=item Elizabeth Cassell <e_a_c@mailsnare.net> and

=item Alf Wachsmann <alfw@slac.stanford.edu>

=back

=head1 COPYRIGHT AND DISCLAIMER

 Copyright 2004-2006
		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.

pod/cmdebug.pod  view on Meta::CPAN

#------------------------------------------------------------------------------
# cmdebug.pod
#
# Copyright © 2004 Alf Wachsmann <alfw@slac.stanford.edu> and
#                  Elizabeth Cassell <e_a_c@mailsnare.net>
#
# This library is free software; you can redistribute it and/or modify it
# under the same terms as Perl itself.
#------------------------------------------------------------------------------

=head1 NAME

B<cmdebug> - Reports status of cache manager and cache entries on a particular AFS client machine.

=head1 SYNOPSIS

  use AFS::Monitor qw(cmdebug);

  my ($locks, $cache_entries) =
      cmdebug(server => "hostName",
              port   => 7001,
              long   => 1
             );

=head1 DESCRIPTION

The B<cmdebug> function can be used to examine the status of the
cache manager and cache entries on a particular AFS client machine.
This function is useful when you suspect that the cache manager is
hung, or is performing poorly.

=head1 OPTIONS

=over

=item B<server>

Names the client machine to examine.

=item B<port>

This switch is only useful with port 7001 since that is the
callback port.

=item B<long>

This switch will display the status of all of the cache entries
on the AFS client when there are no problems.

=back

As a first step in diagnosing a problem, run B<cmdebug> without the
B<long> switch. A machine running in a normal state (i.e. not
experiencing any problems), may display some locks set, but these
locks should not be continually set over multiple B<cmdebug>s. If the
functions returns with no output, it simply means there is nothing
to report.

=head1 OUTPUT

The return values are references to two arrays.
Each entry in the first array represents the status of the cache manager's data
structures. Each entry in the second array represents an individual cache entry.

=head1 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

=over

=item Elizabeth Cassell <e_a_c@mailsnare.net> and

=item Alf Wachsmann <alfw@slac.stanford.edu>

=back

=head1 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.

pod/rxdebug.pod  view on Meta::CPAN

#------------------------------------------------------------------------------
# rxdebug.pod
#
# Copyright © 2004 Alf Wachsmann <alfw@slac.stanford.edu> and
#                  Elizabeth Cassell <e_a_c@mailsnare.net>
#
# This library is free software; you can redistribute it and/or modify it
# under the same terms as Perl itself.
#------------------------------------------------------------------------------

=head1 NAME

B<rxdebug> - Provides debugging trace of Rx activity

=head1 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,
                );

=head1 DESCRIPTION

The B<rxdebug> function provides a trace of Rx activity for the
server or client machine named by the B<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 B<port> argument) on the
machine and one or more processes on other machines.

=head1 OPTIONS

=over

=item B<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, B<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.

=item B<port>

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

=over

=item *

B<7000> for the File Server (B<fileserver> process)

=item *

B<7001> for the Cache Manager (specifically, its callback interface)

=item *

B<7002> for the Protection Server (B<ptserver> process)

=item *

B<7003> for the Volume Location (VL) Server (B<vlserver> process)

=item *

B<7004> for the Authentication Server (B<kaserver> process)

=item *

B<7005> for the Volume Server (B<volserver> process)

=item *

B<7007> for the BOS Server (B<bosserver> process)

=item *

B<7008> for the Update Server (B<upserver> process)

=item *

B<7009> for the NFS/AFS Translator's B<rmtsysd> daemon

=item *

B<7021> for the Backup Server (B<buserver> process)

=item *

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

=back

=item B<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.

=item B<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.

=item B<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).

=item B<onlyserver>

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

=item B<onlyclient>

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

=item B<onlyport>

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

=item B<onlyhost>

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

=item B<onlyauth>

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

=over

=item *

B<auth> for connections at authentication level B<rxkad_auth>

=item *

B<clear> for connections at authentication level B<rxkad_clear>

=item *

B<crypt> for connections at authentication level B<rxkad_crypt>

=item *

B<none> for unauthenticated connections (equivalents are B<null>, B<noauth>,
and B<unauth>)

=back

=item B<version>

Reports the AFS build level of the binary file for the process designated by
the B<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.

=item B<noconns>

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

=item B<peers>

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

=item B<long>

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

=back

=head1 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:

=over

=item *

C<address>: the IP address of the machine given by the B<servers> argument.

=item *

C<port>: the port used.

=item *

C<version>: a description of the AFS build level.

=item *

C<tstats>: a reference to a hash containing standard statistics.

=item *

C<rxstats>: a reference to a hash containing detailed rx statistics.

=item *

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

=item *

C<dallyCounter>: the number of dallying connections skipped.

=item *

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

=back

The simplest case would be if the version flag was set.
The hash table would have only three keys in it:
C<address>, C<port>, and C<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 B<rxdebug> script in the B<examples> directory.


=head1 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

=over

=item Elizabeth Cassell <e_a_c@mailsnare.net> and

=item Alf Wachsmann <alfw@slac.stanford.edu>

=back

=head1 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.

pod/scout.pod  view on Meta::CPAN

#------------------------------------------------------------------------------
# scout.pod
#
# Copyright © 2004 Alf Wachsmann <alfw@slac.stanford.edu> and
#                  Elizabeth Cassell <e_a_c@mailsnare.net>
#
# This library is free software; you can redistribute it and/or modify it
# under the same terms as Perl itself.
#------------------------------------------------------------------------------

=head1 NAME

B<scout>

=head1 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"
                );

=head1 DESCRIPTION

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

=head1 OPTIONS

=over

=item B<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 B<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.

=item B<basename>

String that specifies the basename (domain name) suffix common to all of the
file server machine names specified with the B<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.

=item B<debug>

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

=back

=head1 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.

=over

=item B<hostName>

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

=item B<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.

=item B<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:

=over

=item B<CurrentConnections>

The number of RPC connections open between the File Server process and client
machines. This number equals or exceeds the number in the B<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.

=item B<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.

=item B<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.

=item B<WorkStations>

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

=item B<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:

=over

=item B<Name>

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

=item B<BlocksAvailable>

The number of available kilobyte blocks on this partition.

=item B<TotalBlock>

The total number of kilobyte blocks on this partition.

=back

=back

=back

For an example of using the output from this function, refer to the B<scout>
script in the B<examples> directory.

=head1 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

=over

=item Elizabeth Cassell <e_a_c@mailsnare.net> and

=item Alf Wachsmann <alfw@slac.stanford.edu>

=back

=head1 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.

pod/udebug.pod  view on Meta::CPAN

#------------------------------------------------------------------------------
# udebug.pod
#
# Copyright © 2004 Alf Wachsmann <alfw@slac.stanford.edu> and
#                  Elizabeth Cassell <e_a_c@mailsnare.net>
#
# This library is free software; you can redistribute it and/or modify it
# under the same terms as Perl itself.
#------------------------------------------------------------------------------

=head1 NAME

B<udebug> - Reports status of Ubik process associated with a database server process

=head1 SYNOPSIS

  use AFS::Monitor qw(udebug);

  my $udb = udebug(server => "hostName",
                   port   => 7002,
                   long   => 1
                  );

  $udb = udebug(server => "hostName",
                port   => 7021
               );

=head1 DESCRIPTION

The B<udebug> function returns the status of the lightweight
Ubik process for the database server process identified by
the B<port> argument that is running on the database server
machine named by the B<server> argument. The output identifies
the machines where peer database server processes are running,
which of them is the synchronization site (Ubik coordinator),
and the status of the connections between them.

=head1 OPTIONS

=over

=item B<server>

Names the database server machine that is running the process
for which to collect status information. Provide the machine's
IP address in dotted decimal format, its fully qualified host
name (for example, B<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.

=item B<port>

Identifies the database server process for which to collect
status information, either by its process name or port number.
Provide one of the following values:

=over

=item *

B<buserver> or B<7021> for the Backup Server

=item *

B<kaserver> or B<7004> for the Authentication Server

=item *

B<ptserver> or B<7002> for the Protection Server

=item *

B<vlserver> or B<7003> for the Volume Location Server

=back

=item B<long>

Reports additional information about each peer of the machine
named by the B<server> argument. The information appears by
default if that machine is the synchronization site.

=back

=head1 OUTPUT

Returns a reference to a hash containing all of the collected data.
Below is a list of keys that the hash may contain:

=over

=item B<interfaceAddr>

A reference to an array containing the IP addresses that are
configured with the operating system on the machine specified
by the B<server> argument.

=item B<now>

The time according to the clock on the database server machine
specified by the B<server> argument, measured in seconds since the
Epoch (00:00:00 UTC, January 1, 1970). For correct Ubik operation,
the database server machine clocks must agree on the time.

=item B<lastYesHost>, B<lastYesTime> and B<lastYesClaim>

If the B<udebug> function was issues during the coordinator election
process and voting has not yet begun, this key will not exist.
Otherwise, this key indicates which peer this Ubik process last voted
for as coordinator (it can vote for itself). The key B<lastYesTime>
contains the time (in seconds since the Epoch), of the vote. The key
B<lastYesClaim> contains the time (in seconds since the Epoch) that the
Ubik coordinator requested confirming votes from the secondary sites.
Usually, the B<lastYesTime> and B<lastYesClaim> values are the same;
a difference between them can indicate clock skew or a slow network
connection between the two database server machines. A small difference
is not harmful.

=item B<localVersion>

A reference to a hash containing information about the current
version number of the database maintained by this Ubik process.
It has two entries:

=over

=item B<epoch>

This field is based on a timestamp that reflects when the database
first changed after the most recent coordinator election.

=item B<counter>

This field indicates the number of changes since the election.

=back

=item B<amSyncSite>, B<syncSiteUntil> and B<nServers>

Indicates whether the Ubik process is the coordinator or not.
If there are multiple database sites, and the B<server> argument
names the coordinator (synchronization site), then the B<syncSiteUntil>
entry indicates the time (in seconds since the Epoch) the site will
remain coordinator even if the next attempt to maintain quorum fails.
The entry B<nServers> indicates how many sites are participating
in the quorum.

=item B<recoveryState>

If there are multiple database sites, and the B<server> argument
names the coordinator (synchronization site), then this entry will
contain a hexadecimal number that indicates the current state of the quorum.
A value of C<1f> indicates complete database synchronization, whereas a value
of C<f> means that the coordinator has the correct database but cannot contact
all secondary sites to determine if they also have it. Lesser values are
acceptable if the B<udebug> function is issued during coordinator election, but
they denote a problem if they persist. The individual flags have the
following meanings:

=over

=item C<0x1>

This machine is the coordinator

=item C<0x2>

The coordinator has determined which site has the database with the highest
version number

=item C<0x4>

The coordinator has a copy of the database with the highest version number

=item C<0x8>

The database's version number has been updated correctly

=item C<0x10>

All sites have the database with the highest version number

=back

=item B<activeWrite>, B<epochTime> and B<tidCounter>

Indicates whether the B<udebug> function was issued while the coordinator was
writing a change into the database. The entries B<epochTime> and B<tidCounter>
identify the transaction.

=item B<isClone>

True if the machine named by the B<server> argument is a clone, which can
never become sync site.

=item B<lowestHost> and B<syncHost>

The B<lowestHost> is the lowest IP address of any peer from which the
Ubik process has received a message recently, whereas the B<syncHost>
is the IP address of the current coordinator. If they differ, the machine
with the lowest IP address is not currently the coordinator. The Ubik
process continues voting for the current coordinator as long as they
remain in contact, which provides for maximum stability. However, in
the event of another coordinator election, this Ubik process votes for
the B<lowestHost> site instead (assuming they are in contact), because
it has a bias to vote in elections for the site with the lowest IP address.

=item B<lowestTime>

The time (in seconds since the Epoch) that the B<lowestHost> (see above) was set.

=item B<syncTime>

The time (in seconds since the Epoch) that the B<syncHost> (see above) was set.

=item B<syncVersion>

A reference to a hash containing two entries, B<epoch> and B<counter>,
indicating the version number of the database at the synchronization site,
which needs to match the version number of the local databse, indicated
by B<localVersion> (see above).

=item B<lockedPages> and B<writeLockedPages>

Indicates how many VLDB records are currently locked for any operation
or for writing in particular. The values are nonzero if the B<udebug> function
is issued while an operation is in progress.

=item B<anyReadLocks> and B<anyWriteLocks>

These values are true if there are any read or write locks on database records.

=item B<currentTrans> and B<writeTrans>

These values are true if there are any read or write transactions in
progress when the B<udebug> function is issued.

=item B<syncTid>

A reference to a hash containing two entries, B<epoch> and B<counter>, indicating
the transaction tid for the transaction indicated by B<currentTrans> or B<writeTrans>
above.

=item B<epochTime>

If the machine named by the B<server> argument is the coordinator,
this reports the time (in seconds since the Epoch) the current coordinator
last updated the database.

=item B<servers>

If the machine named by the B<server> argument is the coordinator, B<servers>
will contain a reference to an array with an entry for each secondary site
that is participating in the quorum, in the format of hash references
containing the following entries:

=over

=item B<addr>

The site's IP address

=item B<remoteVersion>

A hash reference containing the entries B<epoch> and B<counter>,
indicating the version number of the database it is maintaining.

=item B<isClone>

True if the site is only a clone.

=item B<lastVoteTime>

The time, in seconds since the Epoch, the coordinator last received a vote
message from the Ubik process at the site.
If the B<udebug> function is issued during the coordinator election process
and voting has not yet begun, this will be 0.

=item B<lastBeaconSent>

The time, in seconds since the Epoch, the coordinator last requested a vote message.
If the B<udebug> function is issued during the coordinator election process
and voting has not yet begun, this will be 0.

=item B<lastVote>

True if the last vote was yes; false if the last vote was no.

=item B<currentDB>

1 if the site has the database with the highest version number, 0 if it does not.

=item B<up>

1 if the Ubik process at the site is functioning correctly, 0 if it is not.

=item B<beaconSinceDown>

1 if the site has responded to the coordinator's last request for votes, 0 if it has not

=back

Including the B<long> flag produces peer entries even when the B<server>
argument names a secondary site, but in that case only the ip address is
guaranteed to be accurate. For example, the value in the B<remoteVersion> field
is usually 0.0, because secondary sites do not poll their peers for this
information. The values in the B<lastVoteTime> and B<lastBeaconSent> fields
indicate when this site last received or requested a vote as coordinator; they
generally indicate the time of the last coordinator election.

=back

For further details of interpreting the contents of the returned hash
reference, and an example of printing its entire contents in a readable
format, refer to the B<udebug> script in the B<examples> directory.

=head1 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

=over

=item Elizabeth Cassell <e_a_c@mailsnare.net> and

=item Alf Wachsmann <alfw@slac.stanford.edu>

=back

=head1 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.

pod/xstat_cm_test.pod  view on Meta::CPAN

#------------------------------------------------------------------------------
# xstat_cm_test.pod
#
# Copyright © 2004 Alf Wachsmann <alfw@slac.stanford.edu> and
#                  Elizabeth Cassell <e_a_c@mailsnare.net>
#
# This library is free software; you can redistribute it and/or modify it
# under the same terms as Perl itself.
#------------------------------------------------------------------------------

=head1 NAME

B<xstat_cm_test> - Gathers data collections from the Cache Manager

=head1 SYNOPSIS

  use AFS::Monitor qw(xstat_cm_test);

  my $result = xstat_cm_test(
                             cmname => ["hostName1", "hostName2"],
                             collID => [0, 1, 2],
                            );

  foreach my $probe (@$result) {
    print "For host: $probe->{hostName}, ";
    print "Collection $probe->{collectionNumber}\n";
    if ($probe->{probeOK}) {
      print "probe successful\n";
    } else {
      print "probe failed\n";
    }
  }

=head1 DESCRIPTION

The B<xstat_cm_test> function returns the data collections from B<libxstat_cm.a>
associated with the Cache Manager.

=head1 OPTIONS

=over

=item B<cmname>

String with one name or reference to an array with names of one or
more machines from which to monitor the Cache Manager.

=item B<collID>

Integer or reference to an array where each entry specifies a data collection
to return, which defines the type and amount of data the command interpreter
gathers about the Cache Manager. Data is returned in a predefined data
structure.

There are three acceptable values:

=over

=item B<0>

Provides profiling information about the numbers of times different internal
Cache Manager routines were called since the Cache Manager started.

=item B<1>

Reports various internal performance statistics related to the Cache Manager
(for example, statistics about how effectively the cache is being used and the
quantity of intracell and intercell data access).

=item B<2>

Reports all of the internal performance statistics provided by the B<1>
setting, plus some additional, detailed performance figures (for example,
statistics about the number of RPCs sent by the Cache Manager and how long
they take to complete, and statistics regarding authentication, access,
and PAG information associated with data access).

=back

=back

=head1 OUTPUT

The returned value is a reference to an array. There is an entry in the array
for each collection gathered for each cache manager. Each entry in the array is
a reference to a hash, containing the following keys:

=over

=item B<hostName>

The name of the cache manager this data collection represents

=item B<collectionNumber>

The data collection number

=item B<probeTime>

The time the probe was initiated, measured in seconds since the Epoch
(00:00:00 UTC, January 1, 1970).

=item B<probeOK>

1 if the probe was successful, 0 if the probe failed.

=item B<data>

If the probe was not successful, this key will not exist. Otherwise, this
entry will contain a reference to a hash containing all of the data collected.
For details on the contents of this hash, and an example of printing it in a
readable format, refer to the B<xstat_cm_test> script in the B<examples>
directory.

=back

=head1 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

=over

=item Elizabeth Cassell <e_a_c@mailsnare.net> and

=item Alf Wachsmann <alfw@slac.stanford.edu>

=back

=head1 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.

pod/xstat_fs_test.pod  view on Meta::CPAN

#------------------------------------------------------------------------------
# xstat_fs_test.pod
#
# Copyright © 2004 Alf Wachsmann <alfw@slac.stanford.edu> and
#                  Elizabeth Cassell <e_a_c@mailsnare.net>
#
# This library is free software; you can redistribute it and/or modify it
# under the same terms as Perl itself.
#------------------------------------------------------------------------------

=head1 NAME

B<xstat_fs_test> - Gathers data collections from the File Server process.

=head1 SYNOPSIS

  use AFS::Monitor qw(xstat_fs_test);

  my $result = xstat_fs_test(
                             fsname => ["hostName1", "hostName2"],
                             collID => [0, 1, 2],
                            );

  foreach my $probe (@$result) {
    print "For host: $probe->{hostName}, ";
    print "Collection $probe->{collectionNumber}\n";
    if ($probe->{probeOK}) {
      print "probe successful\n";
    } else {
      print "probe failed\n";
    }
  }

=head1 DESCRIPTION

The B<xstat_fs_test> function tests the routines in the B<libxstat_fs.a>
library and returns the data collections associated with the File Server (the
fs process).

=head1 OPTIONS

=over

=item B<fsname>

String with one name or reference to an array with names of one or
more machines from which to monitor the File Server process.

=item B<collID>

Integer or reference to an array where each entry specifies each data collection
to return, which defines the type and amount of data the command interpreter
gathers about the File Server. Data is returned in a predefined data structure.

There are three acceptable values:

=over

=item B<0>

Provides profiling information about the numbers of times different internal
File Server routines were called since the File Server started. This value is
not currently implemented; it returns no data.

=item B<1>

Reports various internal performance statistics related to the File Server
(for example, vnode cache entries and Rx protocol activity).

=item B<2>

Reports all of the internal performance statistics provided by the 1 setting,
plus some additional, detailed performance figures about the File Server (for
example, minimum, maximum, and cumulative statistics regarding File Server
RPCs, how long they take to complete, and how many succeed).

=item B<3>

Only when compiled with OpenAFS-1.4.1 or newer.
Reports various internal CallBack statistics related to the File Server.

=back

=back

=head1 OUTPUT

The returned value is a reference to an array. There is an entry in the array
for each collection gathered for each file server. Each entry in the array is
a reference to a hash, containing the following keys:

=over

=item B<hostName>

The name of the file server this data collection represents

=item B<collectionNumber>

The data collection number

=item B<probeTime>

The time the probe was initiated, measured in seconds since the Epoch
(00:00:00 UTC, January 1, 1970).

=item B<probeOK>

1 if the probe was successful, 0 if the probe failed.

=item B<data>

If the probe was not successful, this key will not exist. Otherwise, this
entry will contain a reference to a hash containing all of the data collected.
For details on the contents of this hash, and an example of printing it in a
readable format, refer to the B<xstat_fs_test> script in the B<examples>
directory.

=back

=head1 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

=over

=item Elizabeth Cassell <e_a_c@mailsnare.net> and

=item Alf Wachsmann <alfw@slac.stanford.edu>

=back

=head1 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.

src/Makefile.PL  view on Meta::CPAN

#------------------------------------------------------------------------------
# RCS-Id: "@(#)$Id: Makefile.PL,v 1.21 2007/05/14 18:24:17 alfw Exp $"
#
# Copyright © 2001-2004 Norbert E. Gruener <nog@MPA-Garching.MPG.de>
#             2004-2006 Alf Wachsmann <alfw@slac.stanford.edu>
#                       and Elizabeth Cassell
# This library is free software; you can redistribute it and/or modify it
# under the same terms as Perl itself.
#------------------------------------------------------------------------------

use strict;
use English;

use ExtUtils::MakeMaker;
use Config;

my $archname = $Config{'archname'};
# if ($archname =~ /thread/i) { die "Threaded Perl is not supported ...\n"; }

my $VERSION = "0.3.2";

# give me the path to the AFS system libraries
# used to build the AFS extension module
my $guess_path;
if    (-r "/usr/local/include/afs/afs.h") { $guess_path = '/usr/local'; }
elsif (-r "/usr/afsws/include/afs/afs.h") { $guess_path = '/usr/afsws'; }
elsif (-r "/usr/include/afs/afs.h")       { $guess_path = '/usr'; }
elsif (-r "/Library/OpenAFS/Tools/include/afs/afs.h") { $guess_path = '/Library/OpenAFS/Tools'; }

my $AFSPath;
if (defined $ENV{AFSPATH}) {
  $AFSPath = $ENV{AFSPATH};
} else {
  my $mess = "\nPath to the AFS installation (libraries, binaries, \n"
           . "header files) to be used for this installation? \t$AFSPath] ";
  $AFSPath = prompt($mess, $guess_path);
}

$AFSPath =~ s\/$\\;

# find out the AFS version of the AFS system libraries
open FILE, ">fotav.c";
print FILE <<'EOF';

#include <stdio.h>

int main(void) {
  extern char *AFSVersion;
  printf(">%s<\n",AFSVersion);
}
EOF
close FILE;

system("$Config::Config{cc} fotav.c -L$AFSPath/lib -lubik");
if ($CHILD_ERROR) {
  unlink 'fotav.c';
  die "\nCould not compile test code to retrieve the version of AFS system libraries...\n";
}
my $version = `./a.out` || die "\nCould not run test code to retrieve the version of AFS system libraries...\n";
unlink 'a.out', 'fotav.c';
print "AFS Version = $version \n";

if ($version =~ /3.[4,5]/) {
  die("This release does not support AFS 3.4/3.5 system libraries ...\n");
}

# set the compiler flag "-D$version" according to the AFS version
my ($d_flag, $a_flag) = ('', '');
if    ($version =~ /3.4/)   { $d_flag = 'AFS 3.4'; }
elsif ($version =~ /3.5/)   { $d_flag = 'AFS 3.5'; }
elsif ($version =~ /3.6/)   { $d_flag = 'AFS 3.6'; }
elsif ($version =~ /1.0/)   { $d_flag = 'OpenAFS 1.0'; }
elsif ($version =~ /1.1/)   { $d_flag = 'OpenAFS 1.1'; }
elsif ($version =~ /1.2/)   { $d_flag = 'OpenAFS 1.2'; }
elsif ($version =~ /1.4/)   { $d_flag = 'OpenAFS 1.4'; }
elsif ($version =~ /devel/) { $d_flag = 'OpenAFS devel'; }

if ($version =~ /openafs/)  { $a_flag = '-DOpenAFS'; }

$version =~ s/(<|>)//g;
if(version("openafs 1.2.8", $version) > 0) {
  $a_flag .= " -DUSE_GETCELLNAME";
}
if(version("openafs 1.2.5", $version) > 0) {
  $a_flag .= " -DGETREALCELLBYINDEX";
}
if(version("openafs 1.0.3", $version) > 0) {
  $a_flag .= " -DUSE_VOTEXDEBUG";
}
if($version =~ /devel/) {
  $a_flag .= " -DNOAFS_XSTATSCOLL_CBSTATS";
}
if($version =~ /openafs 1.4.0/) {
  $a_flag .= " -DNOAFS_XSTATSCOLL_CBSTATS";
}
if ($version =~ /openafs 1.4.1-rc/) {
  $a_flag .= " -DNOAFS_XSTATSCOLL_CBSTATS";
}
if ($version =~ /openafs 1.4.2/) {
  $a_flag .= " -DEXT2=extern";
}
if ($version !~ /1.4./) {
  $a_flag .= " -DNOAFS_XSTATSCOLL_CBSTATS";
}
$version = $d_flag;
$d_flag =~ tr/\. /__/;
$d_flag = '-D' . $d_flag;
$d_flag .= ' -DRXDEBUG';

# determine the alpha_sys value
my $alpha_sys = `$AFSPath/bin/fs sysname 2>&1` || 'unknown';
if ($alpha_sys =~ s/Current sysname (list|) is? //) {
  $alpha_sys =~ /(\w+)/;
  $alpha_sys = $1;
}

# print out a summary of determined data
print "Your AFS system library is located at:  $AFSPath \n";
print "              and it is major version:  $version \n";
print "Your AFS system type seems to be:       $alpha_sys \n\n";

# set the Makefile values
my %MakefileArgs = (
    'NAME'         => 'AFS::Monitor',
    'VERSION'      => "$VERSION",
    'DEFINE'	   => "$d_flag $a_flag",
    'INC'          => "-I$AFSPath/include",
    'LIBS'         => [
                       "-L$AFSPath/lib -L$AFSPath/lib/afs "
                       . join (
                                   " ", qw(
                                           -lfsprobe
                                           -lvolser
                                           -lvldb

                                           -lkauth
                                           -lprot
                                           -lrx

                                           -lcmd
                                           -lubik
                                           -lauth

                                           -lrxkad
                                           -lrxstat
                                           -lxstat_fs
                                           -lxstat_cm
                                           -lafsint
                                           -lrx

                                           -lsys
                                           -ldes
                                           -llwp
                                           -lcom_err
                                           -lutil
                                           -lusd
                                           -laudit
                                          )
                              )
                      ],
    'realclean'    => {FILES => 'Makefile.bak lib'},
                   );

if ($Config{osname} =~ /aix/) {
  $MakefileArgs{LIBS}->[0] .= ' -ldl';
} elsif ($Config{osname} =~ /irix/) {
  # just the default LIBS
} elsif ($Config{osname} =~ /solaris/) {
  $MakefileArgs{DEFINE} .= ' -Dint32=afs_int32 -Duint32=afs_uint32' if $alpha_sys eq 'sun4x_56'; # From Peter@PSDT.com
  $MakefileArgs{LIBS}->[0] .= ' -lresolv -lsocket -lnsl -lintl -ldl';
  $MakefileArgs{CC} = 'gcc';
  #$MakefileArgs{LD} = 'gcc';
  $MakefileArgs{CCCDLFLAGS} = '-fPIC';
  $MakefileArgs{LIBS}->[0] .= " -R$AFSPath/lib";
} elsif ($Config{osname} =~ /linux/) {
  $MakefileArgs{LIBS}->[0] .= ' -lresolv';
###  $MakefileArgs{LDFLAGS} = "-Wl,-rpath -Wl,$AFSPath/lib";
} elsif ($Config{osname} =~ /darwin/) {
  $MakefileArgs{LDDLFLAGS} = $Config{lddlflags} . ' -lresolv -multiply_defined suppress -read_only_relocs suppress';
}
# elsif ($Config{osname} =~ /dec_osf/) {
# # hier fehlt noch was !!!!!
# }
else {
  warn("System type '$Config{osname}' not yet tested with this Makefile.PL...\n\n"
       . "Using the default values, which may or may not work\n"
       . "If it is working, please inform the maintainer of this package.\n"
       . "Thank you.\n\n");
}

WriteMakefile(%MakefileArgs);

# change the library name of the AFS system library "util.a"
my $command = "\'s#-lutil#$AFSPath/lib/afs/util.a#\'";
system("perl -p -i.bak -e $command Makefile") unless -f "$AFSPath/lib/afs/libutil.a";

# change the library name of the AFS system library "vlib.a"
$command = "\'s#-lvlib#$AFSPath/lib/afs/vlib.a#\'";
system("perl -p -i.bak -e $command Makefile") unless -f "$AFSPath/lib/afs/libvlib.a";

# change the library name of the AFS system library "libcom_err"
$command = "\'s#-lcom_err#$AFSPath/lib/afs/libcom_err.a#\'";
system("perl -p -i.bak -e $command Makefile");

# change the library name of the AFS system library "libsys"
$command = "\'s#-lsys#$AFSPath/lib/afs/libsys.a#\'";
system("perl -p -i.bak -e $command Makefile");

# change the library name of the AFS system library "libcmd"
$command = "\'s#-lcmd#$AFSPath/lib/afs/libcmd.a#\'";
system("perl -p -i.bak -e $command Makefile");

# make changes to the typemap file if Perl < 5.6.0
$command = "\'s#T_UV#T_IV#\'";
system("perl -p -i.bak -e $command typemap") unless $] >= 5.006;



sub version {
  my ($testver, $compver) = @_;

  $compver = $ENV{VERSION} unless defined $compver;

  # Remove possible package name from both strings.
  $testver =~ s/^([a-zA-Z][^-]*-)*//;
  $compver =~ s/^([a-zA-Z][^-]*-)*//;

  for my $char ('-', '\.') {
    if ("$testver$compver" =~ /$char/) {
      my @testlist = split(/$char/, $testver);
      my @complist = split(/$char/, $compver);

      my $result = 0;
      for my $comp (@complist) {
        my $test = shift(@testlist);

        return $result unless defined $test;

        $result = version($test, $comp);
        return $result unless $result == 0;
      }
      return $result;
    }
  }

   if ("$testver$compver" =~ /^\d+$/) { return $compver <=> $testver }
   else                               { return $compver cmp $testver }
}

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 1.805 second using v1.00-cache-2.02-grep-82fe00e-cpan-f5108d614456 )