} else {
call = (struct rx_call *)rxi_Alloc(sizeof(struct rx_call));
-
+ rx_MutexIncrement(rx_stats.nFreeCallStructs, rx_stats_mutex);
MUTEX_EXIT(&rx_freeCallQueue_lock);
MUTEX_INIT(&call->lock, "call lock", MUTEX_DEFAULT, NULL);
MUTEX_ENTER(&call->lock);
CV_INIT(&call->cv_rq, "call rq", CV_DEFAULT, 0);
CV_INIT(&call->cv_tq, "call tq", CV_DEFAULT, 0);
- rx_MutexIncrement(rx_stats.nFreeCallStructs, rx_stats_mutex);
/* Initialize once-only items */
queue_Init(&call->tq);
queue_Init(&call->rq);
afs_uint32 * supportedValues)
{
struct rx_debugIn in;
+ afs_int32 *lp = (afs_int32 *) stat;
+ int i;
afs_int32 rc = 0;
*supportedValues = 0;
if (stat->version >= RX_DEBUGI_VERSION_W_WAITED) {
*supportedValues |= RX_SERVER_DEBUG_WAITED_CNT;
}
-
+ if (stat->version >= RX_DEBUGI_VERSION_W_PACKETS) {
+ *supportedValues |= RX_SERVER_DEBUG_PACKETS_CNT;
+ }
stat->nFreePackets = ntohl(stat->nFreePackets);
stat->packetReclaims = ntohl(stat->packetReclaims);
stat->callsExecuted = ntohl(stat->callsExecuted);
stat->nWaiting = ntohl(stat->nWaiting);
stat->idleThreads = ntohl(stat->idleThreads);
+ stat->nWaited = ntohl(stat->nWaited);
+ stat->nPackets = ntohl(stat->nPackets);
}
return rc;
#define RX_DEBUGI_BADTYPE (-8)
#define RX_DEBUGI_VERSION_MINIMUM ('L') /* earliest real version */
-#define RX_DEBUGI_VERSION ('R') /* Latest version */
+#define RX_DEBUGI_VERSION ('S') /* Latest version */
/* first version w/ secStats */
#define RX_DEBUGI_VERSION_W_SECSTATS ('L')
/* version M is first supporting GETALLCONN and RXSTATS type */
#define RX_DEBUGI_VERSION_W_NEWPACKETTYPES ('P')
#define RX_DEBUGI_VERSION_W_GETPEER ('Q')
#define RX_DEBUGI_VERSION_W_WAITED ('R')
+#define RX_DEBUGI_VERSION_W_PACKETS ('S')
#define RX_DEBUGI_GETSTATS 1 /* get basic rx stats */
#define RX_DEBUGI_GETCONN 2 /* get connection info */
afs_int32 nWaiting;
afs_int32 idleThreads; /* Number of server threads that are idle */
afs_int32 nWaited;
- afs_int32 spare2[7];
+ afs_int32 nPackets;
+ afs_int32 spare2[6];
};
struct rx_debugConn_vL {
#define RX_SERVER_DEBUG_NEW_PACKETS 0x40
#define RX_SERVER_DEBUG_ALL_PEER 0x80
#define RX_SERVER_DEBUG_WAITED_CNT 0x100
+#define RX_SERVER_DEBUG_PACKETS_CNT 0x200
#define AFS_RX_STATS_CLEAR_ALL 0xffffffff
#define AFS_RX_STATS_CLEAR_INVOCATIONS 0x1
int withIdleThreads;
int withWaited;
int withPeers;
+ int withPackets;
struct rx_debugStats tstats;
char *portName, *hostName;
char hoststr[20];
withIdleThreads = (supportedDebugValues & RX_SERVER_DEBUG_IDLE_THREADS);
withWaited = (supportedDebugValues & RX_SERVER_DEBUG_WAITED_CNT);
withPeers = (supportedDebugValues & RX_SERVER_DEBUG_ALL_PEER);
+ withPackets = (supportedDebugValues & RX_SERVER_DEBUG_PACKETS_CNT);
- printf("Free packets: %d, packet reclaims: %d, calls: %d, used FDs: %d\n",
- tstats.nFreePackets, tstats.packetReclaims, tstats.callsExecuted,
- tstats.usedFDs);
+ if (withPackets)
+ printf("Free packets: %d/%d, packet reclaims: %d, calls: %d, used FDs: %d\n",
+ tstats.nFreePackets, tstats.nPackets, tstats.packetReclaims,
+ tstats.callsExecuted, tstats.usedFDs);
+ else
+ printf("Free packets: %d, packet reclaims: %d, calls: %d, used FDs: %d\n",
+ tstats.nFreePackets, tstats.packetReclaims, tstats.callsExecuted,
+ tstats.usedFDs);
if (!tstats.waitingForPackets)
printf("not ");
printf("waiting for packets.\n");