AFS-Monitor

 view release on metacpan or  search on metacpan

LICENSES/IBM-LICENSE  view on Meta::CPAN

   
   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

examples/Meltdown.pl  view on Meta::CPAN

	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) :

examples/Meltdown.pl  view on Meta::CPAN

	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;

examples/Meltdown.pl  view on Meta::CPAN

	$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/rxdebug  view on Meta::CPAN

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

examples/xstat_cm_test  view on Meta::CPAN



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


examples/xstat_cm_test  view on Meta::CPAN



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



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

examples/xstat_fs_test  view on Meta::CPAN

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

pod/Monitor.pod  view on Meta::CPAN

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

pod/afsmon_stats.pod  view on Meta::CPAN

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 *

pod/afsmon_stats.pod  view on Meta::CPAN

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

pod/afsmon_stats.pod  view on Meta::CPAN

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

pod/afsmon_stats.pod  view on Meta::CPAN

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 *

pod/afsmon_stats.pod  view on Meta::CPAN

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

pod/afsmon_stats.pod  view on Meta::CPAN

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

pod/afsmon_stats.pod  view on Meta::CPAN

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

pod/afsmonitor.pod  view on Meta::CPAN

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

pod/afsmonitor.pod  view on Meta::CPAN

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

pod/afsmonitor.pod  view on Meta::CPAN


=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

pod/afsmonitor.pod  view on Meta::CPAN

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

pod/cmdebug.pod  view on Meta::CPAN

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

pod/scout.pod  view on Meta::CPAN


=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

pod/udebug.pod  view on Meta::CPAN

#
# 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 *

pod/udebug.pod  view on Meta::CPAN

=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

pod/udebug.pod  view on Meta::CPAN


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

pod/udebug.pod  view on Meta::CPAN

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

pod/xstat_cm_test.pod  view on Meta::CPAN

#
# 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],
                            );

pod/xstat_cm_test.pod  view on Meta::CPAN

    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

pod/xstat_fs_test.pod  view on Meta::CPAN

#
# 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],
                            );

pod/xstat_fs_test.pod  view on Meta::CPAN

    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

pod/xstat_fs_test.pod  view on Meta::CPAN

=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

src/Makefile.PL  view on Meta::CPAN

$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",

src/Monitor.xs  view on Meta::CPAN

         char packet_type_unused[7];
         sprintf(packet_type_unused, "unused%d", num_unused);
         packet_type = packet_type_unused;
         num_unused++;
      }
      hv_store(PACKETS, packet_type, strlen(packet_type),
               newRV_inc((SV *) (TYPE)), 0);
   }
   hv_store(RXSTATS, "packets", 7, newRV_inc((SV *) (PACKETS)), 0);

   hv_store(RXSTATS, "dataPacketsRead", 15, newSViv(rxstats->dataPacketsRead),
            0);
   hv_store(RXSTATS, "ackPacketsRead", 14, newSViv(rxstats->ackPacketsRead),
            0);
   hv_store(RXSTATS, "dupPacketsRead", 14, newSViv(rxstats->dupPacketsRead),
            0);
   hv_store(RXSTATS, "spuriousPacketsRead", 19,
            newSViv(rxstats->spuriousPacketsRead), 0);
   hv_store(RXSTATS, "ignorePacketDally", 17,
            newSViv(rxstats->ignorePacketDally), 0);

   hv_store(RXSTATS, "pingPacketsSent", 15, newSViv(rxstats->pingPacketsSent),
            0);
   hv_store(RXSTATS, "abortPacketsSent", 16,
            newSViv(rxstats->abortPacketsSent), 0);
   hv_store(RXSTATS, "busyPacketsSent", 15, newSViv(rxstats->busyPacketsSent),
            0);

   hv_store(RXSTATS, "ackPacketsSent", 14, newSViv(rxstats->ackPacketsSent),
            0);
   hv_store(RXSTATS, "dataPacketsSent", 15, newSViv(rxstats->dataPacketsSent),
            0);
   hv_store(RXSTATS, "dataPacketsReSent", 17,
            newSViv(rxstats->dataPacketsReSent), 0);
   hv_store(RXSTATS, "dataPacketsPushed", 17,
            newSViv(rxstats->dataPacketsPushed), 0);
   hv_store(RXSTATS, "ignoreAckedPacket", 17,
            newSViv(rxstats->ignoreAckedPacket), 0);

   hv_store(RXSTATS, "netSendFailures", 15, newSViv(rxstats->netSendFailures),
            0);
   hv_store(RXSTATS, "fatalErrors", 11, newSViv(rxstats->fatalErrors), 0);

   hv_store(RXSTATS, "nServerConns", 12, newSViv(rxstats->nServerConns), 0);
   hv_store(RXSTATS, "nClientConns", 12, newSViv(rxstats->nClientConns), 0);
   hv_store(RXSTATS, "nPeerStructs", 12, newSViv(rxstats->nPeerStructs), 0);

src/Monitor.xs  view on Meta::CPAN

 * from src/afsmonitor/afsmonitor.h
 *
 */

/* structures to store statistics in a format convenient to dump to the
screen */
/* for file servers */
struct fs_Display_Data {
   char hostName[HOST_NAME_LEN];
   int probeOK;                 /* 0 => probe failed */
   char data[NUM_FS_STAT_ENTRIES][FS_STAT_STRING_LEN];
   short threshOvf[NUM_FS_STAT_ENTRIES];    /* overflow flags */
   int ovfCount;                /* overflow count */
};
/* for cache managers */
struct cm_Display_Data {
   char hostName[HOST_NAME_LEN];
   int probeOK;                 /* 0 => probe failed */
   char data[NUM_CM_STAT_ENTRIES][CM_STAT_STRING_LEN];
   short threshOvf[NUM_CM_STAT_ENTRIES];    /* overflow flags */
   int ovfCount;                /* overflow count */
};



/*
 * from src/afsmonitor/afsmonitor.c
 *    ("$Header: /afs/slac/g/scs/slur/Repository/AFSDebug/Debug/src/Monitor.xs,v 1.2 2006/07/05 22:25:10 alfw Exp $");
 */

src/Monitor.xs  view on Meta::CPAN

   int numGroups = 0;           /* number of groups in a section */
   int fromIdx = 0;
   int toIdx = 0;
   int found = 0;
   int idx = 0;                 /* index to fs_categories[] */
   int i = 0;
   int j = 0;

   extern char *fs_varNames[];
   extern char *cm_varNames[];
   extern char *fs_categories[];    /* file server data category names */
   extern char *cm_categories[];    /* cache manager data category names */

   opcode[0] = 0;
   arg1[0] = 0;
   arg2[0] = 0;
   arg3[0] = 0;
   sscanf(a_line, "%s %s %s %s", opcode, arg1, arg2, arg3);

   if (arg3[0] != '\0') {
      sprintf(buffer, "Extraneous characters at end of line");
      return (-1);

src/Monitor.xs  view on Meta::CPAN

 *
 * int
 * check_cm_thresholds(a_hostEntry, a_Data)
 * struct afsmon_hostEntry *a_hostEntry;
 * struct cm_Display_Data *a_Data;
 */

int
my_check_thresholds(a_hostEntry, HOSTINFO, type, buffer)
   struct afsmon_hostEntry *a_hostEntry;    /* ptr to hostEntry */
   HV *HOSTINFO;                /* ptr to data to be displayed */
   int type;
   char *buffer;
{

   struct Threshold *threshP;
   double tValue = 0;           /* threshold value */
   double pValue = 0;           /* probe value */
   int i;
   int idx;
   int count;                   /* number of thresholds exceeded */

src/Monitor.xs  view on Meta::CPAN

   count = 0;
   threshP = a_hostEntry->thresh;
   for (i = 0; i < a_hostEntry->numThresh; i++) {
      found = 0;

      if (threshP->itemName[0] == '\0') {
         threshP++;
         continue;
      }

      idx = threshP->index; /* positional index to the data array */
      tValue = atof(threshP->threshVal);    /* threshold value */
      hv_iterinit(HOSTINFO);


      while ((SECTION = (HV *) hv_iternextsv(HOSTINFO, &key, &keylen))) {

         if (!SvROK(SECTION)
             || SvTYPE(SECTION = (HV *) SvRV(SECTION)) != SVt_PVHV) {
            continue;
         }

src/Monitor.xs  view on Meta::CPAN

   fprintf(fs_outFD, "\t%10d rx_noPacketBuffersOnRead\n",
           a_ovP->rx_noPacketBuffersOnRead);
   fprintf(fs_outFD, "\t%10d rx_selects\n", a_ovP->rx_selects);
   fprintf(fs_outFD, "\t%10d rx_sendSelects\n", a_ovP->rx_sendSelects);
   fprintf(fs_outFD, "\t%10d rx_packetsRead_RcvClass\n",
           a_ovP->rx_packetsRead_RcvClass);
   fprintf(fs_outFD, "\t%10d rx_packetsRead_SendClass\n",
           a_ovP->rx_packetsRead_SendClass);
   fprintf(fs_outFD, "\t%10d rx_packetsRead_SpecialClass\n",
           a_ovP->rx_packetsRead_SpecialClass);
   fprintf(fs_outFD, "\t%10d rx_dataPacketsRead\n",
           a_ovP->rx_dataPacketsRead);
   fprintf(fs_outFD, "\t%10d rx_ackPacketsRead\n", a_ovP->rx_ackPacketsRead);
   fprintf(fs_outFD, "\t%10d rx_dupPacketsRead\n", a_ovP->rx_dupPacketsRead);
   fprintf(fs_outFD, "\t%10d rx_spuriousPacketsRead\n",
           a_ovP->rx_spuriousPacketsRead);
   fprintf(fs_outFD, "\t%10d rx_packetsSent_RcvClass\n",
           a_ovP->rx_packetsSent_RcvClass);
   fprintf(fs_outFD, "\t%10d rx_packetsSent_SendClass\n",
           a_ovP->rx_packetsSent_SendClass);
   fprintf(fs_outFD, "\t%10d rx_packetsSent_SpecialClass\n",
           a_ovP->rx_packetsSent_SpecialClass);
   fprintf(fs_outFD, "\t%10d rx_ackPacketsSent\n", a_ovP->rx_ackPacketsSent);
   fprintf(fs_outFD, "\t%10d rx_pingPacketsSent\n",
           a_ovP->rx_pingPacketsSent);
   fprintf(fs_outFD, "\t%10d rx_abortPacketsSent\n",
           a_ovP->rx_abortPacketsSent);
   fprintf(fs_outFD, "\t%10d rx_busyPacketsSent\n",
           a_ovP->rx_busyPacketsSent);
   fprintf(fs_outFD, "\t%10d rx_dataPacketsSent\n",
           a_ovP->rx_dataPacketsSent);
   fprintf(fs_outFD, "\t%10d rx_dataPacketsReSent\n",
           a_ovP->rx_dataPacketsReSent);
   fprintf(fs_outFD, "\t%10d rx_dataPacketsPushed\n",
           a_ovP->rx_dataPacketsPushed);
   fprintf(fs_outFD, "\t%10d rx_ignoreAckedPacket\n",
           a_ovP->rx_ignoreAckedPacket);
   fprintf(fs_outFD, "\t%10d rx_totalRtt_Sec\n", a_ovP->rx_totalRtt_Sec);
   fprintf(fs_outFD, "\t%10d rx_totalRtt_Usec\n", a_ovP->rx_totalRtt_Usec);
   fprintf(fs_outFD, "\t%10d rx_minRtt_Sec\n", a_ovP->rx_minRtt_Sec);
   fprintf(fs_outFD, "\t%10d rx_minRtt_Usec\n", a_ovP->rx_minRtt_Usec);
   fprintf(fs_outFD, "\t%10d rx_maxRtt_Sec\n", a_ovP->rx_maxRtt_Sec);
   fprintf(fs_outFD, "\t%10d rx_maxRtt_Usec\n", a_ovP->rx_maxRtt_Usec);
   fprintf(fs_outFD, "\t%10d rx_nRttSamples\n", a_ovP->rx_nRttSamples);
   fprintf(fs_outFD, "\t%10d rx_nServerConns\n", a_ovP->rx_nServerConns);

src/Monitor.xs  view on Meta::CPAN

my_Print_fs_FullPerfInfo(a_fs_Results, fs_outFD)
   struct xstat_fs_ProbeResults *a_fs_Results;
   FILE *fs_outFD;
{
   /*Correct # longs to rcv */
   static afs_int32 fullPerfLongs = (sizeof(struct fs_stats_FullPerfStats) >> 2);
   afs_int32 numLongs = 0;      /*# longwords received */
   struct fs_stats_FullPerfStats *fullPerfP = 0;    /*Ptr to full perf stats */
   char *printableTime = 0;     /*Ptr to printable time string */

   numLongs = a_fs_Results->data.AFS_CollData_len;
   if (numLongs != fullPerfLongs) {
      fprintf(fs_outFD,
              " ** Data size mismatch in full performance collection!\n");
      fprintf(fs_outFD, " ** Expecting %d, got %d\n", fullPerfLongs,
              numLongs);
      return;
   }
   printableTime = ctime((time_t *) & (a_fs_Results->probeTime));
   printableTime[strlen(printableTime) - 1] = '\0';
   fullPerfP = (struct fs_stats_FullPerfStats *)
      (a_fs_Results->data.AFS_CollData_val);
   fprintf(fs_outFD,
           "AFS_XSTATSCOLL_FULL_PERF_INFO (coll %d) for FS %s\n[Probe %d, %s]\n\n",
           a_fs_Results->collectionNumber, a_fs_Results->connP->hostName,
           a_fs_Results->probeNum, printableTime);
   my_Print_fs_OverallPerfInfo(&(fullPerfP->overall), fs_outFD);
   my_Print_fs_DetailedPerfInfo(&(fullPerfP->det), fs_outFD);
}


/*

src/Monitor.xs  view on Meta::CPAN

   fprintf(fs_outFD, "\n%s %s FS ", printTime, hostname);

   /* if probe failed print -1 and return */
   if (xstat_fs_Results.probeOK) {
      fprintf(fs_outFD, "-1\n");
      fclose(fs_outFD);
      return;
   }

   /* print out the probe information as  long words */
   numLongs = xstat_fs_Results.data.AFS_CollData_len;
   currLong = (afs_int32 *) (xstat_fs_Results.data.AFS_CollData_val);

   for (i = 0; i < numLongs; i++) {
      fprintf(fs_outFD, "%d ", *currLong++);
   }
   fprintf(fs_outFD, "\n\n");

   /* print detailed information */
   if (a_detOutput) {
      my_Print_fs_FullPerfInfo(&xstat_fs_Results, fs_outFD);
      fflush(fs_outFD);

src/Monitor.xs  view on Meta::CPAN

   struct xstat_fs_ProbeResults *a_fsResults;   /* ptr to xstat fs Results */
{
   afs_int32 *srcbuf;
   struct fs_stats_FullPerfStats *fullPerfP;
   int idx;
   int i, j;
   afs_int32 *tmpbuf;


   fullPerfP = (struct fs_stats_FullPerfStats *)
      (a_fsResults->data.AFS_CollData_val);

   /* there are two parts to the xstat FS statistics
    * - fullPerfP->overall which give the overall performance statistics, and
    * - fullPerfP->det which gives detailed info about file server operation
    * execution times */

   /* copy overall performance statistics */
   srcbuf = (afs_int32 *) & (fullPerfP->overall);
   idx = 0;
   for (i = 0; i < NUM_XSTAT_FS_AFS_PERFSTATS_LONGS; i++) {
      sprintf(a_fsData->data[idx], "%d", *srcbuf);
      idx++;
      srcbuf++;
   }

   /* copy epoch */
   srcbuf = (afs_int32 *) & (fullPerfP->det.epoch);
   sprintf(a_fsData->data[idx], "%d", *srcbuf); /* epoch */
   idx++;

   /* copy fs operation timing */

   srcbuf = (afs_int32 *) (fullPerfP->det.rpcOpTimes);

   for (i = 0; i < FS_STATS_NUM_RPC_OPS; i++) {
      sprintf(a_fsData->data[idx], "%d", *srcbuf);  /* numOps */
      idx++;
      srcbuf++;
      sprintf(a_fsData->data[idx], "%d", *srcbuf);  /* numSuccesses */
      idx++;
      srcbuf++;
      tmpbuf = srcbuf++;    /* sum time */
      sprintf(a_fsData->data[idx], "%d.%06d", *tmpbuf, *srcbuf);
      idx++;
      srcbuf++;
      tmpbuf = srcbuf++;    /* sqr time */
      sprintf(a_fsData->data[idx], "%d.%06d", *tmpbuf, *srcbuf);
      idx++;
      srcbuf++;
      tmpbuf = srcbuf++;    /* min time */
      sprintf(a_fsData->data[idx], "%d.%06d", *tmpbuf, *srcbuf);
      idx++;
      srcbuf++;
      tmpbuf = srcbuf++;    /* max time */
      sprintf(a_fsData->data[idx], "%d.%06d", *tmpbuf, *srcbuf);
      idx++;
      srcbuf++;
   }

   /* copy fs transfer timings */

   srcbuf = (afs_int32 *) (fullPerfP->det.xferOpTimes);
   for (i = 0; i < FS_STATS_NUM_XFER_OPS; i++) {
      sprintf(a_fsData->data[idx], "%d", *srcbuf);  /* numOps */
      idx++;
      srcbuf++;
      sprintf(a_fsData->data[idx], "%d", *srcbuf);  /* numSuccesses */
      idx++;
      srcbuf++;
      tmpbuf = srcbuf++;    /* sum time */
      sprintf(a_fsData->data[idx], "%d.%06d", *tmpbuf, *srcbuf);
      idx++;
      srcbuf++;
      tmpbuf = srcbuf++;    /* sqr time */
      sprintf(a_fsData->data[idx], "%d.%06d", *tmpbuf, *srcbuf);
      idx++;
      srcbuf++;
      tmpbuf = srcbuf++;    /* min time */
      sprintf(a_fsData->data[idx], "%d.%06d", *tmpbuf, *srcbuf);
      idx++;
      srcbuf++;
      tmpbuf = srcbuf++;    /* max time */
      sprintf(a_fsData->data[idx], "%d.%06d", *tmpbuf, *srcbuf);
      idx++;
      srcbuf++;
      sprintf(a_fsData->data[idx], "%d", *srcbuf);  /* sum bytes */
      idx++;
      srcbuf++;
      sprintf(a_fsData->data[idx], "%d", *srcbuf);  /* min bytes */
      idx++;
      srcbuf++;
      sprintf(a_fsData->data[idx], "%d", *srcbuf);  /* max bytes */
      idx++;
      srcbuf++;
      for (j = 0; j < FS_STATS_NUM_XFER_BUCKETS; j++) {
         sprintf(a_fsData->data[idx], "%d", *srcbuf);   /* bucket[j] */
         idx++;
         srcbuf++;
      }
   }

   return (0);
}   /* my_fs_Results_ltoa() */



src/Monitor.xs  view on Meta::CPAN


      sscanf(fs_categories[secidx], "%s %d", section, &numgrp);
      SECTION = newHV();

      while (grpidx <= secidx + numgrp) {
         GROUP = newHV();
         sscanf(fs_categories[grpidx], "%s %d %d", group, &fromidx, &toidx);
         for (i = fromidx; i <= toidx; i++) {
            if (showFlags[i] || showDefault) {
               ENTRY = newHV();
               hv_store(ENTRY, "value", 5, newSVnv(atof(fsData->data[i])), 0);
               hv_store(GROUP, fs_varNames[i], strlen(fs_varNames[i]),
                        newRV_inc((SV *) ENTRY), 0);
            }
         }
         if (HvKEYS(GROUP))
            hv_store(SECTION, group, strlen(group), newRV_inc((SV *) GROUP),
                     0);
         grpidx++;
      }
      if (HvKEYS(SECTION))

src/Monitor.xs  view on Meta::CPAN

}   /* fs_Results_to_Hash() */



/*
 * from src/afsmonitor/afsmonitor.c
 *    ("$Header: /afs/slac/g/scs/slur/Repository/AFSDebug/Debug/src/Monitor.xs,v 1.2 2006/07/05 22:25:10 alfw Exp $");
 */

int
my_save_FS_data_forDisplay(a_fsResults, HOSTINFO, numFS, FSnameList,
                           fs_showFlags, fs_showDefault, buffer)
   struct xstat_fs_ProbeResults *a_fsResults;
   HV *HOSTINFO;
   int numFS;
   struct afsmon_hostEntry *FSnameList;
   short *fs_showFlags;
   int fs_showDefault;
   char *buffer;
{
   struct fs_Display_Data *curr_fsDataP;

src/Monitor.xs  view on Meta::CPAN

   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 */

src/Monitor.xs  view on Meta::CPAN

                 a_fsResults->connP->hostName);
         return (70);
      }

      code = my_check_thresholds(curr_host, HOSTINFO, FS, buff2);
      if (code) {
         sprintf(buffer, "Error in checking thresholds (75) %s", buff2);
         return (75);
      }

   }    /* the probe succeeded, so we store the data in the display structure */
   return (0);

}   /* my_save_FS_data_forDisplay() */



/*
 * from src/afsmonitor/afsmonitor.c
 *    ("$Header: /afs/slac/g/scs/slur/Repository/AFSDebug/Debug/src/Monitor.xs,v 1.2 2006/07/05 22:25:10 alfw Exp $");
 */

int
my_afsmon_FS_Handler(xstat_fs_Results, numFS, conn_idx, buffer, argp)

src/Monitor.xs  view on Meta::CPAN

   short *fs_showFlags = va_arg(argp, short *);
   int fs_showDefault = va_arg(argp, int);

   HV *HOSTINFO = newHV();

   int code = 0;

   if (outputfile)
      my_afsmon_fsOutput(outputfile, detailed, xstat_fs_Results);

   /* add everything to data structure */
   code =
      my_save_FS_data_forDisplay(&xstat_fs_Results, HOSTINFO, numFS,
                                 FSnameList, fs_showFlags, fs_showDefault,
                                 buffer);
   if (code) {
      return (code);
   }

   /* Add HOSTINFO to FS */
   av_store(FILESERV, conn_idx, newRV_inc((SV *) (HOSTINFO)));
   return (0);

src/Monitor.xs  view on Meta::CPAN

   struct xstat_fs_ConnectionInfo *curr_conn = 0;
   char buff2[256] = "";
   int code = 0;
   int index = 0;

   struct xstat_fs_ProbeResults xstat_fs_Results;
   afs_int32 xstat_fsData[AFS_MAX_XSTAT_LONGS];
   xstat_fs_Results.probeTime = 0;
   xstat_fs_Results.connP = (struct xstat_fs_ConnectionInfo *) NULL;
   xstat_fs_Results.collectionNumber = 0;
   xstat_fs_Results.data.AFS_CollData_len = AFS_MAX_XSTAT_LONGS;
   xstat_fs_Results.data.AFS_CollData_val = (afs_int32 *) xstat_fsData;
   xstat_fs_Results.probeOK = 0;

   curr_conn = xstat_fs_ConnInfo;
   for (conn_idx = 0; conn_idx < xstat_fs_numServers; conn_idx++) {
      /*
       * Grab the statistics for the current File Server, if the
       * connection is valid.
       */
      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),
                               &(xstat_fs_Results.data));
            code =
               ProbeHandler(xstat_fs_Results, xstat_fs_numServers, index,
                            buff2, argp);
            index++;

            if (code) {
               sprintf(buffer, "Handler returned error code %d. %s",
                       code, buff2);
               return (code);
            }

src/Monitor.xs  view on Meta::CPAN

   struct afs_stats_AccessInfo *accessinfP;
   /* Correct #longs */
   static afs_int32 fullPerfLongs = (sizeof(struct afs_stats_CMFullPerf) >> 2);
   /* # longs actually received */
   afs_int32 numLongs;
   /* Ptr to full perf info */
   struct afs_stats_CMFullPerf *fullP;
   /* Ptr to printable time string */
   char *printableTime;

   numLongs = xstat_cm_Results.data.AFSCB_CollData_len;

   if (numLongs != fullPerfLongs) {

      fprintf(cm_outFD,
              " ** Data size mismatch in performance collection!\n");
      fprintf(cm_outFD, " ** Expecting %d, got %d\n", fullPerfLongs,
              numLongs);
      return;
   }

   printableTime = ctime((time_t *) & (xstat_cm_Results.probeTime));
   printableTime[strlen(printableTime) - 1] = '\0';
   fullP = (struct afs_stats_CMFullPerf *)
      (xstat_cm_Results.data.AFSCB_CollData_val);

   fprintf(cm_outFD,
           "AFSCB_XSTATSCOLL_FULL_PERF_INFO (coll %d) for CM %s\n[Probe %d, %s]\n\n",
           xstat_cm_Results.collectionNumber,
           xstat_cm_Results.connP->hostName, xstat_cm_Results.probeNum,
           printableTime);

   /*
    * Print the overall numbers first, followed by all of the RPC numbers,
    * then each of the other groupings.

src/Monitor.xs  view on Meta::CPAN

   fprintf(cm_outFD, "\n%s %s CM ", printTime, hostname);

   /* if probe failed print -1 and vanish */
   if (xstat_cm_Results.probeOK) {
      fprintf(cm_outFD, "-1\n");
      fclose(cm_outFD);
      return;
   }

   /* print out the probe information as  long words */
   numLongs = xstat_cm_Results.data.AFSCB_CollData_len;
   currLong = (afs_int32 *) (xstat_cm_Results.data.AFSCB_CollData_val);

   for (i = 0; i < numLongs; i++) {
      fprintf(cm_outFD, "%d ", *currLong++);
   }
   fprintf(cm_outFD, "\n\n");

   /* print detailed information */
   if (a_detOutput) {
      my_Print_cm_FullPerfInfo(xstat_cm_Results, cm_outFD);
      fflush(cm_outFD);

src/Monitor.xs  view on Meta::CPAN

{
   struct afs_stats_CMFullPerf *fullP;  /* ptr to complete CM stats */
   afs_int32 *srcbuf;
   afs_int32 *tmpbuf;
   int i, j;
   int idx;
   afs_int32 numLongs;


   fullP = (struct afs_stats_CMFullPerf *)
      (a_cmResults->data.AFSCB_CollData_val);

   /* There are 4 parts to CM statistics
    * - Overall performance statistics (including up/down statistics)
    * - This CMs FS RPC operations info
    * - This CMs FS RPC errors info
    * - This CMs FS transfers info
    * - Authentication info
    * - [Un]Replicated access info
    */

src/Monitor.xs  view on Meta::CPAN

   srcbuf = (afs_int32 *) & (fullP->perf);
   idx = 0;


   /* we skip the 19 entry, ProtServAddr, so the index must account for this */
   for (i = 0; i < NUM_AFS_STATS_CMPERF_LONGS + 1; i++) {
      if (i == 19) {
         srcbuf++;
         continue;  /* skip ProtServerAddr */
      }
      sprintf(a_cmData->data[idx], "%d", *srcbuf);
      idx++;
      srcbuf++;
   }

   /*printf("Ending index value = %d\n",idx-1); */

   /* server up/down statistics */
   /* copy file server up/down stats */
   srcbuf = (afs_int32 *) (fullP->perf.fs_UpDown);
   numLongs =
      2 * (sizeof(struct afs_stats_SrvUpDownInfo) / sizeof(afs_int32));
   for (i = 0; i < numLongs; i++) {
      sprintf(a_cmData->data[idx], "%d", *srcbuf);
      idx++;
      srcbuf++;
   }

   /*printf("Ending index value = %d\n",idx-1); */

   /* copy volume location  server up/down stats */
   srcbuf = (afs_int32 *) (fullP->perf.vl_UpDown);
   numLongs =
      2 * (sizeof(struct afs_stats_SrvUpDownInfo) / sizeof(afs_int32));
   for (i = 0; i < numLongs; i++) {
      sprintf(a_cmData->data[idx], "%d", *srcbuf);
      idx++;
      srcbuf++;
   }

   /*printf("Ending index value = %d\n",idx-1); */

   /* copy CMs individual FS RPC operations info */
   srcbuf = (afs_int32 *) (fullP->rpc.fsRPCTimes);
   for (i = 0; i < AFS_STATS_NUM_FS_RPC_OPS; i++) {
      sprintf(a_cmData->data[idx], "%d", *srcbuf);  /* numOps */
      idx++;
      srcbuf++;
      sprintf(a_cmData->data[idx], "%d", *srcbuf);  /* numSuccesses */
      idx++;
      srcbuf++;
      tmpbuf = srcbuf++;    /* sum time */
      sprintf(a_cmData->data[idx], "%d.%06d", *tmpbuf, *srcbuf);
      idx++;
      srcbuf++;
      tmpbuf = srcbuf++;    /* sqr time */
      sprintf(a_cmData->data[idx], "%d.%06d", *tmpbuf, *srcbuf);
      idx++;
      srcbuf++;
      tmpbuf = srcbuf++;    /* min time */
      sprintf(a_cmData->data[idx], "%d.%06d", *tmpbuf, *srcbuf);
      idx++;
      srcbuf++;
      tmpbuf = srcbuf++;    /* max time */
      sprintf(a_cmData->data[idx], "%d.%06d", *tmpbuf, *srcbuf);
      idx++;
      srcbuf++;
   }

   /*printf("Ending index value = %d\n",idx-1); */

   /* copy CMs individual FS RPC errors info */

   srcbuf = (afs_int32 *) (fullP->rpc.fsRPCErrors);
   for (i = 0; i < AFS_STATS_NUM_FS_RPC_OPS; i++) {
      sprintf(a_cmData->data[idx], "%d", *srcbuf);  /* server */
      idx++;
      srcbuf++;
      sprintf(a_cmData->data[idx], "%d", *srcbuf);  /* network */
      idx++;
      srcbuf++;
      sprintf(a_cmData->data[idx], "%d", *srcbuf);  /* prot */
      idx++;
      srcbuf++;
      sprintf(a_cmData->data[idx], "%d", *srcbuf);  /* vol */
      idx++;
      srcbuf++;
      sprintf(a_cmData->data[idx], "%d", *srcbuf);  /* busies */
      idx++;
      srcbuf++;
      sprintf(a_cmData->data[idx], "%d", *srcbuf);  /* other */
      idx++;
      srcbuf++;
   }

   /*printf("Ending index value = %d\n",idx-1); */

   /* copy CMs individual RPC transfers info */

   srcbuf = (afs_int32 *) (fullP->rpc.fsXferTimes);
   for (i = 0; i < AFS_STATS_NUM_FS_XFER_OPS; i++) {
      sprintf(a_cmData->data[idx], "%d", *srcbuf);  /* numOps */
      idx++;
      srcbuf++;
      sprintf(a_cmData->data[idx], "%d", *srcbuf);  /* numSuccesses */
      idx++;
      srcbuf++;
      tmpbuf = srcbuf++;    /* sum time */
      sprintf(a_cmData->data[idx], "%d.%06d", *tmpbuf, *srcbuf);
      idx++;
      srcbuf++;
      tmpbuf = srcbuf++;    /* sqr time */
      sprintf(a_cmData->data[idx], "%d.%06d", *tmpbuf, *srcbuf);
      idx++;
      srcbuf++;
      tmpbuf = srcbuf++;    /* min time */
      sprintf(a_cmData->data[idx], "%d.%06d", *tmpbuf, *srcbuf);
      idx++;
      srcbuf++;
      tmpbuf = srcbuf++;    /* max time */
      sprintf(a_cmData->data[idx], "%d.%06d", *tmpbuf, *srcbuf);
      idx++;
      srcbuf++;
      sprintf(a_cmData->data[idx], "%d", *srcbuf);  /* sum bytes */
      idx++;
      srcbuf++;
      sprintf(a_cmData->data[idx], "%d", *srcbuf);  /* min bytes */
      idx++;
      srcbuf++;
      sprintf(a_cmData->data[idx], "%d", *srcbuf);  /* max bytes */
      idx++;
      srcbuf++;
      for (j = 0; j < AFS_STATS_NUM_XFER_BUCKETS; j++) {
         sprintf(a_cmData->data[idx], "%d", *srcbuf);   /* bucket[j] */
         idx++;
         srcbuf++;
      }
   }

   /*printf("Ending index value = %d\n",idx-1); */

   /* copy CM operations timings */

   srcbuf = (afs_int32 *) (fullP->rpc.cmRPCTimes);
   for (i = 0; i < AFS_STATS_NUM_CM_RPC_OPS; i++) {
      sprintf(a_cmData->data[idx], "%d", *srcbuf);  /* numOps */
      idx++;
      srcbuf++;
      sprintf(a_cmData->data[idx], "%d", *srcbuf);  /* numSuccesses */
      idx++;
      srcbuf++;
      tmpbuf = srcbuf++;    /* sum time */
      sprintf(a_cmData->data[idx], "%d.%06d", *tmpbuf, *srcbuf);
      idx++;
      srcbuf++;
      tmpbuf = srcbuf++;    /* sqr time */
      sprintf(a_cmData->data[idx], "%d.%06d", *tmpbuf, *srcbuf);
      idx++;
      srcbuf++;
      tmpbuf = srcbuf++;    /* min time */
      sprintf(a_cmData->data[idx], "%d.%06d", *tmpbuf, *srcbuf);
      idx++;
      srcbuf++;
      tmpbuf = srcbuf++;    /* max time */
      sprintf(a_cmData->data[idx], "%d.%06d", *tmpbuf, *srcbuf);
      idx++;
      srcbuf++;
   }

   /*printf("Ending index value = %d\n",idx-1); */

   /* copy authentication info */

   srcbuf = (afs_int32 *) & (fullP->authent);
   numLongs = sizeof(struct afs_stats_AuthentInfo) / sizeof(afs_int32);
   for (i = 0; i < numLongs; i++) {
      sprintf(a_cmData->data[idx], "%d", *srcbuf);
      idx++;
      srcbuf++;
   }

   /*printf("Ending index value = %d\n",idx-1); */

   /* copy CM [un]replicated access info */

   srcbuf = (afs_int32 *) & (fullP->accessinf);
   numLongs = sizeof(struct afs_stats_AccessInfo) / sizeof(afs_int32);
   for (i = 0; i < numLongs; i++) {
      sprintf(a_cmData->data[idx], "%d", *srcbuf);
      idx++;
      srcbuf++;
   }

   /*printf("Ending index value = %d\n",idx-1); */
   return (0);

}   /* my_cm_Results_ltoa() */


src/Monitor.xs  view on Meta::CPAN


      sscanf(cm_categories[secidx], "%s %d", section, &numgrp);
      SECTION = newHV();

      while (grpidx <= secidx + numgrp) {
         GROUP = newHV();
         sscanf(cm_categories[grpidx], "%s %d %d", group, &fromidx, &toidx);
         for (i = fromidx; i <= toidx; i++) {
            if (showFlags[i] || showDefault) {
               ENTRY = newHV();
               hv_store(ENTRY, "value", 5, newSVnv(atof(cmData->data[i])), 0);
               hv_store(GROUP, cm_varNames[i], strlen(cm_varNames[i]),
                        newRV_inc((SV *) ENTRY), 0);
            }
         }
         if (HvKEYS(GROUP))
            hv_store(SECTION, group, strlen(group), newRV_inc((SV *) GROUP),
                     0);
         grpidx++;
      }
      if (HvKEYS(SECTION))

src/Monitor.xs  view on Meta::CPAN

}   /* cm_Results_to_Hash() */



/*
 * from src/afsmonitor/afsmonitor.c:
 *    ("$Header: /afs/slac/g/scs/slur/Repository/AFSDebug/Debug/src/Monitor.xs,v 1.2 2006/07/05 22:25:10 alfw Exp $");
 */

int
my_save_CM_data_forDisplay(a_cmResults, HOSTINFO, numCM, CMnameList,
                           cm_showFlags, cm_showDefault, buffer)
   struct xstat_cm_ProbeResults *a_cmResults;
   HV *HOSTINFO;
   int numCM;
   struct afsmon_hostEntry *CMnameList;
   short *cm_showFlags;
   int cm_showDefault;
   char *buffer;
{
   struct cm_Display_Data *curr_cmDataP;

src/Monitor.xs  view on Meta::CPAN

   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);
   }
   else {   /* probe succeeded, update display data structures */
      hv_store(HOSTINFO, "probeOK", 7, newSViv(1), 0);

      my_cm_Results_ltoa(curr_cmDataP, a_cmResults);

      cm_Results_to_Hash(curr_cmDataP, HOSTINFO, cm_showFlags,
                         cm_showDefault);

      done = 0;
      curr_host = CMnameList;
      for (i = 0; i < numCM; i++) {

src/Monitor.xs  view on Meta::CPAN


      code = my_check_thresholds(curr_host, HOSTINFO, CM, buff2);
      if (code) {
         sprintf(buffer, "Error in checking thresholds (105) %s", buff2);
         return (105);
      }

   }

   return (0);
}   /* my_save_CM_data_forDisplay() */



/*
 * from src/afsmonitor/afsmonitor.c:
 *    ("$Header: /afs/slac/g/scs/slur/Repository/AFSDebug/Debug/src/Monitor.xs,v 1.2 2006/07/05 22:25:10 alfw Exp $");
 */

int
my_afsmon_CM_Handler(xstat_cm_Results, numCM, conn_idx, buffer, argp)

src/Monitor.xs  view on Meta::CPAN

      va_arg(argp, struct afsmon_hostEntry *);
   short *cm_showFlags = va_arg(argp, short *);
   int cm_showDefault = va_arg(argp, int);

   HV *HOSTINFO = newHV();

   if (outputfile) {
      my_afsmon_cmOutput(outputfile, detailed, xstat_cm_Results);
   }

   /* add everything to data structure */
   code =
      my_save_CM_data_forDisplay(&xstat_cm_Results, HOSTINFO, numCM,
                                 CMnameList, cm_showFlags, cm_showDefault,
                                 buffer);
   if (code) {
      return (code);
   }

   /* Add HOSTINFO to CM */
   av_store(CACHEMAN, conn_idx, newRV_inc((SV *) HOSTINFO));
   return (0);
}   /* my_afsmon_CM_Handler() */

src/Monitor.xs  view on Meta::CPAN

   struct xstat_cm_ConnectionInfo *curr_conn = 0;
   char buff2[256] = "";
   int code = 0;
   int index = 0;

   struct xstat_cm_ProbeResults xstat_cm_Results;
   afs_int32 xstat_cmData[AFSCB_MAX_XSTAT_LONGS];
   xstat_cm_Results.probeTime = 0;
   xstat_cm_Results.connP = (struct xstat_cm_ConnectionInfo *) NULL;
   xstat_cm_Results.collectionNumber = 0;
   xstat_cm_Results.data.AFSCB_CollData_len = AFSCB_MAX_XSTAT_LONGS;
   xstat_cm_Results.data.AFSCB_CollData_val = (afs_int32 *) xstat_cmData;
   xstat_cm_Results.probeOK = 0;

   curr_conn = xstat_cm_ConnInfo;
   for (conn_idx = 0; conn_idx < xstat_cm_numServers; conn_idx++) {
      /*
       * Grab the statistics for the current File Server, if the
       * connection is valid.
       */
      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));

            code =
               ProbeHandler(xstat_cm_Results, xstat_cm_numServers, index,
                            buff2, argp);
            index++;

            if (code) {
               sprintf(buffer, "Handler routine got error code %d. %s",
                       code, buff2);
               return (code);

src/Monitor.xs  view on Meta::CPAN

 */

int
PrintCacheEntries64(struct rx_connection *aconn, int aint32,
                    AV *CACHE_ENTRIES, char *buffer)
{
    register int i;
    register afs_int32 code;
    struct AFSDBCacheEntry64 centry;
    char *cellname;
    char *data_name;
    HV *NETFID;
    HV *CENTRY;
    HV *LOCK;

    for (i = 0; i < 10000; i++) {
        code = RXAFSCB_GetCE64(aconn, i, &centry);
        if (code) {
            if (code == 1)
                break;
            sprintf(buffer, "cmdebug: failed to get cache entry %d (%s)\n", i,

src/Monitor.xs  view on Meta::CPAN

        hv_store(CENTRY, "Length",       6, newSViv(centry.Length), 0);
        hv_store(CENTRY, "DataVersion", 11, newSViv(centry.DataVersion), 0);
        hv_store(CENTRY, "refCount",     8, newSViv(centry.refCount), 0);
        hv_store(CENTRY, "callback",     8, newSViv(centry.callback), 0);
        hv_store(CENTRY, "cbExpires",    9, newSViv(centry.cbExpires), 0);
        hv_store(CENTRY, "opens",        5, newSViv(centry.opens), 0);
        hv_store(CENTRY, "writers",      7, newSViv(centry.writers), 0);

        /* now display states */
        if (centry.mvstat == 0)
            data_name = "normal file";
        else if (centry.mvstat == 1)
            data_name = "mount point";
        else if (centry.mvstat == 2)
            data_name = "volume root";
        else if (centry.mvstat == 3)
            data_name = "directory";
        else if (centry.mvstat == 4)
            data_name = "symlink";
        else if (centry.mvstat == 5)
            data_name = "microsoft dfs link";
        else if (centry.mvstat == 6)
            data_name = "invalid link";
        else
            data_name = "bogus mvstat";
        hv_store(CENTRY, "mvstat", 6, newSVpv(data_name, strlen(data_name)), 0);

        data_name = "";
        if (centry.states & 1)
            sprintf(data_name, "%s, stat'd", data_name);
        if (centry.states & 2)
            sprintf(data_name, "%s, backup", data_name);
        if (centry.states & 4)
            sprintf(data_name, "%s, read-only", data_name);
        if (centry.states & 8)
            sprintf(data_name, "%s, mt pt valid", data_name);
        if (centry.states & 0x10)
            sprintf(data_name, "%s, pending core", data_name);
        if (centry.states & 0x40)
            sprintf(data_name, "%s, wait-for-store", data_name);
        if (centry.states & 0x80)
            sprintf(data_name, "%s, mapped", data_name);
        hv_store(CENTRY, "states", 6, newSVpv(data_name, strlen(data_name)), 0);

        av_store(CACHE_ENTRIES, i, newRV_inc((SV *) CENTRY));
    }
    return 0;
}


/*
 * from src/venus/cmdebug.c
 *    ("$Header: /afs/slac/g/scs/slur/Repository/AFSDebug/Debug/src/Monitor.xs,v 1.2 2006/07/05 22:25:10 alfw Exp $");

src/Monitor.xs  view on Meta::CPAN

   register afs_int32 code = 0; /*Results of calls */
   int conn_idx;                /*Connection index */
   struct fsprobe_ConnectionInfo *curr_conn;    /*Current connection */
   struct ProbeViceStatistics *curr_stats;  /*Current stats region */
   int *curr_probeOK;           /*Current probeOK field */
   int i;

   if (scout_debugfd) {
      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);

src/Monitor.xs  view on Meta::CPAN

            newSViv(a_ovP->rx_sendSelects), 0);
   hv_store(DATA, "rx_packetsRead_RcvClass",
            strlen("rx_packetsRead_RcvClass"),
            newSViv(a_ovP->rx_packetsRead_RcvClass), 0);
   hv_store(DATA, "rx_packetsRead_SendClass",
            strlen("rx_packetsRead_SendClass"),
            newSViv(a_ovP->rx_packetsRead_SendClass), 0);
   hv_store(DATA, "rx_packetsRead_SpecialClass",
            strlen("rx_packetsRead_SpecialClass"),
            newSViv(a_ovP->rx_packetsRead_SpecialClass), 0);
   hv_store(DATA, "rx_dataPacketsRead", strlen("rx_dataPacketsRead"),
            newSViv(a_ovP->rx_dataPacketsRead), 0);
   hv_store(DATA, "rx_ackPacketsRead", strlen("rx_ackPacketsRead"),
            newSViv(a_ovP->rx_ackPacketsRead), 0);
   hv_store(DATA, "rx_dupPacketsRead", strlen("rx_dupPacketsRead"),
            newSViv(a_ovP->rx_dupPacketsRead), 0);
   hv_store(DATA, "rx_spuriousPacketsRead", strlen("rx_spuriousPacketsRead"),
            newSViv(a_ovP->rx_spuriousPacketsRead), 0);
   hv_store(DATA, "rx_packetsSent_RcvClass",
            strlen("rx_packetsSent_RcvClass"),
            newSViv(a_ovP->rx_packetsSent_RcvClass), 0);
   hv_store(DATA, "rx_packetsSent_SendClass",

src/Monitor.xs  view on Meta::CPAN

            strlen("rx_packetsSent_SpecialClass"),
            newSViv(a_ovP->rx_packetsSent_SpecialClass), 0);
   hv_store(DATA, "rx_ackPacketsSent", strlen("rx_ackPacketsSent"),
            newSViv(a_ovP->rx_ackPacketsSent), 0);
   hv_store(DATA, "rx_pingPacketsSent", strlen("rx_pingPacketsSent"),
            newSViv(a_ovP->rx_pingPacketsSent), 0);
   hv_store(DATA, "rx_abortPacketsSent", strlen("rx_abortPacketsSent"),
            newSViv(a_ovP->rx_abortPacketsSent), 0);
   hv_store(DATA, "rx_busyPacketsSent", strlen("rx_busyPacketsSent"),
            newSViv(a_ovP->rx_busyPacketsSent), 0);
   hv_store(DATA, "rx_dataPacketsSent", strlen("rx_dataPacketsSent"),
            newSViv(a_ovP->rx_dataPacketsSent), 0);
   hv_store(DATA, "rx_dataPacketsReSent", strlen("rx_dataPacketsReSent"),
            newSViv(a_ovP->rx_dataPacketsReSent), 0);
   hv_store(DATA, "rx_dataPacketsPushed", strlen("rx_dataPacketsPushed"),
            newSViv(a_ovP->rx_dataPacketsPushed), 0);
   hv_store(DATA, "rx_ignoreAckedPacket", strlen("rx_ignoreAckedPacket"),
            newSViv(a_ovP->rx_ignoreAckedPacket), 0);
   hv_store(DATA, "rx_totalRtt_Sec", strlen("rx_totalRtt_Sec"),
            newSViv(a_ovP->rx_totalRtt_Sec), 0);
   hv_store(DATA, "rx_totalRtt_Usec", strlen("rx_totalRtt_Usec"),
            newSViv(a_ovP->rx_totalRtt_Usec), 0);
   hv_store(DATA, "rx_minRtt_Sec", strlen("rx_minRtt_Sec"),
            newSViv(a_ovP->rx_minRtt_Sec), 0);
   hv_store(DATA, "rx_minRtt_Usec", strlen("rx_minRtt_Usec"),
            newSViv(a_ovP->rx_minRtt_Usec), 0);

src/Monitor.xs  view on Meta::CPAN


void
my_PrintCallInfo(struct xstat_fs_ProbeResults *xstat_fs_Results, HV *HOSTINFO)
{
   int numInt32s;
   afs_int32 *currInt32;
   register int i;
   char temp[100];
   HV *DATA = newHV();

   numInt32s = xstat_fs_Results->data.AFS_CollData_len;

   hv_store(DATA, "AFS_CollData_len", 16, newSViv(numInt32s), 0);
   currInt32 = (afs_int32 *) (xstat_fs_Results->data.AFS_CollData_val);
   for (i = 0; i < numInt32s; i++) {
      sprintf(temp, "%d", i);
      hv_store(DATA, temp, strlen(temp), newSViv(*currInt32++), 0);
   }
   hv_store(HOSTINFO, "data", 4, newRV_inc((SV *) DATA), 0);
}


/*
 * from src/xstat/xstat_fs_test.c
 *    ("$Header: /afs/slac/g/scs/slur/Repository/AFSDebug/Debug/src/Monitor.xs,v 1.2 2006/07/05 22:25:10 alfw Exp $");
 */

void
my_PrintPerfInfo(struct xstat_fs_ProbeResults *xstat_fs_Results, HV *HOSTINFO)
{
   /* Correct # int32s to rcv */
   static afs_int32 perfInt32s = (sizeof(struct afs_PerfStats) >> 2);
   /* # int32words received */
   afs_int32 numInt32s;
   /* Ptr to performance stats */
   struct afs_PerfStats *perfP;
   HV *DATA = newHV();

   numInt32s = xstat_fs_Results->data.AFS_CollData_len;
   if (numInt32s != perfInt32s) {
      warn("** Data size mismatch in performance collection!");
      warn("** Expecting %d, got %d\n", perfInt32s, numInt32s);
      return;
   }

   perfP = (struct afs_PerfStats *)
      (xstat_fs_Results->data.AFS_CollData_val);

   my_PrintOverallPerfInfo(perfP, DATA);

   hv_store(HOSTINFO, "data", 4, newRV_inc((SV *) DATA), 0);
}


/*
 * from src/xstat/xstat_fs_test.c
 *    ("$Header: /afs/slac/g/scs/slur/Repository/AFSDebug/Debug/src/Monitor.xs,v 1.2 2006/07/05 22:25:10 alfw Exp $");
 */

void
my_fs_PrintFullPerfInfo(struct xstat_fs_ProbeResults *xstat_fs_Results, HV *HOSTINFO)
{
   /* Correct # int32s to rcv */
   static afs_int32 fullPerfInt32s = (sizeof(struct fs_stats_FullPerfStats) >> 2);
   /* # int32words received */
   afs_int32 numInt32s;
   /* Ptr to full perf stats */
   struct fs_stats_FullPerfStats *fullPerfP;
   HV *DATA = newHV();

   numInt32s = xstat_fs_Results->data.AFS_CollData_len;
   if (numInt32s != fullPerfInt32s) {
      warn("** Data size mismatch in full performance collection!");
      warn("** Expecting %d, got %d\n", fullPerfInt32s, numInt32s);
      return;
   }

   fullPerfP = (struct fs_stats_FullPerfStats *)
      (xstat_fs_Results->data.AFS_CollData_val);

   my_PrintOverallPerfInfo(&(fullPerfP->overall), DATA);
   my_PrintDetailedPerfInfo(&(fullPerfP->det), DATA);

   hv_store(HOSTINFO, "data", 4, newRV_inc((SV *) DATA), 0);
}


/*
 * from src/xstat/xstat_fs_test.c
 *    ("$Header: /afs/slac/g/scs/slur/Repository/AFSDebug/Debug/src/Monitor.xs,v 1.2 2006/07/05 22:25:10 alfw Exp $");
 */

static char *CbCounterStrings[] = {
    "DeleteFiles",

src/Monitor.xs  view on Meta::CPAN

/*
 * from src/xstat/xstat_fs_test.c
 *    ("$Header: /afs/slac/g/scs/slur/Repository/AFSDebug/Debug/src/Monitor.xs,v 1.2 2006/07/05 22:25:10 alfw Exp $");
 */

void
my_fs_PrintCbCounters(struct xstat_fs_ProbeResults *xstat_fs_Results, HV *HOSTINFO)
{
    int numInt32s = sizeof(CbCounterStrings)/sizeof(char *);
    int i;
    afs_uint32 *val = xstat_fs_Results->data.AFS_CollData_val;
    HV *DATA = newHV();

    if (numInt32s > xstat_fs_Results->data.AFS_CollData_len)
        numInt32s = xstat_fs_Results->data.AFS_CollData_len;

    for (i=0; i<numInt32s; i++) {
        hv_store(DATA, CbCounterStrings[i], strlen(CbCounterStrings[i]), newSViv(val[i]), 0);
    }

   hv_store(HOSTINFO, "CbCounters", 10, newRV_inc((SV *) DATA), 0);
}



src/Monitor.xs  view on Meta::CPAN

/*
 * from src/xstat/xstat_cm_test.c
 *    ("$Header: /afs/slac/g/scs/slur/Repository/AFSDebug/Debug/src/Monitor.xs,v 1.2 2006/07/05 22:25:10 alfw Exp $");
 */

void
my_print_cmCallStats(struct xstat_cm_ProbeResults *xstat_cm_Results, HV *HOSTINFO)
{
   struct afs_CMStats *cmp;
   HV *DATA = newHV();
   char *data_name;

   cmp = (struct afs_CMStats *)(xstat_cm_Results->data.AFSCB_CollData_val);

   data_name = "afs_init";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_init), 0);
   data_name = "gop_rdwr";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_gop_rdwr), 0);
   data_name = "aix_gnode_rele";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_aix_gnode_rele), 0);
   data_name = "gettimeofday";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_gettimeofday), 0);
   data_name = "m_cpytoc";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_m_cpytoc), 0);
   data_name = "aix_vattr_null";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_aix_vattr_null), 0);
   data_name = "afs_gn_frunc";
   hv_store(DATA, "afs_gn_ftrunc", strlen("afs_gn_ftrunc"),
            newSViv(cmp->callInfo.C_afs_gn_ftrunc), 0);
   data_name = "afs_gn_rdwr";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_gn_rdwr), 0);
   data_name = "afs_gn_ioctl";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_gn_ioctl), 0);
   data_name = "afs_gn_locktl";
   hv_store(DATA, "afs_gn_lockctl", strlen("afs_gn_lockctl"),
            newSViv(cmp->callInfo.C_afs_gn_lockctl), 0);
   data_name = "afs_gn_readlink";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_gn_readlink), 0);
   data_name = "afs_gn_readdir";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_gn_readdir), 0);
   data_name = "afs_gn_select";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_gn_select), 0);
   data_name = "afs_gn_strategy";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_gn_strategy), 0);
   data_name = "afs_gn_symlink";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_gn_symlink), 0);
   data_name = "afs_gn_revoke";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_gn_revoke), 0);
   data_name = "afs_gn_link";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_gn_link), 0);
   data_name = "afs_gn_mkdir";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_gn_mkdir), 0);
   data_name = "afs_gn_mknod";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_gn_mknod), 0);
   data_name = "afs_gn_remove";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_gn_remove), 0);
   data_name = "afs_gn_rename";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_gn_rename), 0);
   data_name = "afs_gn_rmdir";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_gn_rmdir), 0);
   data_name = "afs_gn_fid";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_gn_fid), 0);
   data_name = "afs_gn_lookup";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_gn_lookup), 0);
   data_name = "afs_gn_open";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_gn_open), 0);
   data_name = "afs_gn_create";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_gn_create), 0);
   data_name = "afs_gn_hold";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_gn_hold), 0);
   data_name = "afs_gn_rele";
   hv_store(DATA, data_name, strlen(data_name),
            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";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_DInit), 0);
   data_name = "DRead";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_DRead), 0);
   data_name = "FixupBucket";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_FixupBucket), 0);
   data_name = "afs_newslot";
   hv_store(DATA, data_name, strlen(data_name),
            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";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_NewVCache), 0);
   data_name = "afs_FlushActiveVcaches";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_FlushActiveVcaches), 0);
   data_name = "afs_VerifyVCache";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_VerifyVCache), 0);
   data_name = "afs_WriteVCache";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_WriteVCache), 0);
   data_name = "afs_GetVCache";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_GetVCache), 0);
   data_name = "afs_StuffVcache";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_StuffVcache), 0);
   data_name = "afs_FindVCache";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_FindVCache), 0);
   data_name = "afs_PutDCache";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_PutDCache), 0);
   data_name = "afs_PutVCache";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_PutVCache), 0);
   data_name = "CacheStoreProc";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_CacheStoreProc), 0);
   data_name = "afs_FindDcache";
   hv_store(DATA, "afs_FindDCache", strlen("afs_FindDCache"),
            newSViv(cmp->callInfo.C_afs_FindDCache), 0);
   data_name = "afs_TryToSmush";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_TryToSmush), 0);
   data_name = "afs_AdjustSize";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_AdjustSize), 0);
   data_name = "afs_CheckSize";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_CheckSize), 0);
   data_name = "afs_StoreWarn";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_StoreWarn), 0);
   data_name = "CacheFetchProc";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_CacheFetchProc), 0);
   data_name = "UFS_CacheStoreProc";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_UFS_CacheStoreProc), 0);
   data_name = "UFS_CacheFetchProc";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_UFS_CacheFetchProc), 0);
   data_name = "afs_GetDCache";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_GetDCache), 0);
   data_name = "afs_SimpleVStat";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_SimpleVStat), 0);
   data_name = "afs_ProcessFS";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_ProcessFS), 0);
   data_name = "afs_InitCacheInfo";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_InitCacheInfo), 0);
   data_name = "afs_InitVolumeInfo";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_InitVolumeInfo), 0);
   data_name = "afs_InitCacheFile";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_InitCacheFile), 0);
   data_name = "afs_CacheInit";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_CacheInit), 0);
   data_name = "afs_GetDSlot";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_GetDSlot), 0);
   data_name = "afs_WriteThroughDSlots";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_WriteThroughDSlots), 0);
   data_name = "afs_MemGetDSlot";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_MemGetDSlot), 0);
   data_name = "afs_UFSGetDSlot";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_UFSGetDSlot), 0);
   data_name = "afs_StoreDCache";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_StoreDCache), 0);
   data_name = "afs_StoreMini";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_StoreMini), 0);
   data_name = "afs_StoreAllSegments";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_StoreAllSegments), 0);
   data_name = "afs_InvalidateAllSegments";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_InvalidateAllSegments), 0);
   data_name = "afs_TruncateAllSegments";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_TruncateAllSegments), 0);
   data_name = "afs_CheckVolSync";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_CheckVolSync), 0);
   data_name = "afs_wakeup";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_wakeup), 0);
   data_name = "afs_CFileOpen";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_CFileOpen), 0);
   data_name = "afs_CFileTruncate";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_CFileTruncate), 0);
   data_name = "afs_GetDownD";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_GetDownD), 0);
   data_name = "afs_WriteDCache";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_WriteDCache), 0);
   data_name = "afs_FlushDCache";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_FlushDCache), 0);
   data_name = "afs_GetDownDSlot";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_GetDownDSlot), 0);
   data_name = "afs_FlushVCache";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_FlushVCache), 0);
   data_name = "afs_GetDownV";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_GetDownV), 0);
   data_name = "afs_QueueVCB";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_QueueVCB), 0);
   data_name = "afs_call";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_call), 0);
   data_name = "afs_syscall_call";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_syscall_call), 0);
   data_name = "afs_syscall_icreate";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_syscall_icreate), 0);
   data_name = "afs_syscall_iopen";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_syscall_iopen), 0);
   data_name = "afs_syscall_iincdec";
   hv_store(DATA, data_name, strlen(data_name),
            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";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_SRXAFSCB_GetLock), 0);
   data_name = "SRXAFSCB_CallBack";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_SRXAFSCB_CallBack), 0);
   data_name = "SRXAFSCB_InitCallBackState";
   hv_store(DATA, data_name, strlen(data_name),
            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";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_SetChunkSize), 0);
   data_name = "afs_config";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_config), 0);
   data_name = "mem_freebytes";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_mem_freebytes), 0);
   data_name = "mem_getbytes";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_mem_getbytes), 0);
   data_name = "afs_Daemon";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_Daemon), 0);
   data_name = "afs_CheckRootVolume";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_CheckRootVolume), 0);
   data_name = "BPath";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_BPath), 0);
   data_name = "BPrefetch";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_BPrefetch), 0);
   data_name = "BStore";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_BStore), 0);
   data_name = "afs_BBusy";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_BBusy), 0);
   data_name = "afs_BQueue";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_BQueue), 0);
   data_name = "afs_BRelease";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_BRelease), 0);
   data_name = "afs_BackgroundDaemon";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_BackgroundDaemon), 0);
   data_name = "exporter_add";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_exporter_add), 0);
   data_name = "exporter_find";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_exporter_find), 0);
   data_name = "afs_gfs_kalloc";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_gfs_kalloc), 0);
   data_name = "afs_gfs_kfree";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_gfs_kfree), 0);
   data_name = "gop_lookupname";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_gop_lookupname), 0);
   data_name = "afs_uniqtime";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_uniqtime), 0);
   data_name = "gfs_vattr_null";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_gfs_vattr_null), 0);
   data_name = "afs_lock";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_lock), 0);
   data_name = "afs_unlock";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_unlock), 0);
   data_name = "afs_update";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_update), 0);
   data_name = "afs_gclose";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_gclose), 0);
   data_name = "afs_gopen";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_gopen), 0);
   data_name = "afs_greadlink";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_greadlink), 0);
   data_name = "afs_select";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_select), 0);
   data_name = "afs_gbmap";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_gbmap), 0);
   data_name = "afs_getfsdata";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_getfsdata), 0);
   data_name = "afs_gsymlink";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_gsymlink), 0);
   data_name = "afs_namei";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_namei), 0);
   data_name = "afs_gmount";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_gmount), 0);
   data_name = "afs_gget";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_gget), 0);
   data_name = "afs_glink";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_glink), 0);
   data_name = "afs_gmkdir";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_gmkdir), 0);
   data_name = "afs_unlink";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_unlink), 0);
   data_name = "afs_grmdir";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_grmdir), 0);
   data_name = "afs_makenode";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_makenode), 0);
   data_name = "afs_grename";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_grename), 0);
   data_name = "afs_rele";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_rele), 0);
   data_name = "afs_syncgp";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_syncgp), 0);
   data_name = "afs_getval";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_getval), 0);
   data_name = "afs_trunc";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_trunc), 0);
   data_name = "afs_rwgp";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_rwgp), 0);
   data_name = "afs_stat";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_stat), 0);
   data_name = "afsc_link";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afsc_link), 0);
   data_name = "afs_vfs_mount";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_vfs_mount), 0);
   data_name = "afs_uniqtime";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_uniqtime), 0);
   data_name = "iopen";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_iopen), 0);
   data_name = "idec";
   hv_store(DATA, data_name, strlen(data_name), newSViv(cmp->callInfo.C_idec),
            0);
   data_name = "iinc";
   hv_store(DATA, data_name, strlen(data_name), newSViv(cmp->callInfo.C_iinc),
            0);
   data_name = "ireadwrite";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_ireadwrite), 0);
   data_name = "iread";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_iread), 0);
   data_name = "iwrite";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_iwrite), 0);
   data_name = "iforget";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_iforget), 0);
   data_name = "icreate";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_icreate), 0);
   data_name = "igetinode";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_igetinode), 0);
   data_name = "osi_SleepR";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_osi_SleepR), 0);
   data_name = "osi_SleepS";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_osi_SleepS), 0);
   data_name = "osi_SleepW";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_osi_SleepW), 0);
   data_name = "osi_Sleep";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_osi_Sleep), 0);
   data_name = "afs_LookupMCE";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_LookupMCE), 0);
   data_name = "afs_MemReadBlk";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_MemReadBlk), 0);
   data_name = "afs_MemReadUIO";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_MemReadUIO), 0);
   data_name = "afs_MemWriteBlk";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_MemWriteBlk), 0);
   data_name = "afs_MemWriteUIO";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_MemWriteUIO), 0);
   data_name = "afs_MemCacheStoreProc";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_MemCacheStoreProc), 0);
   data_name = "afs_MemCacheFetchProc";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_MemCacheFetchProc), 0);
   data_name = "afs_MemCacheTruncate";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_MemCacheTruncate), 0);
   data_name = "afs_MemCacheStoreProc";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_MemCacheStoreProc), 0);
   data_name = "afs_GetNfsClientPag";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_GetNfsClientPag), 0);
   data_name = "afs_FindNfsClientPag";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_FindNfsClientPag), 0);
   data_name = "afs_PutNfsClientPag";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_PutNfsClientPag), 0);
   data_name = "afs_nfsclient_reqhandler";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_nfsclient_reqhandler), 0);
   data_name = "afs_nfsclient_GC";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_nfsclient_GC), 0);
   data_name = "afs_nfsclient_hold";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_nfsclient_hold), 0);
   data_name = "afs_nfsclient_stats";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_nfsclient_stats), 0);
   data_name = "afs_nfsclient_sysname";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_nfsclient_sysname), 0);
   data_name = "afs_rfs_dispatch";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_rfs_dispatch), 0);
   data_name = "afs_nfs2afscall";
   hv_store(DATA, "Nfs2AfsCall", strlen("Nfs2AfsCall"),
            newSViv(cmp->callInfo.C_Nfs2AfsCall), 0);
   data_name = "afs_sun_xuntext";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_sun_xuntext), 0);
   data_name = "osi_Active";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_osi_Active), 0);
   data_name = "osi_FlushPages";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_osi_FlushPages), 0);
   data_name = "osi_FlushText";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_osi_FlushText), 0);
   data_name = "osi_CallProc";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_osi_CallProc), 0);
   data_name = "osi_CancelProc";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_osi_CancelProc), 0);
   data_name = "osi_Invisible";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_osi_Invisible), 0);
   data_name = "osi_Time";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_osi_Time), 0);
   data_name = "osi_Alloc";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_osi_Alloc), 0);
   data_name = "osi_SetTime";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_osi_SetTime), 0);
   data_name = "osi_Dump";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_osi_Dump), 0);
   data_name = "osi_Free";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_osi_Free), 0);
   data_name = "osi_UFSOpen";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_osi_UFSOpen), 0);
   data_name = "osi_Close";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_osi_Close), 0);
   data_name = "osi_Stat";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_osi_Stat), 0);
   data_name = "osi_Truncate";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_osi_Truncate), 0);
   data_name = "osi_Read";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_osi_Read), 0);
   data_name = "osi_Write";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_osi_Write), 0);
   data_name = "osi_MapStrategy";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_osi_MapStrategy), 0);
   data_name = "osi_AllocLargeSpace";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_osi_AllocLargeSpace), 0);
   data_name = "osi_FreeLargeSpace";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_osi_FreeLargeSpace), 0);
   data_name = "osi_AllocSmallSpace";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_osi_AllocSmallSpace), 0);
   data_name = "osi_FreeSmallSpace";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_osi_FreeSmallSpace), 0);
   data_name = "osi_CloseToTheEdge";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_osi_CloseToTheEdge), 0);
   data_name = "osi_xgreedy";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_osi_xgreedy), 0);
   data_name = "osi_FreeSocket";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_osi_FreeSocket), 0);
   data_name = "osi_NewSocket";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_osi_NewSocket), 0);
   data_name = "osi_NetSend";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_osi_NetSend), 0);
   data_name = "WaitHack";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_WaitHack), 0);
   data_name = "osi_CancelWait";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_osi_CancelWait), 0);
   data_name = "osi_Wakeup";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_osi_Wakeup), 0);
   data_name = "osi_Wait";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_osi_Wait), 0);
   data_name = "dirp_Read";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_dirp_Read), 0);
   data_name = "dirp_Cpy";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_dirp_Cpy), 0);
   data_name = "dirp_Eq";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_dirp_Eq), 0);
   data_name = "dirp_Write";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_dirp_Write), 0);
   data_name = "dirp_Zap";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_dirp_Zap), 0);
   data_name = "afs_ioctl";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_ioctl), 0);
   data_name = "handleIoctl";
   hv_store(DATA, "HandleIoctl", strlen("HandleIoctl"),
            newSViv(cmp->callInfo.C_HandleIoctl), 0);
   data_name = "afs_xioctl";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_xioctl), 0);
   data_name = "afs_pioctl";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_pioctl), 0);
   data_name = "HandlePioctl";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_HandlePioctl), 0);
   data_name = "PGetVolumeStatus";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_PGetVolumeStatus), 0);
   data_name = "PSetVolumeStatus";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_PSetVolumeStatus), 0);
   data_name = "PFlush";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_PFlush), 0);
   data_name = "PFlushVolumeData";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_PFlushVolumeData), 0);
   data_name = "PNewStatMount";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_PNewStatMount), 0);
   data_name = "PGetTokens";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_PGetTokens), 0);
   data_name = "PSetTokens";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_PSetTokens), 0);
   data_name = "PUnlog";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_PUnlog), 0);
   data_name = "PCheckServers";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_PCheckServers), 0);
   data_name = "PCheckAuth";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_PCheckAuth), 0);
   data_name = "PCheckVolNames";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_PCheckVolNames), 0);
   data_name = "PFindVolume";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_PFindVolume), 0);
   data_name = "Prefetch";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_Prefetch), 0);
   data_name = "PGetCacheSize";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_PGetCacheSize), 0);
   data_name = "PSetCacheSize";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_PSetCacheSize), 0);
   data_name = "PSetSysName";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_PSetSysName), 0);
   data_name = "PExportAfs";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_PExportAfs), 0);
   data_name = "HandleClientContext";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_HandleClientContext), 0);
   data_name = "PViceAccess";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_PViceAccess), 0);
   data_name = "PRemoveCallBack";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_PRemoveCallBack), 0);
   data_name = "PRemoveMount";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_PRemoveMount), 0);
   data_name = "PSetVolumeStatus";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_PSetVolumeStatus), 0);
   data_name = "PListCells";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_PListCells), 0);
   data_name = "PNewCell";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_PNewCell), 0);
   data_name = "PGetUserCell";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_PGetUserCell), 0);
   data_name = "PGetCellStatus";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_PGetCellStatus), 0);
   data_name = "PSetCellStatus";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_PSetCellStatus), 0);
   data_name = "PVenusLogging";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_PVenusLogging), 0);
   data_name = "PGetAcl";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_PGetAcl), 0);
   data_name = "PGetFID";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_PGetFID), 0);
   data_name = "PSetAcl";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_PSetAcl), 0);
   data_name = "PGetFileCell";
   hv_store(DATA, data_name, strlen(data_name),
            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";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_GetCellByIndex), 0);
   data_name = "afs_GetCellByName";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_GetCellByName), 0);
#ifdef GETREALCELLBYINDEX
   data_name = "afs_GetRealCellByIndex";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_GetRealCellByIndex), 0);
#endif
   data_name = "afs_NewCell";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_NewCell), 0);
   data_name = "CheckVLDB";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_CheckVLDB), 0);
   data_name = "afs_GetVolume";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_GetVolume), 0);
   data_name = "afs_PutVolume";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_PutVolume), 0);
   data_name = "afs_GetVolumeByName";
   hv_store(DATA, data_name, strlen(data_name),
            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";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_CheckServers), 0);
   data_name = "ServerDown";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_ServerDown), 0);
   data_name = "afs_Conn";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_Conn), 0);
   data_name = "afs_PutConn";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_PutConn), 0);
   data_name = "afs_ConnByHost";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_ConnByHost), 0);
   data_name = "afs_ConnByMHosts";
   hv_store(DATA, data_name, strlen(data_name),
            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";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_FinalizeReq), 0);
   data_name = "afs_GetVolCache";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_GetVolCache), 0);
   data_name = "afs_GetVolSlot";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_GetVolSlot), 0);
   data_name = "afs_UFSGetVolSlot";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_UFSGetVolSlot), 0);
   data_name = "afs_MemGetVolSlot";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_MemGetVolSlot), 0);
   data_name = "afs_WriteVolCache";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_WriteVolCache), 0);
   data_name = "haveCallbacksfrom";
   hv_store(DATA, "HaveCallBacksFrom", strlen("HaveCallBacksFrom"),
            newSViv(cmp->callInfo.C_HaveCallBacksFrom), 0);
   data_name = "afs_getpage";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_getpage), 0);
   data_name = "afs_putpage";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_putpage), 0);
   data_name = "afs_nfsrdwr";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_nfsrdwr), 0);
   data_name = "afs_map";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_map), 0);
   data_name = "afs_cmp";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_cmp), 0);
   data_name = "afs_PageLeft";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_PageLeft), 0);
   data_name = "afs_mount";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_mount), 0);
   data_name = "afs_unmount";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_unmount), 0);
   data_name = "afs_root";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_root), 0);
   data_name = "afs_statfs";
   hv_store(DATA, data_name, strlen(data_name),
            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";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_GetMariner), 0);
   data_name = "afs_AddMarinerName";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_AddMarinerName), 0);
   data_name = "afs_open";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_open), 0);
   data_name = "afs_close";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_close), 0);
   data_name = "afs_closex";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_closex), 0);
   data_name = "afs_write";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_write), 0);
   data_name = "afs_UFSwrite";
   hv_store(DATA, "afs_UFSWrite", strlen("afs_UFSWrite"),
            newSViv(cmp->callInfo.C_afs_UFSWrite), 0);
   data_name = "afs_Memwrite";
   hv_store(DATA, "afs_MemWrite", strlen("afs_MemWrite"),
            newSViv(cmp->callInfo.C_afs_MemWrite), 0);
   data_name = "afs_rdwr";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_rdwr), 0);
   data_name = "afs_read";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_read), 0);
   data_name = "afs_UFSread";
   hv_store(DATA, "afs_UFSRead", strlen("afs_UFSRead"),
            newSViv(cmp->callInfo.C_afs_UFSRead), 0);
   data_name = "afs_Memread";
   hv_store(DATA, "afs_MemRead", strlen("afs_MemRead"),
            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";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_create), 0);
   data_name = "afs_LocalHero";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_LocalHero), 0);
   data_name = "afs_remove";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_remove), 0);
   data_name = "afs_link";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_link), 0);
   data_name = "afs_rename";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_rename), 0);
   data_name = "afs_InitReq";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_InitReq), 0);
   data_name = "afs_mkdir";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_mkdir), 0);
   data_name = "afs_rmdir";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_rmdir), 0);
   data_name = "afs_readdir";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_readdir), 0);
   data_name = "afs_read1dir";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_read1dir), 0);
   data_name = "afs_readdir_move";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_readdir_move), 0);
   data_name = "afs_readdir_iter";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_readdir_iter), 0);
   data_name = "afs_symlink";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_symlink), 0);
   data_name = "afs_HandleLink";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_HandleLink), 0);
   data_name = "afs_MemHandleLink";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_MemHandleLink), 0);
   data_name = "afs_UFSHandleLink";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_UFSHandleLink), 0);
   data_name = "HandleFlock";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_HandleFlock), 0);
   data_name = "afs_readlink";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_readlink), 0);
   data_name = "afs_fsync";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_fsync), 0);
   data_name = "afs_inactive";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_inactive), 0);
   data_name = "afs_ustrategy";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_ustrategy), 0);
   data_name = "afs_strategy";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_strategy), 0);
   data_name = "afs_bread";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_bread), 0);
   data_name = "afs_brelse";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_brelse), 0);
   data_name = "afs_bmap";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_bmap), 0);
   data_name = "afs_fid";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_fid), 0);
   data_name = "afs_FakeOpen";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_FakeOpen), 0);
   data_name = "afs_FakeClose";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_FakeClose), 0);
   data_name = "afs_StoreOnLastReference";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_StoreOnLastReference), 0);
   data_name = "afs_AccessOK";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_AccessOK), 0);
   data_name = "afs_GetAccessBits";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_GetAccessBits), 0);
   data_name = "afsio_copy";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afsio_copy), 0);
   data_name = "afsio_trim";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afsio_trim), 0);
   data_name = "afsio_skip";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afsio_skip), 0);
   data_name = "afs_page_read";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_page_read), 0);
   data_name = "afs_page_write";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_page_write), 0);
   data_name = "afs_page_read";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_page_read), 0);
   data_name = "afs_get_groups_from_pag";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_get_groups_from_pag), 0);
   data_name = "afs_get_pag_from_groups";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_get_pag_from_groups), 0);
   data_name = "AddPag";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_AddPag), 0);
   data_name = "PagInCred";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_PagInCred), 0);
   data_name = "afs_getgroups";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_getgroups), 0);
   data_name = "afs_page_in";
   hv_store(DATA, data_name, strlen(data_name),
            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";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_PGetCPrefs), 0);
   data_name = "PSetCPrefs";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_PSetCPrefs), 0);
#ifdef	AFS_HPUX_ENV
   data_name = "afs_pagein";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_pagein), 0);
   data_name = "afs_pageout";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_pageout), 0);
   data_name = "afs_hp_strategy";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_afs_hp_strategy), 0);
#endif
   data_name = "PFlushMount";
   hv_store(DATA, data_name, strlen(data_name),
            newSViv(cmp->callInfo.C_PFlushMount), 0);


   hv_store(HOSTINFO, "data", 4, newRV_inc((SV *) DATA), 0);

}


/*
 * from src/xstat/xstat_cm_test.c
 *    ("$Header: /afs/slac/g/scs/slur/Repository/AFSDebug/Debug/src/Monitor.xs,v 1.2 2006/07/05 22:25:10 alfw Exp $");
 */

void

src/Monitor.xs  view on Meta::CPAN



/*
 * from src/xstat/xstat_cm_test.c
 *    ("$Header: /afs/slac/g/scs/slur/Repository/AFSDebug/Debug/src/Monitor.xs,v 1.2 2006/07/05 22:25:10 alfw Exp $");
 */

void
my_cm_PrintOverallPerfInfo(struct afs_stats_CMPerf *a_ovP, HV *PERF)
{
   char *data_name;
   AV *FS_UPDOWN = newAV();
   AV *VL_UPDOWN = newAV();

   data_name = "numPerfCalls";
   hv_store(PERF, data_name, strlen(data_name), newSViv(a_ovP->numPerfCalls),
            0);
   data_name = "epoch";
   hv_store(PERF, data_name, strlen(data_name), newSViv(a_ovP->epoch), 0);
   data_name = "numCellsVisible";
   hv_store(PERF, data_name, strlen(data_name),
            newSViv(a_ovP->numCellsVisible), 0);
   data_name = "numCellsContacted";
   hv_store(PERF, data_name, strlen(data_name),
            newSViv(a_ovP->numCellsContacted), 0);
   data_name = "dlocalAccesses";
   hv_store(PERF, data_name, strlen(data_name),
            newSViv(a_ovP->dlocalAccesses), 0);
   data_name = "vlocalAccesses";
   hv_store(PERF, data_name, strlen(data_name),
            newSViv(a_ovP->vlocalAccesses), 0);
   data_name = "dremoteAccesses";
   hv_store(PERF, data_name, strlen(data_name),
            newSViv(a_ovP->dremoteAccesses), 0);
   data_name = "vremoteAccesses";
   hv_store(PERF, data_name, strlen(data_name),
            newSViv(a_ovP->vremoteAccesses), 0);
   data_name = "cacheNumEntries";
   hv_store(PERF, data_name, strlen(data_name),
            newSViv(a_ovP->cacheNumEntries), 0);
   data_name = "cacheBlocksTotal";
   hv_store(PERF, data_name, strlen(data_name),
            newSViv(a_ovP->cacheBlocksTotal), 0);
   data_name = "cacheBlocksInUse";
   hv_store(PERF, data_name, strlen(data_name),
            newSViv(a_ovP->cacheBlocksInUse), 0);
   data_name = "cacheBlocksOrig";
   hv_store(PERF, data_name, strlen(data_name),
            newSViv(a_ovP->cacheBlocksOrig), 0);
   data_name = "cacheMaxDirtyChunks";
   hv_store(PERF, data_name, strlen(data_name),
            newSViv(a_ovP->cacheMaxDirtyChunks), 0);
   data_name = "cacheCurrDirtyChunks";
   hv_store(PERF, data_name, strlen(data_name),
            newSViv(a_ovP->cacheCurrDirtyChunks), 0);
   data_name = "dcacheHits";
   hv_store(PERF, data_name, strlen(data_name), newSViv(a_ovP->dcacheHits),
            0);
   data_name = "vcacheHits";
   hv_store(PERF, data_name, strlen(data_name), newSViv(a_ovP->vcacheHits),
            0);
   data_name = "dcacheMisses";
   hv_store(PERF, data_name, strlen(data_name), newSViv(a_ovP->dcacheMisses),
            0);
   data_name = "vcacheMisses";
   hv_store(PERF, data_name, strlen(data_name), newSViv(a_ovP->vcacheMisses),
            0);
   data_name = "cacheFilesReused";
   hv_store(PERF, data_name, strlen(data_name),
            newSViv(a_ovP->cacheFilesReused), 0);
   data_name = "vcacheXAllocs";
   hv_store(PERF, data_name, strlen(data_name), newSViv(a_ovP->vcacheXAllocs),
            0);
   data_name = "dcacheXAllocs";
   hv_store(PERF, data_name, strlen(data_name), newSViv(a_ovP->dcacheXAllocs),
            0);
   data_name = "bufAlloced";
   hv_store(PERF, data_name, strlen(data_name), newSViv(a_ovP->bufAlloced),
            0);
   data_name = "bufHits";
   hv_store(PERF, data_name, strlen(data_name), newSViv(a_ovP->bufHits), 0);
   data_name = "bufMisses";
   hv_store(PERF, data_name, strlen(data_name), newSViv(a_ovP->bufMisses), 0);
   data_name = "bufFlushDirty";
   hv_store(PERF, data_name, strlen(data_name), newSViv(a_ovP->bufFlushDirty),
            0);
   data_name = "LargeBlocksActive";
   hv_store(PERF, data_name, strlen(data_name),
            newSViv(a_ovP->LargeBlocksActive), 0);
   data_name = "LargeBlocksAlloced";
   hv_store(PERF, data_name, strlen(data_name),
            newSViv(a_ovP->LargeBlocksAlloced), 0);
   data_name = "SmallBlocksActive";
   hv_store(PERF, data_name, strlen(data_name),
            newSViv(a_ovP->SmallBlocksActive), 0);
   data_name = "SmallBlocksAlloced";
   hv_store(PERF, data_name, strlen(data_name),
            newSViv(a_ovP->SmallBlocksAlloced), 0);
   data_name = "OutStandingMemUsage";
   hv_store(PERF, data_name, strlen(data_name),
            newSViv(a_ovP->OutStandingMemUsage), 0);
   data_name = "OutStandingAllocs";
   hv_store(PERF, data_name, strlen(data_name),
            newSViv(a_ovP->OutStandingAllocs), 0);
   data_name = "CallBackAlloced";
   hv_store(PERF, data_name, strlen(data_name),
            newSViv(a_ovP->CallBackAlloced), 0);
   data_name = "CallBackFlushes";
   hv_store(PERF, data_name, strlen(data_name),
            newSViv(a_ovP->CallBackFlushes), 0);
   data_name = "CallBackLoops";
   hv_store(PERF, "cbloops", strlen("cbloops"), newSViv(a_ovP->cbloops), 0);
   data_name = "srvRecords";
   hv_store(PERF, data_name, strlen(data_name), newSViv(a_ovP->srvRecords),
            0);
   data_name = "srvNumBuckets";
   hv_store(PERF, data_name, strlen(data_name), newSViv(a_ovP->srvNumBuckets),
            0);
   data_name = "srvMaxChainLength";
   hv_store(PERF, data_name, strlen(data_name),
            newSViv(a_ovP->srvMaxChainLength), 0);
   data_name = "srvMaxChainLengthHWM";
   hv_store(PERF, data_name, strlen(data_name),
            newSViv(a_ovP->srvMaxChainLengthHWM), 0);
   data_name = "srvRecordsHWM";
   hv_store(PERF, data_name, strlen(data_name), newSViv(a_ovP->srvRecordsHWM),
            0);
   data_name = "sysName_ID";
   hv_store(PERF, data_name, strlen(data_name), newSViv(a_ovP->sysName_ID),
            0);

   my_cm_PrintUpDownStats(&(a_ovP->fs_UpDown[0]), FS_UPDOWN, 0);

   my_cm_PrintUpDownStats(&(a_ovP->fs_UpDown[1]), FS_UPDOWN, 1);

   my_cm_PrintUpDownStats(&(a_ovP->vl_UpDown[0]), VL_UPDOWN, 0);

   my_cm_PrintUpDownStats(&(a_ovP->vl_UpDown[1]), VL_UPDOWN, 1);

src/Monitor.xs  view on Meta::CPAN

   static afs_int32 fullPerfInt32s = (sizeof(struct afs_stats_CMFullPerf) >> 2);
   /*# int32s actually received */
   afs_int32 numInt32s;
   struct afs_stats_CMFullPerf *fullP;
   HV *DATA      = newHV();
   HV *PERF      = newHV();
   HV *RPC       = newHV();
   HV *AUTHENT   = newHV();
   HV *ACCESSINF = newHV();

   numInt32s = xstat_cm_Results->data.AFSCB_CollData_len;
   if (numInt32s != fullPerfInt32s) {
      warn("** Data size mismatch in performance collection!");
      warn("** Expecting %d, got %d\n", fullPerfInt32s, numInt32s);
      warn("** Version mismatch with Cache Manager\n");
      return;
   }
   fullP = (struct afs_stats_CMFullPerf *)
      (xstat_cm_Results->data.AFSCB_CollData_val);

   my_cm_PrintOverallPerfInfo(&(fullP->perf), PERF);
   hv_store(DATA, "perf", 4, newRV_inc((SV *) PERF), 0);
   my_PrintRPCPerfInfo(&(fullP->rpc), RPC);
   hv_store(DATA, "rpc", 3, newRV_inc((SV *) RPC), 0);

   authentP = &(fullP->authent);

   hv_store(AUTHENT, "curr_PAGs", 9, newSViv(authentP->curr_PAGs), 0);
   hv_store(AUTHENT, "curr_Records", 12, newSViv(authentP->curr_Records), 0);

src/Monitor.xs  view on Meta::CPAN

   hv_store(ACCESSINF, "replicatedRefs", 14,
            newSViv(accessinfP->replicatedRefs), 0);
   hv_store(ACCESSINF, "numReplicasAccessed", 19,
            newSViv(accessinfP->numReplicasAccessed), 0);
   hv_store(ACCESSINF, "maxReplicasPerRef", 17,
            newSViv(accessinfP->maxReplicasPerRef), 0);
   hv_store(ACCESSINF, "refFirstReplicaOK", 17,
            newSViv(accessinfP->refFirstReplicaOK), 0);
   hv_store(DATA, "accessinf", 9, newRV_inc((SV *) ACCESSINF), 0);

   hv_store(HOSTINFO, "data", 4, newRV_inc((SV *) DATA), 0);
}


/*
 * from src/xstat/xstat_cm_test.c
 *    ("$Header: /afs/slac/g/scs/slur/Repository/AFSDebug/Debug/src/Monitor.xs,v 1.2 2006/07/05 22:25:10 alfw Exp $");
 */

void
my_cm_PrintPerfInfo(struct xstat_cm_ProbeResults *xstat_cm_Results, HV *HOSTINFO)
{
   /*Correct # int32s to rcv */
   static afs_int32 perfInt32s = (sizeof(struct afs_stats_CMPerf) >> 2);
   /*# int32words received */
   afs_int32 numInt32s;
   /*Ptr to performance stats */
   struct afs_stats_CMPerf *perfP;
   HV *DATA = newHV();

   numInt32s = xstat_cm_Results->data.AFSCB_CollData_len;
   if (numInt32s != perfInt32s) {
      warn("** Data size mismatch in performance collection!");
      warn("** Expecting %d, got %d\n", perfInt32s, numInt32s);
      warn("** Version mismatch with Cache Manager\n");
      return;
   }
   perfP = (struct afs_stats_CMPerf *)
      (xstat_cm_Results->data.AFSCB_CollData_val);

   my_cm_PrintOverallPerfInfo(perfP, DATA);
   hv_store(HOSTINFO, "data", 4, newRV_inc((SV *) DATA), 0);
}


/*
 * from src/xstat/xstat_cm_test.c
 *    ("$Header: /afs/slac/g/scs/slur/Repository/AFSDebug/Debug/src/Monitor.xs,v 1.2 2006/07/05 22:25:10 alfw Exp $");
 */

int
my_xstat_CM_Handler(xstat_cm_Results, xstat_cm_numServers, index, buffer,

src/afsmon-labels.h  view on Meta::CPAN

"rx_socketGreedy",
"rx_bogusPacketOnRead",
"rx_bogusHost",
"rx_noPacketOnRead",
"rx_noPacketBuffersOnRead",
"rx_selects",
"rx_sendSelects",
"rx_packetsRead_RcvClass",
"rx_packetsRead_SendClass",
"rx_packetsRead_SpecialClass",
"rx_dataPacketsRead",
"rx_ackPacketsRead",
"rx_dupPacketsRead",
"rx_spuriousPacketsRead",
"rx_packetsSent_RcvClass",
"rx_packetsSent_SendClass",
"rx_packetsSent_SpecialClass",
"rx_ackPacketsSent",
"rx_pingPacketsSent",
"rx_abortPacketsSent",
"rx_busyPacketsSent",
"rx_dataPacketsSent",
"rx_dataPacketsReSent",
"rx_dataPacketsPushed",
"rx_ignoreAckedPacket",
"rx_totalRtt_Sec",
"rx_totalRtt_Usec",
"rx_minRtt_Sec",
"rx_minRtt_Usec",
"rx_maxRtt_Sec",
"rx_maxRtt_Usec",
"rx_nRttSamples",
"rx_nServerConns",
"rx_nClientConns",

src/afsmon-labels.h  view on Meta::CPAN

"XStatsVersion_sum",
"XStatsVersion_sqr",
"XStatsVersion_min",
"XStatsVersion_max",
"GetXStats_ops",
"GetXStats_ops_ok",
"GetXStats_sum",
"GetXStats_sqr",
"GetXStats_min",
"GetXStats_max",
"FetchData_xfers",	/* Timings for some byte sized data transfer ops */
"FetchData_xfers_ok",
"FetchData_xfers_sum",
"FetchData_xfers_sqr",
"FetchData_xfers_min",
"FetchData_xfers_max",
"FetchData_xfers_Kbytes_sum",
"FetchData_xfers_bytes_min",
"FetchData_xfers_bytes_max",
"FetchData_xfers_bucket0",
"FetchData_xfers_bucket1",

src/afsmon-labels.h  view on Meta::CPAN

"StoreData_xfers_bucket1",
"StoreData_xfers_bucket2",
"StoreData_xfers_bucket3",
"StoreData_xfers_bucket4",
"StoreData_xfers_bucket5",
"StoreData_xfers_bucket6",
"StoreData_xfers_bucket7",
"StoreData_xfers_bucket8"
};

/* file server data classification */
/* Data is classified into sections and each section into one or more
groups. The integer after a section name specifies the number of groups
contained in it. The integers after a group name specify the starting and
ending positional indices to fs_varNames[]. Unimportant information
is placed at the end of the section. */

char *fs_categories[] = {
"PerfStats_section 5",
"VnodeCache_group 1 13",
"Directory_group 14 16",

src/afsmon-labels.h  view on Meta::CPAN

"HWM_MaxRecordsInPAG",
"HWM_LongestChain",
"unreplicatedRefs", 	/* [Un]replicated file accesses: */
"replicatedRefs",
"numReplicasAccessed",
"maxReplicasPerRef",
"refFirstReplicaOK"
};


/* Cache Manager data classification */
/* Data is classified into sections and each section into one or more
groups. The integer after a section name specifies the number of groups
contained in it. The integers after a group name specify the starting and
ending positional indices to fs_varNames[]. Unimportant information
is placed at the end of the section. */

char *cm_categories[] = {
"PerfStats_section 2",
"PerfStats_group 4 39",
"misc_group 0 3",

src/ppport.h  view on Meta::CPAN


#ifndef boolSV
#	define boolSV(b) ((b) ? &PL_sv_yes : &PL_sv_no)
#endif

#ifndef gv_stashpvn
#	define gv_stashpvn(str,len,flags) gv_stashpv(str,flags)
#endif

#ifndef newSVpvn
#	define newSVpvn(data,len) ((len) ? newSVpv ((data), (len)) : newSVpv ("", 0))
#endif

#ifndef newRV_inc
/* Replace: 1 */
#	define newRV_inc(sv) newRV(sv)
/* Replace: 0 */
#endif

#ifndef newRV_noinc
#  ifdef __GNUC__



( run in 0.642 second using v1.01-cache-2.11-cpan-8d75d55dd25 )