AFS-Monitor

 view release on metacpan or  search on metacpan

LICENSES/IBM-LICENSE  view on Meta::CPAN

       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

LICENSES/IBM-LICENSE  view on Meta::CPAN

   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

README  view on Meta::CPAN

    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

examples/Meltdown.pl  view on Meta::CPAN

$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)) {

examples/Meltdown.pl  view on Meta::CPAN

$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;

#

examples/rxdebug  view on Meta::CPAN

        }
        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";

examples/rxdebug  view on Meta::CPAN

      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},

examples/udebug  view on Meta::CPAN

                $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});

examples/xstat_cm_test  view on Meta::CPAN

  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};

examples/xstat_cm_test  view on Meta::CPAN

  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};

examples/xstat_cm_test  view on Meta::CPAN

  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};

examples/xstat_cm_test  view on Meta::CPAN

  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};

examples/xstat_cm_test  view on Meta::CPAN

  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};
  }

pod/afsmonitor.pod  view on Meta::CPAN

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.

pod/afsmonitor.pod  view on Meta::CPAN

=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

pod/afsmonitor.pod  view on Meta::CPAN


=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

pod/afsmonitor.pod  view on Meta::CPAN


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

pod/cmdebug.pod  view on Meta::CPAN


=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

pod/rxdebug.pod  view on Meta::CPAN


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>

pod/rxdebug.pod  view on Meta::CPAN

=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

pod/scout.pod  view on Meta::CPAN


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.

pod/udebug.pod  view on Meta::CPAN

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>

pod/xstat_cm_test.pod  view on Meta::CPAN


=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

pod/xstat_fs_test.pod  view on Meta::CPAN

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

src/Makefile.PL  view on Meta::CPAN

  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'; }

src/Makefile.PL  view on Meta::CPAN

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

src/Monitor.xs  view on Meta::CPAN

 * source distribution, which comes with this message:
 *
 *    Copyright (C) 1989-1994 Transarc Corporation - All rights reserved
 *    P_R_P_Q_# (C) COPYRIGHT IBM CORPORATION 1987, 1988, 1989
 *
 ***********************************************************************/

#include "EXTERN.h"

#ifdef __sgi    /* needed to get a clean compile */
#include <setjmp.h>
#endif

#include <stdarg.h>

#include "perl.h"
#include "XSUB.h"
#include "ppport.h"

#include <afs/afsint.h>

src/Monitor.xs  view on Meta::CPAN

#endif

const char *const xs_version = "Monitor.xs (Major Version 0.2 $Rev: 609 $)";

extern char *error_message();
extern struct hostent *hostutil_GetHostByName();
extern char *hostutil_GetNameByINet();

/* error handling macros */

#define SETCODE(code) set_code(code)
#define FSSETCODE(code) {if (code == -1) set_code(errno); else set_code(code);}
#define BSETCODE(code, msg) bv_set_code(code, msg)
#define VSETCODE(code, msg) bv_set_code(code, msg)

static int32 raise_exception = 0;


static void
bv_set_code(code, msg)
   int32 code;
   const char *msg;
{
   SV *sv = perl_get_sv("AFS::CODE", TRUE);
   sv_setiv(sv, (IV) code);
   if (code == 0) {
      sv_setpv(sv, "");
   }
   else {
      if (raise_exception) {
         char buffer[1024];
         sprintf(buffer, "AFS exception: %s (%d)", msg, code);
         croak(buffer);
      }
      sv_setpv(sv, (char *)msg);
   }
   SvIOK_on(sv);
}

static void
set_code(code)
   int32 code;
{
   SV *sv = perl_get_sv("AFS::CODE", TRUE);
   sv_setiv(sv, (IV) code);
   if (code == 0) {
      sv_setpv(sv, "");
   }
   else {
      if (raise_exception) {
         char buffer[1024];
         sprintf(buffer, "AFS exception: %s (%d)", error_message(code), code);
         croak(buffer);
      }
      sv_setpv(sv, (char *)error_message(code));
   }
   SvIOK_on(sv);
}

/* end of error handling macros */


/* start of rxdebug helper functions */


src/Monitor.xs  view on Meta::CPAN

                    a_varName, tmp_host->hostName);
            return (-1);
         }
         tmp_host = tmp_host->next;
      }
      (*global_TC)--;
      return (0);
   }

   /* it is not a global threshold, insert it in the thresh list of this
    * host only. We overwrite the global threshold if it was already set */

   if (*hostname == '\0') {
      sprintf(buffer, "Programming error 3");
      return (-1);
   }

   /* get the hostEntry that this threshold belongs to */
   tmp_host = Header;
   found = 0;
   for (i = 0; i < srvCount; i++) {

src/Monitor.xs  view on Meta::CPAN

         return (-1);
      }
      if (curr_host->numThresh) {
         numBytes = curr_host->numThresh * sizeof(struct Threshold);
         curr_host->thresh = (struct Threshold *)malloc(numBytes);
         if (curr_host->thresh == (struct Threshold *) NULL) {
            sprintf(buff1, "Memory Allocation error 1");
            BSETCODE(25, buff1);
            return (-1);
         }
         memset(curr_host->thresh, 0, numBytes);
      }
      curr_host = curr_host->next;
   }

   curr_host = *CMnameList;
   for (i = 0; i < *numCM; i++) {
      if (curr_host->hostName[0] == '\0') {
         sprintf(buff1, "Programming error 5");
         BSETCODE(30, buff1);
         return (-1);
      }
      if (curr_host->numThresh) {
         numBytes = curr_host->numThresh * sizeof(struct Threshold);
         curr_host->thresh = (struct Threshold *)malloc(numBytes);
         if (curr_host->thresh == (struct Threshold *) NULL) {
            sprintf(buff1, "Memory Allocation error 2");
            BSETCODE(35, buff1);
            return (-1);
         }
         memset(curr_host->thresh, 0, numBytes);
      }
      curr_host = curr_host->next;
   }

   opcode[0] = 0;
   arg1[0] = 0;
   arg2[0] = 0;
   arg3[0] = 0;
   arg4[0] = 0;
   last_fsHost[0] = '\0';

src/Monitor.xs  view on Meta::CPAN

   int code = 0;
   int done = 0;
   char buff2[256] = "";

   curr_fsDataP =
      (struct fs_Display_Data *)malloc(sizeof(struct fs_Display_Data));
   if (curr_fsDataP == (struct fs_Display_Data *) NULL) {
      sprintf(buffer, "Memory allocation failure");
      return (-1);
   }
   memset(curr_fsDataP, 0, sizeof(struct fs_Display_Data));

   hv_store(HOSTINFO, "hostName", 8, newSVpv(a_fsResults->connP->hostName, 0),
            0);

   /*  Check the status of the probe. If it succeeded, we store its
    * results in the display data structure. If it failed we only mark
    * the failed status in the display data structure. */

   if (a_fsResults->probeOK) {  /* 1 => notOK the xstat results */
      hv_store(HOSTINFO, "probeOK", 7, newSViv(0), 0);
   }
   else {   /* probe succeeded, update display data structures */
      hv_store(HOSTINFO, "probeOK", 7, newSViv(1), 0);

      my_fs_Results_ltoa(curr_fsDataP, a_fsResults);

      fs_Results_to_Hash(curr_fsDataP, HOSTINFO, fs_showFlags,
                         fs_showDefault);

      /* compare with thresholds and set the overflow flags.
       * note that the threshold information is in the hostEntry structure and
       * each threshold item has a positional index associated with it */

      /* locate the hostEntry for this host */
      done = 0;
      curr_host = FSnameList;
      for (i = 0; i < numFS; i++) {
         if (strcasecmp(curr_host->hostName, a_fsResults->connP->hostName)
             == 0) {
            done = 1;

src/Monitor.xs  view on Meta::CPAN

      if (curr_conn->rxconn != (struct rx_connection *) NULL) {

         currCollIDP = xstat_fs_collIDP;
         for (numColls = 0;
              numColls < xstat_fs_numCollections; numColls++, currCollIDP++) {
            /*
             * Initialize the per-probe values.
             */
            xstat_fs_Results.collectionNumber = *currCollIDP;
            xstat_fs_Results.data.AFS_CollData_len = AFS_MAX_XSTAT_LONGS;
            memset(xstat_fs_Results.data.AFS_CollData_val, 0,
                   AFS_MAX_XSTAT_LONGS * 4);

            xstat_fs_Results.connP = curr_conn;

            xstat_fs_Results.probeOK =
               RXAFS_GetXStats(curr_conn->rxconn,
                               clientVersionNumber,
                               *currCollIDP,
                               &srvVersionNumber,
                               &(xstat_fs_Results.probeTime),

src/Monitor.xs  view on Meta::CPAN

                                           0);  /*# of above */
      if (curr_conn->rxconn == (struct rx_connection *) NULL) {
         sprintf(buffer,
                 "Can't create Rx connection to server '%s' (%lu)",
                 curr_conn->hostName, curr_conn->skt.sin_addr.s_addr);
         my_xstat_fs_Cleanup(1, xstat_fs_numServers, xstat_fs_ConnInfo,
                             buff2);
         return (-2);
      }
      /*
       * Bump the current xstat_fs connection to set up.
       */
      curr_conn++;

   }    /*for curr_srv */


   va_start(argp, buffer);
   code =
      my_xstat_fs_LWP(ProbeHandler, xstat_fs_ConnInfo, xstat_fs_numServers,
                      xstat_fs_collIDP, xstat_fs_numCollections, buffer,

src/Monitor.xs  view on Meta::CPAN

   int code = 0;
   int done = 0;
   char buff2[256] = "";

   curr_cmDataP =
      (struct cm_Display_Data *)malloc(sizeof(struct cm_Display_Data));
   if (curr_cmDataP == (struct cm_Display_Data *) NULL) {
      sprintf(buffer, "Memory allocation failure");
      return (-10);
   }
   memset(curr_cmDataP, 0, sizeof(struct cm_Display_Data));

   hv_store(HOSTINFO, "hostName", 8, newSVpv(a_cmResults->connP->hostName, 0),
            0);

   /*  Check the status of the probe. If it succeeded, we store its
    * results in the display data structure. If it failed we only mark
    * the failed status in the display data structure. */

   if (a_cmResults->probeOK) {  /* 1 => notOK the xstat results */
      hv_store(HOSTINFO, "probeOK", 7, newSViv(0), 0);

src/Monitor.xs  view on Meta::CPAN

      if (curr_conn->rxconn != (struct rx_connection *) NULL) {

         currCollIDP = xstat_cm_collIDP;
         for (numColls = 0;
              numColls < xstat_cm_numCollections; numColls++, currCollIDP++) {
            /*
             * Initialize the per-probe values.
             */
            xstat_cm_Results.collectionNumber = *currCollIDP;
            xstat_cm_Results.data.AFSCB_CollData_len = AFSCB_MAX_XSTAT_LONGS;
            memset(xstat_cm_Results.data.AFSCB_CollData_val, 0,
                   AFSCB_MAX_XSTAT_LONGS * 4);

            xstat_cm_Results.connP = curr_conn;

            xstat_cm_Results.probeOK =
               RXAFSCB_GetXStats(curr_conn->rxconn,
                                 clientVersionNumber, *currCollIDP,
                                 &srvVersionNumber,
                                 &(xstat_cm_Results.probeTime),
                                 &(xstat_cm_Results.data));

src/Monitor.xs  view on Meta::CPAN

                                           0);  /*# of above */
      if (curr_conn->rxconn == (struct rx_connection *) NULL) {
         sprintf(buffer,
                 "Can't create Rx connection to server '%s' (%lu)",
                 curr_conn->hostName, curr_conn->skt.sin_addr.s_addr);
         my_xstat_cm_Cleanup(1, xstat_cm_numServers, xstat_cm_ConnInfo,
                             buff2);
         return (-2);
      }
      /*
       * Bump the current xstat_fs connection to set up.
       */
      curr_conn++;

   }    /*for curr_srv */


   va_start(argp, buffer);
   code =
      my_xstat_cm_LWP(ProbeHandler, xstat_cm_ConnInfo, xstat_cm_numServers,
                      xstat_cm_collIDP, xstat_cm_numCollections, buffer,

src/Monitor.xs  view on Meta::CPAN

      fprintf(scout_debugfd, "[%s] Called\n", rn);
      fprintf(scout_debugfd,
              "[%s] Collecting data from %d connected servers\n", rn,
              fsprobe_numServers);
      fflush(scout_debugfd);
   }
   curr_conn = fsprobe_ConnInfo;
   curr_stats = fsprobe_Results->stats;
   curr_probeOK = fsprobe_Results->probeOK;
   fsprobe_Results->probeNum++;
   memset(fsprobe_Results->stats, 0, fsprobe_statsBytes);
   memset(fsprobe_Results->probeOK, 0, fsprobe_probeOKBytes);

   for (conn_idx = 0; conn_idx < fsprobe_numServers; conn_idx++) {
      /*
       * Grab the statistics for the current FileServer, if the
       * connection is valid.
       */
      if (scout_debugfd) {
         fprintf(scout_debugfd, "[%s] Contacting server %s\n", rn,
                 curr_conn->hostName);
         fflush(scout_debugfd);

src/Monitor.xs  view on Meta::CPAN

   }
   if (a_numServers <= 0) {
      sprintf(buffer, "[%s] Illegal number of servers: %d", rn, a_numServers);
      return (-1);
   }
   if (a_socketArray == (struct sockaddr_in *) NULL) {
      sprintf(buffer, "[%s] Null server socket array argument", rn);
      return (-1);
   }

   memset(fsprobe_Results, 0, sizeof(struct fsprobe_ProbeResults));


   rxcall = (struct rx_call *) NULL;
   Fids_Array = (AFSCBFids *) NULL;
   CallBack_Array = (AFSCBs *) NULL;
   interfaceAddr = (struct interfaceAddr *) NULL;

   SRXAFSCB_CallBack(rxcall, Fids_Array, CallBack_Array);
   SRXAFSCB_InitCallBackState2(rxcall, interfaceAddr);
   SRXAFSCB_Probe(rxcall);

src/Monitor.xs  view on Meta::CPAN

      return (-1);
   }
   else if (scout_debugfd) {
      fprintf(scout_debugfd,
              "[%s] fsprobe_Results->probeOK allocated (%d bytes)\n",
              rn, fsprobe_probeOKBytes);
      fflush(scout_debugfd);
   }
   fsprobe_Results->probeNum = 0;
   fsprobe_Results->probeTime = 0;
   memset(fsprobe_Results->stats, 0,
          (a_numServers * sizeof(struct ProbeViceStatistics)));

   if (scout_debugfd) {
      fprintf(scout_debugfd, "[%s] Initializing Rx\n", rn);
      fflush(scout_debugfd);
   }
   PortToUse = FSPROBE_CBPORT;
   do {
      code = rx_Init(htons(PortToUse));
      if (code) {

src/Monitor.xs  view on Meta::CPAN

                                              0);   /*Number of above */
      if (curr_conn->rxVolconn == (struct rx_connection *) NULL) {
         sprintf(buffer,
                 "[%s] Can't create Rx connection to volume server %s (%lu)\n",
                 rn, curr_conn->hostName, curr_conn->skt.sin_addr.s_addr);
         conn_err = 1;
      }
      else {
         int i, cnt;

         memset(&curr_conn->partList, 0, sizeof(struct partList));
         curr_conn->partCnt = 0;
         i = my_XListPartitions(curr_conn->rxVolconn, &curr_conn->partList,
                                &cnt, scout_debugfd);
         if (!i) {
            curr_conn->partCnt = cnt;
         }
      }
      if (scout_debugfd) {
         fprintf(scout_debugfd, "[%s] New connection at 0x%lx\n",
                 rn, curr_conn->rxVolconn);
         fflush(scout_debugfd);
      }


      /*
       * Bump the current fsprobe connection to set up.
       */
      curr_conn++;
   }    /*for curr_srv */

   /*
    * Create the AFS callback service (listener).
    */
   if (scout_debugfd)
      fprintf(scout_debugfd, "[%s] Creating AFS callback listener\n", rn);
   rxsrv_afsserver = rx_NewService(0,   /*Use default port */

src/Monitor.xs  view on Meta::CPAN

            newSViv(cmp->callInfo.C_afs_gn_rele), 0);
   data_name = "afs_gn_unmap";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_gn_unmap), 0);
   data_name = "afs_gn_access";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_gn_access), 0);
   data_name = "afs_gn_getattr";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_gn_getattr), 0);
   data_name = "afs_gn_setattr";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_gn_setattr), 0);
   data_name = "afs_gn_fclear";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_gn_fclear), 0);
   data_name = "afs_gn_fsync";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_gn_fsync), 0);
   data_name = "phash";
   hv_store(DATA, "pHash", strlen("pHash"), newSViv(cmp->callInfo.C_pHash),
            0);
   data_name = "DInit";

src/Monitor.xs  view on Meta::CPAN

            newSViv(cmp->callInfo.C_afs_newslot), 0);
   data_name = "DRelease";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_DRelease), 0);
   data_name = "DFlush";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_DFlush), 0);
   data_name = "DFlushEntry";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_DFlushEntry), 0);
   data_name = "DVOffset";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_DVOffset), 0);
   data_name = "DZap";
   hv_store(DATA, data_name, strlen(data_name), newSViv(cmp->callInfo.C_DZap),
            0);
   data_name = "DNew";
   hv_store(DATA, data_name, strlen(data_name), newSViv(cmp->callInfo.C_DNew),
            0);
   data_name = "afs_RemoveVCB";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_RemoveVCB), 0);
   data_name = "afs_NewVCache";

src/Monitor.xs  view on Meta::CPAN

            newSViv(cmp->callInfo.C_afs_syscall_iincdec), 0);
   data_name = "afs_syscall_ireadwrite";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_syscall_ireadwrite), 0);
   data_name = "afs_syscall";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_syscall), 0);
   data_name = "lpioctl";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_lpioctl), 0);
   data_name = "lsetpag";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_lsetpag), 0);
   data_name = "afs_CheckInit";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_CheckInit), 0);
   data_name = "ClearCallback";
   hv_store(DATA, "ClearCallBack", strlen("ClearCallBack"),
            newSViv(cmp->callInfo.C_ClearCallBack), 0);
   data_name = "SRXAFSCB_GetCE";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_SRXAFSCB_GetCE), 0);
   data_name = "SRXAFSCB_GetLock";

src/Monitor.xs  view on Meta::CPAN

            newSViv(cmp->callInfo.C_SRXAFSCB_InitCallBackState), 0);
   data_name = "SRXAFSCB_Probe";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_SRXAFSCB_Probe), 0);
   data_name = "afs_Chunk";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_Chunk), 0);
   data_name = "afs_ChunkBase";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_ChunkBase), 0);
   data_name = "afs_ChunkOffset";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_ChunkOffset), 0);
   data_name = "afs_ChunkSize";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_ChunkSize), 0);
   data_name = "afs_ChunkToBase";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_ChunkToBase), 0);
   data_name = "afs_ChunkToSize";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_ChunkToSize), 0);
   data_name = "afs_SetChunkSize";

src/Monitor.xs  view on Meta::CPAN

            newSViv(cmp->callInfo.C_PGetFileCell), 0);
   data_name = "PGetWSCell";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_PGetWSCell), 0);
   data_name = "PGetSPrefs";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_PGetSPrefs), 0);
   data_name = "PSetSPrefs";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_PSetSPrefs), 0);
   data_name = "afs_ResetAccessCache";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_ResetAccessCache), 0);
   data_name = "afs_FindUser";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_FindUser), 0);
   data_name = "afs_GetUser";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_GetUser), 0);
   data_name = "afs_GCUserData";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_GCUserData), 0);
   data_name = "afs_PutUser";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_PutUser), 0);
   data_name = "afs_SetPrimary";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_SetPrimary), 0);
   data_name = "afs_ResetUserConns";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_ResetUserConns), 0);
   data_name = "afs_RemoveUserConns";
   hv_store(DATA, "RemoveUserConns", strlen("RemoveUserConns"),
            newSViv(cmp->callInfo.C_RemoveUserConns), 0);
   data_name = "afs_ResourceInit";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_ResourceInit), 0);
   data_name = "afs_GetCell";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_GetCell), 0);
   data_name = "afs_GetCellByIndex";

src/Monitor.xs  view on Meta::CPAN

            newSViv(cmp->callInfo.C_afs_GetVolumeByName), 0);
   data_name = "afs_random";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_random), 0);
   data_name = "InstallVolumeEntry";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_InstallVolumeEntry), 0);
   data_name = "InstallVolumeInfo";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_InstallVolumeInfo), 0);
   data_name = "afs_ResetVolumeInfo";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_ResetVolumeInfo), 0);
   data_name = "afs_FindServer";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_FindServer), 0);
   data_name = "afs_GetServer";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_GetServer), 0);
   data_name = "afs_SortServers";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_SortServers), 0);
   data_name = "afs_CheckServers";

src/Monitor.xs  view on Meta::CPAN

            newSViv(cmp->callInfo.C_afs_ConnByMHosts), 0);
   data_name = "afs_Analyze";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_Analyze), 0);
   data_name = "afs_CheckLocks";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_CheckLocks), 0);
   data_name = "CheckVLServer";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_CheckVLServer), 0);
   data_name = "afs_CheckCacheResets";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_CheckCacheResets), 0);
   data_name = "afs_CheckVolumeNames";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_CheckVolumeNames), 0);
   data_name = "afs_CheckCode";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_CheckCode), 0);
   data_name = "afs_CopyError";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_CopyError), 0);
   data_name = "afs_FinalizeReq";

src/Monitor.xs  view on Meta::CPAN

            newSViv(cmp->callInfo.C_afs_statfs), 0);
   data_name = "afs_sync";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_sync), 0);
   data_name = "afs_vget";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_vget), 0);
   data_name = "afs_index";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_index), 0);
   data_name = "afs_setpag";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_setpag), 0);
   data_name = "genpag";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_genpag), 0);
   data_name = "getpag";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_getpag), 0);
   data_name = "genpag";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_genpag), 0);
   data_name = "afs_GetMariner";

src/Monitor.xs  view on Meta::CPAN

            newSViv(cmp->callInfo.C_afs_MemRead), 0);
   data_name = "afs_CopyOutAttrs";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_CopyOutAttrs), 0);
   data_name = "afs_access";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_access), 0);
   data_name = "afs_getattr";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_getattr), 0);
   data_name = "afs_setattr";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_setattr), 0);
   data_name = "afs_VAttrToAS";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_VAttrToAS), 0);
   data_name = "EvalMountPoint";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_EvalMountPoint), 0);
   data_name = "afs_lookup";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_lookup), 0);
   data_name = "afs_create";

src/Monitor.xs  view on Meta::CPAN

            newSViv(cmp->callInfo.C_afs_page_in), 0);
   data_name = "afs_page_out";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_page_out), 0);
   data_name = "afs_AdvanceFD";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_AdvanceFD), 0);
   data_name = "afs_lockf";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_lockf), 0);
   data_name = "afs_xsetgroups";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_xsetgroups), 0);
   data_name = "afs_nlinks";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_nlinks), 0);
   data_name = "afs_lockctl";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_lockctl), 0);
   data_name = "afs_xflock";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_xflock), 0);
   data_name = "PGetCPrefs";

src/Monitor.xs  view on Meta::CPAN


    sktbytes = numFSs * sizeof(struct sockaddr_in);
    FSSktArray = (struct sockaddr_in *) malloc(sktbytes);
    if (FSSktArray == (struct sockaddr_in *) NULL) {
      sprintf(buffer,
              "Can't malloc() %d sockaddrs (%d bytes) for the given file servers",
              numFSs, sktbytes);
      BSETCODE(-1, buffer);
      XSRETURN_UNDEF;
    }
    memset(FSSktArray, 0, sktbytes);

     /*
     * Fill in the socket array for each of the File Servers listed.
     */
    for (currFS = 0; currFS < numFSs; currFS++) {
#if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
        FSSktArray[currFS].sin_family = AF_INET;        /*Internet family */
#else
        FSSktArray[currFS].sin_family = htons(AF_INET); /*Internet family */
#endif

src/Monitor.xs  view on Meta::CPAN

      sprintf(buffer,
              "Can't malloc() %d sockaddrs (%d bytes) for the given servers",
              numservers, sktbytes);
      BSETCODE(-1, buffer);
      if (scout_debugfd != (FILE *) NULL) {
        fprintf(scout_debugfd, "[%s] Closing debugging file\n", rn);
        fclose(scout_debugfd);
      }
      XSRETURN_UNDEF;
    }
    memset(FSSktArray, 0, sktbytes);

    curr_skt = FSSktArray;
    for(i=0; i<numservers; i++) {
       if(*basename == '\0')
         sprintf(fullsrvname, "%s", (char *) SvPV(*av_fetch(host_array, i, 0), PL_na));
       else
         sprintf(fullsrvname, "%s.%s", (char *) SvPV(*av_fetch(host_array, i, 0), PL_na), basename);
       he = hostutil_GetHostByName(fullsrvname);
       if(he == (struct hostent *) NULL) {
         sprintf(buffer, "Can't get host info for '%s'", fullsrvname);

src/Monitor.xs  view on Meta::CPAN

    /* now do the main call */
#ifdef USE_VOTEXDEBUG
    code = VOTE_XDebug(tconn, &udebug, &isClone);
    if (code) code = VOTE_Debug(tconn, &udebug);
#else
    code = VOTE_Debug(tconn, &udebug);
#endif
    if (code == RXGEN_OPCODE)
    {  ubik_debug * ptr = &udebug;
       oldServer = 1;             /* talking to a pre 3.5 server */
       memset(&udebug, 0, sizeof(udebug));
       code = VOTE_DebugOld(tconn, (struct ubik_debug_old *) ptr);
    }

    if (code) {
       sprintf(buffer, "return code %d from VOTE_Debug", code);
       BSETCODE(code, buffer);
       XSRETURN_UNDEF;
    }

    /* now print the main info */

src/Monitor.xs  view on Meta::CPAN

       /* now do the subcalls */
       SERVERS = newAV();

       for ( i=0; ; i++ ) {
#ifdef USE_VOTEXDEBUG
          isClone = 0;
          code = VOTE_XSDebug(tconn, i, &usdebug, &isClone);
          if (code < 0) {
             if ( oldServer ) {                      /* pre 3.5 server */
                ubik_sdebug * ptr = &usdebug;
                memset(&usdebug, 0, sizeof(usdebug));
                code = VOTE_SDebugOld(tconn, i, (struct ubik_sdebug_old *) ptr);
             }
             else
                code = VOTE_SDebug(tconn, i, &usdebug);
          }
#else
          if ( oldServer ) {                      /* pre 3.5 server */
             ubik_sdebug * ptr = &usdebug;
             memset(&usdebug, 0, sizeof(usdebug));
             code = VOTE_SDebugOld(tconn, i, (struct ubik_sdebug_old *) ptr);
          }
          else
             code = VOTE_SDebug(tconn, i, &usdebug);
#endif

          if (code > 0)
                break;          /* done */
          if (code < 0) {
             warn("error code %d from VOTE_SDebug\n", code);

src/Monitor.xs  view on Meta::CPAN

      temp_host = FSnameList;
      for (i = 0; i < numFS; i++) {
        if (temp_host->numThresh) {
          numBytes = temp_host->numThresh * sizeof(struct Threshold);
          temp_host->thresh = (struct Threshold *)malloc(numBytes);
          if (temp_host->thresh == (struct Threshold *) NULL) {
            sprintf(buffer, "Memory Allocation error 1.5");
            BSETCODE(25, buffer);
            XSRETURN_UNDEF;
          }
          memset(temp_host->thresh, 0, numBytes);
        }
        temp_host = temp_host->next;
      }
      num = av_len(fsthresh_array);
      for (i=0; i<=num; i++) {
        thresh_host = 0;
        thresh_handler = "";
        thresh_entry = (HV*) SvRV(*av_fetch(fsthresh_array, i, 0));
        hv_iterinit(thresh_entry);
        while((value = hv_iternextsv(thresh_entry, &key, &keylen))) {

src/Monitor.xs  view on Meta::CPAN

      temp_host = CMnameList;
      for (i = 0; i < numCM; i++) {
        if (temp_host->numThresh) {
          numBytes = temp_host->numThresh * sizeof(struct Threshold);
          temp_host->thresh = (struct Threshold *)malloc(numBytes);
          if (temp_host->thresh == (struct Threshold *) NULL) {
            sprintf(buffer, "Memory Allocation error 2.5");
            BSETCODE(25, buffer);
            XSRETURN_UNDEF;
          }
          memset(temp_host->thresh, 0, numBytes);
        }
        temp_host = temp_host->next;
      }
      num = av_len(cmthresh_array);
      for (i=0; i<=num; i++) {
        thresh_host = 0;
        thresh_handler = "";
        thresh_entry = (HV*) SvRV(*av_fetch(cmthresh_array, i, 0));
        hv_iterinit(thresh_entry);
        while((value = hv_iternextsv(thresh_entry, &key, &keylen))) {

src/Monitor.xs  view on Meta::CPAN

    /* Allocate an array of sockets for each fileserver we monitor */

      FSsktbytes = numFS * sizeof(struct sockaddr_in);
      FSSktArray = (struct sockaddr_in *) malloc(FSsktbytes);
      if (FSSktArray == (struct sockaddr_in *) NULL) {
        sprintf(buffer,"cannot malloc %d sockaddr_ins for fileservers", numFS);
        BSETCODE(-1, buffer);
        XSRETURN_UNDEF;
      }

      memset(FSSktArray, 0, FSsktbytes);

      /* Fill in the socket information for each fileserve  */

      curr_skt = FSSktArray;
      curr_FS = FSnameList;  /* FS name list header */
      while (curr_FS) {
        strncpy(fullhostname,curr_FS->hostName,sizeof(fullhostname));
        he = GetHostByName(fullhostname);
        if (he == (struct hostent *) NULL) {
          sprintf(buffer,"Cannot get host info for %s", fullhostname);

src/Monitor.xs  view on Meta::CPAN

    /* Allocate an array of sockets for each fileserver we monitor */

      CMsktbytes = numCM * sizeof(struct sockaddr_in);
      CMSktArray = (struct sockaddr_in *) malloc(CMsktbytes);
      if (CMSktArray == (struct sockaddr_in *) NULL) {
        sprintf(buffer,"cannot malloc %d sockaddr_ins for CM entries", numCM);
        BSETCODE(-1, buffer);
        XSRETURN_UNDEF;
      }

      memset(CMSktArray, 0, CMsktbytes);

      /* Fill in the socket information for each CM  */

      curr_skt = CMSktArray;
      curr_CM = CMnameList;  /* CM name list header */
      while (curr_CM) {
        strncpy(fullhostname,curr_CM->hostName,sizeof(fullhostname));
        he = GetHostByName(fullhostname);
        if (he == (struct hostent *) NULL) {
          sprintf(buffer,"Cannot get host info for %s", fullhostname);

src/Monitor.xs  view on Meta::CPAN


        RXSTATS = newHV();

        myPrintTheseStats(RXSTATS, &rxstats);

        hv_store(RETVAL, "rxstats", 7, newRV_inc((SV*)(RXSTATS)), 0);

      }
    }

    /* get connections unless -noconns flag was set */
    /* array of connections added at key 'connections' in RETVAL hash */
    if (!noConns) {
      if (allconns) {
        if (!withAllConn) {
          warn("WARNING: Server doesn't support retrieval of all connections,\n");
          warn("         getting only interesting instead.\n");
          }
      }

      CONNECTIONS = newAV();

src/Monitor.xs  view on Meta::CPAN





void
afs_error_message(code)
        int32   code
    PPCODE:
    {
        ST(0) = sv_newmortal();
        sv_setpv(ST(0), (char *) error_message(code));
        XSRETURN(1);
    }



  /* this function is generated automatically by constant_gen */
  /* You didn't think I would type in this crap did you? */
  /* thats what perl is for :-) */

void

src/Monitor.xs  view on Meta::CPAN


  errno = EINVAL;

  switch (name[0]) {
  case 'A':
	switch (name[1]) {
	case 'F':
		switch (name[2]) {
		case 'S':
		if (strEQ(name,"AFSCB_MAX_XSTAT_LONGS"))
                    sv_setiv(ST(0),AFSCB_MAX_XSTAT_LONGS);
		else if (strEQ(name,"AFSCB_XSTATSCOLL_CALL_INFO"))
                    sv_setiv(ST(0),AFSCB_XSTATSCOLL_CALL_INFO);
		else if (strEQ(name,"AFSCB_XSTATSCOLL_FULL_PERF_INFO"))
                    sv_setiv(ST(0),AFSCB_XSTATSCOLL_FULL_PERF_INFO);
		else if (strEQ(name,"AFSCB_XSTATSCOLL_PERF_INFO"))
                    sv_setiv(ST(0),AFSCB_XSTATSCOLL_PERF_INFO);
		else if (strEQ(name,"AFSCB_XSTAT_VERSION"))
                    sv_setiv(ST(0),AFSCB_XSTAT_VERSION);
		else if (strEQ(name,"AFSCONF_VOLUMEPORT"))
                    sv_setiv(ST(0),AFSCONF_VOLUMEPORT);
		else if (strEQ(name,"AFS_MAX_XSTAT_LONGS"))
                    sv_setiv(ST(0),AFS_MAX_XSTAT_LONGS);
		else if (strEQ(name,"AFS_STATS_NUM_CM_RPC_OPS"))
                    sv_setiv(ST(0),AFS_STATS_NUM_CM_RPC_OPS);
		else if (strEQ(name,"AFS_STATS_NUM_FS_RPC_OPS"))
                    sv_setiv(ST(0),AFS_STATS_NUM_FS_RPC_OPS);
		else if (strEQ(name,"AFS_STATS_NUM_FS_XFER_OPS"))
                    sv_setiv(ST(0),AFS_STATS_NUM_FS_XFER_OPS);
		else if (strEQ(name,"AFS_XSTATSCOLL_CALL_INFO"))
                    sv_setiv(ST(0),AFS_XSTATSCOLL_CALL_INFO);
#ifndef NOAFS_XSTATSCOLL_CBSTATS
		else if (strEQ(name,"AFS_XSTATSCOLL_CBSTATS"))
                    sv_setiv(ST(0),AFS_XSTATSCOLL_CBSTATS);
#endif
		else if (strEQ(name,"AFS_XSTATSCOLL_FULL_PERF_INFO"))
                    sv_setiv(ST(0),AFS_XSTATSCOLL_FULL_PERF_INFO);
		else if (strEQ(name,"AFS_XSTATSCOLL_PERF_INFO"))
                    sv_setiv(ST(0),AFS_XSTATSCOLL_PERF_INFO);
		else if (strEQ(name,"AFS_XSTAT_VERSION"))
                    sv_setiv(ST(0),AFS_XSTAT_VERSION);
		else {
		     ST(0) = ST(1) = &PL_sv_undef;
		     return;
		}
		break;
		case '_':
		if (strEQ(name,"AF_INET")) sv_setiv(ST(0),AF_INET);
		else {
		     ST(0) = ST(1) = &PL_sv_undef;
		     return;
		}
		break;
  		default:
  			ST(0) = ST(1) = &PL_sv_undef;
			return;
  		}
  		break;

src/Monitor.xs  view on Meta::CPAN

  		ST(0) = ST(1) = &PL_sv_undef;
		return;
  	}
  	break;
  case 'C':
	switch (name[1]) {
	case 'F':
		switch (name[2]) {
		case 'G':
		if (strEQ(name,"CFG_STR_LEN"))
                    sv_setiv(ST(0),CFG_STR_LEN);
		else {
		     ST(0) = ST(1) = &PL_sv_undef;
		     return;
		}
		break;
  		default:
  			ST(0) = ST(1) = &PL_sv_undef;
			return;
  		}
  		break;
	case 'M':
		if (strEQ(name,"CM")) sv_setiv(ST(0),CM);
                else {
		switch (name[2]) {
		case '_':
		if (strEQ(name,"CM_NUM_DATA_CATEGORIES"))
                    sv_setiv(ST(0),CM_NUM_DATA_CATEGORIES);
		else if (strEQ(name,"CM_STAT_STRING_LEN"))
                    sv_setiv(ST(0),CM_STAT_STRING_LEN);
		else {
		     ST(0) = ST(1) = &PL_sv_undef;
		     return;
		}
		break;
  		default:
  			ST(0) = ST(1) = &PL_sv_undef;
			return;
  		}
                }
  		break;
  	default:
  		ST(0) = ST(1) = &PL_sv_undef;
		return;
  	}
  	break;
  case 'F':
	switch (name[1]) {
	case 'S':
		if (strEQ(name,"FS")) sv_setiv(ST(0),FS);
                else {
		switch (name[2]) {
		case 'P':
		if (strEQ(name,"FSPROBE_CBPORT"))
                    sv_setiv(ST(0),FSPROBE_CBPORT);
		else {
		     ST(0) = ST(1) = &PL_sv_undef;
		     return;
		}
		break;
		case '_':
		if (strEQ(name,"FS_NUM_DATA_CATEGORIES"))
                    sv_setiv(ST(0),FS_NUM_DATA_CATEGORIES);
		else if (strEQ(name,"FS_STATS_NUM_RPC_OPS"))
                    sv_setiv(ST(0),FS_STATS_NUM_RPC_OPS);
		else if (strEQ(name,"FS_STATS_NUM_XFER_OPS"))
                    sv_setiv(ST(0),FS_STATS_NUM_XFER_OPS);
		else if (strEQ(name,"FS_STAT_STRING_LEN"))
                    sv_setiv(ST(0),FS_STAT_STRING_LEN);
		else {
		     ST(0) = ST(1) = &PL_sv_undef;
		     return;
		}
		break;
  		default:
  			ST(0) = ST(1) = &PL_sv_undef;
			return;
  		}
                }

src/Monitor.xs  view on Meta::CPAN

  		ST(0) = ST(1) = &PL_sv_undef;
		return;
  	}
  	break;
  case 'H':
	switch (name[1]) {
	case 'O':
		switch (name[2]) {
		case 'S':
		if (strEQ(name,"HOST_NAME_LEN"))
                    sv_setiv(ST(0),HOST_NAME_LEN);
		else {
		     ST(0) = ST(1) = &PL_sv_undef;
		     return;
		}
		break;
  		default:
  			ST(0) = ST(1) = &PL_sv_undef;
			return;
  		}
  		break;

src/Monitor.xs  view on Meta::CPAN

  		ST(0) = ST(1) = &PL_sv_undef;
		return;
  	}
  	break;
  case 'M':
	switch (name[1]) {
	case 'A':
		switch (name[2]) {
		case 'X':
		if (strEQ(name,"MAXSKEW"))
                    sv_setiv(ST(0),MAXSKEW);
		else {
		     ST(0) = ST(1) = &PL_sv_undef;
		     return;
		}
		break;
  		default:
  			ST(0) = ST(1) = &PL_sv_undef;
			return;
  		}
  		break;

src/Monitor.xs  view on Meta::CPAN

  		ST(0) = ST(1) = &PL_sv_undef;
		return;
  	}
  	break;
  case 'N':
	switch (name[1]) {
	case 'U':
		switch (name[2]) {
		case 'M':
		if (strEQ(name,"NUM_AFS_STATS_CMPERF_LONGS"))
                    sv_setiv(ST(0),NUM_AFS_STATS_CMPERF_LONGS);
		else if (strEQ(name,"NUM_CM_STAT_ENTRIES"))
                    sv_setiv(ST(0),NUM_CM_STAT_ENTRIES);
		else if (strEQ(name,"NUM_FS_STAT_ENTRIES"))
                    sv_setiv(ST(0),NUM_FS_STAT_ENTRIES);
		else if (strEQ(name,"NUM_XSTAT_FS_AFS_PERFSTATS_LONGS"))
                    sv_setiv(ST(0),NUM_XSTAT_FS_AFS_PERFSTATS_LONGS);
		else {
		     ST(0) = ST(1) = &PL_sv_undef;
		     return;
		}
		break;
  		default:
  			ST(0) = ST(1) = &PL_sv_undef;
			return;
  		}
  		break;

src/Monitor.xs  view on Meta::CPAN

  		ST(0) = ST(1) = &PL_sv_undef;
		return;
  	}
  	break;
  case 'P':
	switch (name[1]) {
	case 'A':
		switch (name[2]) {
		case 'R':
		if (strEQ(name,"PARTVALID"))
                    sv_setiv(ST(0),PARTVALID);
		else {
		     ST(0) = ST(1) = &PL_sv_undef;
		     return;
		}
		break;
  		default:
  			ST(0) = ST(1) = &PL_sv_undef;
			return;
  		}
  		break;

src/Monitor.xs  view on Meta::CPAN

  		ST(0) = ST(1) = &PL_sv_undef;
		return;
  	}
  	break;
  case 'R':
	switch (name[1]) {
	case 'E':
		switch (name[2]) {
		case 'A':
		if (strEQ(name,"READ_LOCK"))
                    sv_setiv(ST(0),READ_LOCK);
		else {
		     ST(0) = ST(1) = &PL_sv_undef;
		     return;
		}
		break;
  		default:
  			ST(0) = ST(1) = &PL_sv_undef;
			return;
  		}
  		break;
	case 'X':
		switch (name[2]) {
		case 'G':
		if (strEQ(name,"RXGEN_OPCODE"))
                    sv_setiv(ST(0),RXGEN_OPCODE);
		else {
		     ST(0) = ST(1) = &PL_sv_undef;
		     return;
		}
		break;
		case '_':
		if (strEQ(name,"RX_ADDRINUSE"))
                    sv_setiv(ST(0),RX_ADDRINUSE);
		else if (strEQ(name,"RX_CALL_CLEARED"))
                    sv_setiv(ST(0),RX_CALL_CLEARED);
		else if (strEQ(name,"RX_CALL_READER_WAIT"))
                    sv_setiv(ST(0),RX_CALL_READER_WAIT);
		else if (strEQ(name,"RX_CALL_RECEIVE_DONE"))
                    sv_setiv(ST(0),RX_CALL_RECEIVE_DONE);
		else if (strEQ(name,"RX_CALL_WAIT_PACKETS"))
                    sv_setiv(ST(0),RX_CALL_WAIT_PACKETS);
		else if (strEQ(name,"RX_CALL_WAIT_PROC"))
                    sv_setiv(ST(0),RX_CALL_WAIT_PROC);
		else if (strEQ(name,"RX_CALL_WAIT_WINDOW_ALLOC"))
                    sv_setiv(ST(0),RX_CALL_WAIT_WINDOW_ALLOC);
		else if (strEQ(name,"RX_CALL_WAIT_WINDOW_SEND"))
                    sv_setiv(ST(0),RX_CALL_WAIT_WINDOW_SEND);
		else if (strEQ(name,"RX_CLIENT_CONNECTION"))
                    sv_setiv(ST(0),RX_CLIENT_CONNECTION);
		else if (strEQ(name,"RX_CONN_DESTROY_ME"))
                    sv_setiv(ST(0),RX_CONN_DESTROY_ME);
		else if (strEQ(name,"RX_CONN_MAKECALL_WAITING"))
                    sv_setiv(ST(0),RX_CONN_MAKECALL_WAITING);
		else if (strEQ(name,"RX_CONN_USING_PACKET_CKSUM"))
                    sv_setiv(ST(0),RX_CONN_USING_PACKET_CKSUM);
		else if (strEQ(name,"RX_DEBUGI_VERSION_W_NEWPACKETTYPES"))
                    sv_setiv(ST(0),RX_DEBUGI_VERSION_W_NEWPACKETTYPES);
		else if (strEQ(name,"RX_MAXCALLS"))
                    sv_setiv(ST(0),RX_MAXCALLS);
		else if (strEQ(name,"RX_MODE_EOF"))
                    sv_setiv(ST(0),RX_MODE_EOF);
		else if (strEQ(name,"RX_MODE_ERROR"))
                    sv_setiv(ST(0),RX_MODE_ERROR);
		else if (strEQ(name,"RX_MODE_RECEIVING"))
                    sv_setiv(ST(0),RX_MODE_RECEIVING);
		else if (strEQ(name,"RX_MODE_SENDING"))
                    sv_setiv(ST(0),RX_MODE_SENDING);
		else if (strEQ(name,"RX_N_PACKET_TYPES"))
                    sv_setiv(ST(0),RX_N_PACKET_TYPES);
		else if (strEQ(name,"RX_OTHER_IN"))
                    sv_setiv(ST(0),RX_OTHER_IN);
		else if (strEQ(name,"RX_OTHER_OUT"))
                    sv_setiv(ST(0),RX_OTHER_OUT);
		else if (strEQ(name,"RX_SERVER_CONNECTION"))
                    sv_setiv(ST(0),RX_SERVER_CONNECTION);
		else if (strEQ(name,"RX_SERVER_DEBUG_ALL_CONN"))
                    sv_setiv(ST(0),RX_SERVER_DEBUG_ALL_CONN);
		else if (strEQ(name,"RX_SERVER_DEBUG_ALL_PEER"))
                    sv_setiv(ST(0),RX_SERVER_DEBUG_ALL_PEER);
		else if (strEQ(name,"RX_SERVER_DEBUG_IDLE_THREADS"))
                    sv_setiv(ST(0),RX_SERVER_DEBUG_IDLE_THREADS);
		else if (strEQ(name,"RX_SERVER_DEBUG_RX_STATS"))
                    sv_setiv(ST(0),RX_SERVER_DEBUG_RX_STATS);
		else if (strEQ(name,"RX_SERVER_DEBUG_SEC_STATS"))
                    sv_setiv(ST(0),RX_SERVER_DEBUG_SEC_STATS);
		else if (strEQ(name,"RX_SERVER_DEBUG_WAITER_CNT"))
                    sv_setiv(ST(0),RX_SERVER_DEBUG_WAITER_CNT);
		else if (strEQ(name,"RX_STATE_ACTIVE"))
                    sv_setiv(ST(0),RX_STATE_ACTIVE);
		else if (strEQ(name,"RX_STATE_DALLY"))
                    sv_setiv(ST(0),RX_STATE_DALLY);
		else if (strEQ(name,"RX_STATE_HOLD"))
                    sv_setiv(ST(0),RX_STATE_HOLD);
		else if (strEQ(name,"RX_STATE_NOTINIT"))
                    sv_setiv(ST(0),RX_STATE_NOTINIT);
		else if (strEQ(name,"RX_STATE_PRECALL"))
                    sv_setiv(ST(0),RX_STATE_PRECALL);
		else {
		     ST(0) = ST(1) = &PL_sv_undef;
		     return;
		}
		break;
  		default:
  			ST(0) = ST(1) = &PL_sv_undef;
			return;
  		}
  		break;

src/Monitor.xs  view on Meta::CPAN

  		ST(0) = ST(1) = &PL_sv_undef;
		return;
  	}
  	break;
  case 'S':
	switch (name[1]) {
	case 'H':
		switch (name[2]) {
		case 'A':
		if (strEQ(name,"SHARED_LOCK"))
                    sv_setiv(ST(0),SHARED_LOCK);
		else {
		     ST(0) = ST(1) = &PL_sv_undef;
		     return;
		}
		break;
  		default:
  			ST(0) = ST(1) = &PL_sv_undef;
			return;
  		}
  		break;
	case 'O':
		switch (name[2]) {
		case 'C':
		if (strEQ(name,"SOCK_DGRAM"))
                    sv_setiv(ST(0),SOCK_DGRAM);
		else {
		     ST(0) = ST(1) = &PL_sv_undef;
		     return;
		}
		break;
  		default:
  			ST(0) = ST(1) = &PL_sv_undef;
			return;
  		}
  		break;

src/Monitor.xs  view on Meta::CPAN

  		ST(0) = ST(1) = &PL_sv_undef;
		return;
  	}
  	break;
  case 'T':
	switch (name[1]) {
	case 'H':
		switch (name[2]) {
		case 'R':
		if (strEQ(name,"THRESH_VAR_LEN"))
                    sv_setiv(ST(0),THRESH_VAR_LEN);
		else if (strEQ(name,"THRESH_VAR_NAME_LEN"))
                    sv_setiv(ST(0),THRESH_VAR_NAME_LEN);
		else {
		     ST(0) = ST(1) = &PL_sv_undef;
		     return;
		}
		break;
  		default:
  			ST(0) = ST(1) = &PL_sv_undef;
			return;
  		}
  		break;

src/Monitor.xs  view on Meta::CPAN

  		ST(0) = ST(1) = &PL_sv_undef;
		return;
  	}
  	break;
  case 'U':
	switch (name[1]) {
	case 'B':
		switch (name[2]) {
		case 'I':
		if (strEQ(name,"UBIK_MAX_INTERFACE_ADDR"))
                    sv_setiv(ST(0),UBIK_MAX_INTERFACE_ADDR);
		else {
		     ST(0) = ST(1) = &PL_sv_undef;
		     return;
		}
		break;
  		default:
  			ST(0) = ST(1) = &PL_sv_undef;
			return;
  		}
  		break;

src/Monitor.xs  view on Meta::CPAN

  		ST(0) = ST(1) = &PL_sv_undef;
		return;
  	}
  	break;
  case 'V':
	switch (name[1]) {
	case 'O':
		switch (name[2]) {
		case 'L':
		if (strEQ(name,"VOLMAXPARTS"))
                    sv_setiv(ST(0),VOLMAXPARTS);
		else if (strEQ(name,"VOLSERVICE_ID"))
                    sv_setiv(ST(0),VOLSERVICE_ID);
		else {
		     ST(0) = ST(1) = &PL_sv_undef;
		     return;
		}
		break;
		case 'T':
		if (strEQ(name,"VOTE_SERVICE_ID"))
                    sv_setiv(ST(0),VOTE_SERVICE_ID);
		else {
		     ST(0) = ST(1) = &PL_sv_undef;
		     return;
		}
		break;
  		default:
  			ST(0) = ST(1) = &PL_sv_undef;
			return;
  		}
  		break;

src/Monitor.xs  view on Meta::CPAN

  		ST(0) = ST(1) = &PL_sv_undef;
		return;
  	}
  	break;
  case 'W':
	switch (name[1]) {
	case 'R':
		switch (name[2]) {
		case 'I':
		if (strEQ(name,"WRITE_LOCK"))
                    sv_setiv(ST(0),WRITE_LOCK);
		else {
		     ST(0) = ST(1) = &PL_sv_undef;
		     return;
		}
		break;
  		default:
  			ST(0) = ST(1) = &PL_sv_undef;
			return;
  		}
  		break;

src/Monitor.xs  view on Meta::CPAN

  		ST(0) = ST(1) = &PL_sv_undef;
		return;
  	}
  	break;
  case 'X':
	switch (name[1]) {
	case 'S':
		switch (name[2]) {
		case 'T':
		if (strEQ(name,"XSTAT_FS_CBPORT"))
                    sv_setiv(ST(0),XSTAT_FS_CBPORT);
		else {
		     ST(0) = ST(1) = &PL_sv_undef;
		     return;
		}
		break;
  		default:
  			ST(0) = ST(1) = &PL_sv_undef;
			return;
  		}
  		break;



( run in 0.693 second using v1.01-cache-2.11-cpan-49f99fa48dc )