AFS-Monitor
view release on metacpan or search on metacpan
src/Monitor.xs view on Meta::CPAN
hv_store(RXSTATS, "receivePktAllocFailures", 23,
newSViv(rxstats->receivePktAllocFailures), 0);
hv_store(RXSTATS, "receiveCbufPktAllocFailures", 27,
newSViv(rxstats->receiveCbufPktAllocFailures), 0);
hv_store(RXSTATS, "sendPktAllocFailures", 20,
newSViv(rxstats->sendPktAllocFailures), 0);
hv_store(RXSTATS, "sendCbufPktAllocFailures", 24,
newSViv(rxstats->sendCbufPktAllocFailures), 0);
hv_store(RXSTATS, "specialPktAllocFailures", 23,
newSViv(rxstats->specialPktAllocFailures), 0);
hv_store(RXSTATS, "socketGreedy", 12, newSViv(rxstats->socketGreedy), 0);
hv_store(RXSTATS, "bogusPacketOnRead", 17,
newSViv(rxstats->bogusPacketOnRead), 0);
hv_store(RXSTATS, "bogusHost", 9, newSViv(rxstats->bogusHost), 0);
hv_store(RXSTATS, "noPacketOnRead", 14, newSViv(rxstats->noPacketOnRead),
0);
hv_store(RXSTATS, "noPacketBuffersOnRead", 21,
newSViv(rxstats->noPacketBuffersOnRead), 0);
hv_store(RXSTATS, "selects", 7, newSViv(rxstats->selects), 0);
hv_store(RXSTATS, "sendSelects", 11, newSViv(rxstats->sendSelects), 0);
PACKETS = newHV();
num_unused = 0;
for (i = 0; i < RX_N_PACKET_TYPES; i++) {
char *packet_type = rx_packetTypes[i];
TYPE = newHV();
hv_store(TYPE, "packetsRead", 11, newSViv(rxstats->packetsRead[i]), 0);
hv_store(TYPE, "packetsSent", 11, newSViv(rxstats->packetsSent[i]), 0);
if (packet_type == "unused") {
/* rename "unused" types */
/* can't have several entries in a hash with same name */
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);
hv_store(RXSTATS, "nCallStructs", 12, newSViv(rxstats->nCallStructs), 0);
hv_store(RXSTATS, "nFreeCallStructs", 16,
newSViv(rxstats->nFreeCallStructs), 0);
hv_store(RXSTATS, "nRttSamples", 11, newSViv(rxstats->nRttSamples), 0);
TOTALRTT = newHV();
hv_store(TOTALRTT, "sec", 3, newSViv(rxstats->totalRtt.sec), 0);
hv_store(TOTALRTT, "usec", 4, newSViv(rxstats->totalRtt.usec), 0);
hv_store(RXSTATS, "totalRtt", 8, newRV_inc((SV *) (TOTALRTT)), 0);
MINRTT = newHV();
hv_store(MINRTT, "sec", 3, newSViv(rxstats->minRtt.sec), 0);
hv_store(MINRTT, "usec", 4, newSViv(rxstats->minRtt.usec), 0);
hv_store(RXSTATS, "minRtt", 6, newRV_inc((SV *) (MINRTT)), 0);
MAXRTT = newHV();
hv_store(MAXRTT, "sec", 3, newSViv(rxstats->maxRtt.sec), 0);
hv_store(MAXRTT, "usec", 4, newSViv(rxstats->maxRtt.usec), 0);
hv_store(RXSTATS, "maxRtt", 6, newRV_inc((SV *) (MAXRTT)), 0);
#if !defined(AFS_PTHREAD_ENV) && !defined(AFS_USE_GETTIMEOFDAY)
hv_store(RXSTATS, "clock_nUpdates", 14, newSViv(clock_nUpdates), 0);
#endif
}
/* end of rxdebug helper functions */
/* start of afsmonitor helper functions */
/*
* 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 $");
*/
#define FS 1 /* for misc. use */
#define CM 2 /* for misc. use */
#define CFG_STR_LEN 80 /* max length of config file fields */
src/Monitor.xs view on Meta::CPAN
fprintf(fs_outFD, "\t%10d vcache_S_Entries\n", a_ovP->vcache_S_Entries);
fprintf(fs_outFD, "\t%10d vcache_S_Allocs\n", a_ovP->vcache_S_Allocs);
fprintf(fs_outFD, "\t%10d vcache_S_Gets\n", a_ovP->vcache_S_Gets);
fprintf(fs_outFD, "\t%10d vcache_S_Reads\n", a_ovP->vcache_S_Reads);
fprintf(fs_outFD, "\t%10d vcache_S_Writes\n\n", a_ovP->vcache_S_Writes);
fprintf(fs_outFD, "\t%10d vcache_H_Entries\n", a_ovP->vcache_H_Entries);
fprintf(fs_outFD, "\t%10d vcache_H_Gets\n", a_ovP->vcache_H_Gets);
fprintf(fs_outFD, "\t%10d vcache_H_Replacements\n\n",
a_ovP->vcache_H_Replacements);
/*
* Directory package section.
*/
fprintf(fs_outFD, "\t%10d dir_Buffers\n", a_ovP->dir_Buffers);
fprintf(fs_outFD, "\t%10d dir_Calls\n", a_ovP->dir_Calls);
fprintf(fs_outFD, "\t%10d dir_IOs\n\n", a_ovP->dir_IOs);
/*
* Rx section.
*/
fprintf(fs_outFD, "\t%10d rx_packetRequests\n", a_ovP->rx_packetRequests);
fprintf(fs_outFD, "\t%10d rx_noPackets_RcvClass\n",
a_ovP->rx_noPackets_RcvClass);
fprintf(fs_outFD, "\t%10d rx_noPackets_SendClass\n",
a_ovP->rx_noPackets_SendClass);
fprintf(fs_outFD, "\t%10d rx_noPackets_SpecialClass\n",
a_ovP->rx_noPackets_SpecialClass);
fprintf(fs_outFD, "\t%10d rx_socketGreedy\n", a_ovP->rx_socketGreedy);
fprintf(fs_outFD, "\t%10d rx_bogusPacketOnRead\n",
a_ovP->rx_bogusPacketOnRead);
fprintf(fs_outFD, "\t%10d rx_bogusHost\n", a_ovP->rx_bogusHost);
fprintf(fs_outFD, "\t%10d rx_noPacketOnRead\n", a_ovP->rx_noPacketOnRead);
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);
fprintf(fs_outFD, "\t%10d rx_nClientConns\n", a_ovP->rx_nClientConns);
fprintf(fs_outFD, "\t%10d rx_nPeerStructs\n", a_ovP->rx_nPeerStructs);
fprintf(fs_outFD, "\t%10d rx_nCallStructs\n", a_ovP->rx_nCallStructs);
fprintf(fs_outFD, "\t%10d rx_nFreeCallStructs\n\n",
a_ovP->rx_nFreeCallStructs);
/*
* Host module fields.
*/
fprintf(fs_outFD, "\t%10d host_NumHostEntries\n",
a_ovP->host_NumHostEntries);
fprintf(fs_outFD, "\t%10d host_HostBlocks\n", a_ovP->host_HostBlocks);
fprintf(fs_outFD, "\t%10d host_NonDeletedHosts\n",
a_ovP->host_NonDeletedHosts);
fprintf(fs_outFD, "\t%10d host_HostsInSameNetOrSubnet\n",
a_ovP->host_HostsInSameNetOrSubnet);
fprintf(fs_outFD, "\t%10d host_HostsInDiffSubnet\n",
a_ovP->host_HostsInDiffSubnet);
fprintf(fs_outFD, "\t%10d host_HostsInDiffNetwork\n",
a_ovP->host_HostsInDiffNetwork);
fprintf(fs_outFD, "\t%10d host_NumClients\n", a_ovP->host_NumClients);
fprintf(fs_outFD, "\t%10d host_ClientBlocks\n\n",
a_ovP->host_ClientBlocks);
} /* my_Print_fs_OverallPerfInfo() */
/*
* from src/afsmonitor/afsmon-output.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_fs_DetailedPerfInfo(a_detP, fs_outFD)
struct fs_stats_DetailedStats *a_detP;
FILE *fs_outFD;
{
int currIdx = 0; /*Loop variable */
fprintf(fs_outFD, "\t%10d epoch\n", a_detP->epoch);
for (currIdx = 0; currIdx < FS_STATS_NUM_RPC_OPS; currIdx++)
my_Print_fs_OpTiming(currIdx, &(a_detP->rpcOpTimes[currIdx]), fs_outFD);
for (currIdx = 0; currIdx < FS_STATS_NUM_XFER_OPS; currIdx++)
src/Monitor.xs view on Meta::CPAN
/*
* Rx section.
*/
hv_store(DATA, "rx_packetRequests", strlen("rx_packetRequests"),
newSViv(a_ovP->rx_packetRequests), 0);
hv_store(DATA, "rx_noPackets_RcvClass", strlen("rx_noPackets_RcvClass"),
newSViv(a_ovP->rx_noPackets_RcvClass), 0);
hv_store(DATA, "rx_noPackets_SendClass", strlen("rx_noPackets_SendClass"),
newSViv(a_ovP->rx_noPackets_SendClass), 0);
hv_store(DATA, "rx_noPackets_SpecialClass",
strlen("rx_noPackets_SpecialClass"),
newSViv(a_ovP->rx_noPackets_SpecialClass), 0);
hv_store(DATA, "rx_socketGreedy", strlen("rx_socketGreedy"),
newSViv(a_ovP->rx_socketGreedy), 0);
hv_store(DATA, "rx_bogusPacketOnRead", strlen("rx_bogusPacketOnRead"),
newSViv(a_ovP->rx_bogusPacketOnRead), 0);
hv_store(DATA, "rx_bogusHost", strlen("rx_bogusHost"),
newSViv(a_ovP->rx_bogusHost), 0);
hv_store(DATA, "rx_noPacketOnRead", strlen("rx_noPacketOnRead"),
newSViv(a_ovP->rx_noPacketOnRead), 0);
hv_store(DATA, "rx_noPacketBuffersOnRead",
strlen("rx_noPacketBuffersOnRead"),
newSViv(a_ovP->rx_noPacketBuffersOnRead), 0);
hv_store(DATA, "rx_selects", strlen("rx_selects"),
newSViv(a_ovP->rx_selects), 0);
hv_store(DATA, "rx_sendSelects", strlen("rx_sendSelects"),
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",
strlen("rx_packetsSent_SendClass"),
newSViv(a_ovP->rx_packetsSent_SendClass), 0);
hv_store(DATA, "rx_packetsSent_SpecialClass",
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);
hv_store(DATA, "rx_maxRtt_Sec", strlen("rx_maxRtt_Sec"),
newSViv(a_ovP->rx_maxRtt_Sec), 0);
hv_store(DATA, "rx_maxRtt_Usec", strlen("rx_maxRtt_Usec"),
newSViv(a_ovP->rx_maxRtt_Usec), 0);
hv_store(DATA, "rx_nRttSamples", strlen("rx_nRttSamples"),
newSViv(a_ovP->rx_nRttSamples), 0);
hv_store(DATA, "rx_nServerConns", strlen("rx_nServerConns"),
newSViv(a_ovP->rx_nServerConns), 0);
hv_store(DATA, "rx_nClientConns", strlen("rx_nClientConns"),
newSViv(a_ovP->rx_nClientConns), 0);
hv_store(DATA, "rx_nPeerStructs", strlen("rx_nPeerStructs"),
newSViv(a_ovP->rx_nPeerStructs), 0);
hv_store(DATA, "rx_nCallStructs", strlen("rx_nCallStructs"),
newSViv(a_ovP->rx_nCallStructs), 0);
hv_store(DATA, "rx_nFreeCallStructs", strlen("rx_nFreeCallStructs"),
newSViv(a_ovP->rx_nFreeCallStructs), 0);
#ifndef NOAFS_XSTATSCOLL_CBSTATS
hv_store(DATA, "rx_nBusies", strlen("rx_nBusies"),
newSViv(a_ovP->rx_nBusies), 0);
hv_store(DATA, "fs_nBusies", strlen("fs_nBusies"),
newSViv(a_ovP->fs_nBusies), 0);
hv_store(DATA, "fs_GetCapabilities", strlen("fs_GetCapabilities"),
newSViv(a_ovP->fs_nGetCaps), 0);
#endif
/*
* Host module fields.
*/
hv_store(DATA, "host_NumHostEntries", strlen("host_NumHostEntries"),
newSViv(a_ovP->host_NumHostEntries), 0);
hv_store(DATA, "host_HostBlocks", strlen("host_HostBlocks"),
newSViv(a_ovP->host_HostBlocks), 0);
hv_store(DATA, "host_NonDeletedHosts", strlen("host_NonDeletedHosts"),
newSViv(a_ovP->host_NonDeletedHosts), 0);
hv_store(DATA, "host_HostsInSameNetOrSubnet",
strlen("host_HostsInSameNetOrSubnet"),
newSViv(a_ovP->host_HostsInSameNetOrSubnet), 0);
hv_store(DATA, "host_HostsInDiffSubnet", strlen("host_HostsInDiffSubnet"),
newSViv(a_ovP->host_HostsInDiffSubnet), 0);
hv_store(DATA, "host_HostsInDiffNetwork",
strlen("host_HostsInDiffNetwork"),
newSViv(a_ovP->host_HostsInDiffNetwork), 0);
hv_store(DATA, "host_NumClients", strlen("host_NumClients"),
newSViv(a_ovP->host_NumClients), 0);
( run in 1.767 second using v1.01-cache-2.11-cpan-acf6aa7dc9e )