X-Git-Url: http://git.openafs.org/?p=openafs.git;a=blobdiff_plain;f=src%2Fafsmonitor%2Fafsmon-output.c;h=a6e844771387cf76aa84501bc0ab2b3ea9af7dfa;hp=f9d9b5612e4a2a48cd6d9ea47c9de92a2b7ecaa3;hb=4c68f58827913129947bc44978e7469b3271c3c6;hpb=7214af16a9cc23632f2a00d035e6c0afec887e55 diff --git a/src/afsmonitor/afsmon-output.c b/src/afsmonitor/afsmon-output.c index f9d9b56..a6e8447 100644 --- a/src/afsmonitor/afsmon-output.c +++ b/src/afsmonitor/afsmon-output.c @@ -84,6 +84,25 @@ static char *xferOpNames[] = { "StoreData" }; +static char *CbCounterStrings[] = { + "DeleteFiles", + "DeleteCallBacks", + "BreakCallBacks", + "AddCallBack", + "GotSomeSpaces", + "DeleteAllCallBacks", + "nFEs", + "nCBs", + "nblks", + "CBsTimedOut", + "nbreakers", + "GSS1", + "GSS2", + "GSS3", + "GSS4", + "GSS5" +}; + /*________________________________________________________________________ FS STATS ROUTINES *_______________________________________________________________________*/ @@ -401,6 +420,47 @@ Print_fs_FullPerfInfo(struct xstat_fs_ProbeResults *a_fs_Results) } /*Print_fs_FullPerfInfo */ +/*------------------------------------------------------------------------ + * Print_fs_CallbackStats + * + * Description: + * Print out the AFS_XSTATSCOLL_CBSTATS collection we just + * received. + * + * Arguments: + * None. + * + * Returns: + * Nothing. + * + * Environment: + * All the info we need is nestled into xstat_fs_Results. + * + * Side Effects: + * As advertised. + *------------------------------------------------------------------------*/ +void +Print_fs_CallBackStats(struct xstat_fs_ProbeResults *a_fs_Results) +{ + char *printableTime; + time_t probeTime; + int numInt32s = xstat_fs_Results.data.AFS_CollData_len; + afs_int32 *val = xstat_fs_Results.data.AFS_CollData_val; + int i; + + probeTime = a_fs_Results->probeTime; + printableTime = ctime(&probeTime); + printableTime[strlen(printableTime) - 1] = '\0'; + fprintf(fs_outFD, + "AFS_XSTATSCOLL_CBSTATS (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); + + numInt32s = min(numInt32s, sizeof(CbCounterStrings)/sizeof(*CbCounterStrings)); + for (i=0; i