afsmonitor: show busy counts
authorMichael Meffie <mmeffie@sinenomine.net>
Sat, 10 Apr 2010 01:03:09 +0000 (21:03 -0400)
committerDerrick Brashear <shadow@dementia.org>
Sat, 10 Apr 2010 03:56:35 +0000 (20:56 -0700)
Update afsmonitor to display rx_nBusies, fs_nBusies,
sysname_ID, and fs_GetCapabilities, which where claimed from
spare fields long ago. Add a new group name called
Busies_group to show just the busy fields.

Change-Id: Id096c8bd8ba148def425a75e06250f7d5319672b
Reviewed-on: http://gerrit.openafs.org/1734
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

src/afsmonitor/afsmon-labels.h
src/afsmonitor/afsmon-output.c
src/afsmonitor/afsmonitor.c
src/afsmonitor/afsmonitor.h

index 4e3cea8..55f0a39 100644 (file)
@@ -94,7 +94,12 @@ char *fs_varNames[] = {
     "host_HostsInDiffSubnet",
     "host_HostsInDiffNetwork",
     "host_NumClients",
-    "host_ClientBlocks",       /* ",sysname_ID", has been junked */
+    "host_ClientBlocks",
+    "sysname_ID",              /* start of fields claimed from spares */
+    "rx_nBusies",
+    "fs_nBusies",
+    "fs_nGetCaps",
+    /* spares */
     "epoch",                   /* RPC Operation timings */
     "FetchData_ops",
     "FetchData_ops_ok",
@@ -390,7 +395,12 @@ char *fs_labels[] = {
     "host/HostsIn/DiffSubnet",
     "host/HostsIn/DiffNetwork",
     "host/NumClients/",
-    "host/Client/Blocks",      /* ",sysname_ID", has been junked */
+    "host/Client/Blocks",
+    "sysname/ID",              /* start of fields claimed from spares */
+    "rx/nBusies",
+    "fs/nBusies",
+    "fs/nGetCaps",
+    /* spares */
     "//epoch",                 /* RPC Operation timings */
     "/FetchData/ops",
     "/FetchData/ops_ok",
@@ -622,18 +632,22 @@ ending positional indices to fs_varNames[]. Unimportant information
 is placed at the end of the section. */
 
 char *fs_categories[] = {
-    "PerfStats_section 5",
+    "PerfStats_section 6",
     "VnodeCache_group 1 13",
     "Directory_group 14 16",
     "Rx_group 17 57",
     "HostModule_group 58 65",
     "misc_group 0 0",          /* numPerfCalls */
+    /* skip sysname id */
+    "Busies_group 67 68",
+    /* skip get caps */
+    /* skip spares */
     "RPCop_section 2",
-    "RPCopTimes_group 66 234",
-    "RPCopBytes_group 235 270",
+    "RPCopTimes_group 70 238",
+    "RPCopBytes_group 239 274",
     "CallBackStats_section 2",
-    "CallBackCounters_group 271 281",
-    "GotSomeSpaces_group 282 286"
+    "CallBackCounters_group 275 285",
+    "GotSomeSpaces_group 286 290"
 };
 
 
index a6e8447..677a338 100644 (file)
@@ -223,8 +223,12 @@ Print_fs_OverallPerfInfo(struct afs_PerfStats *a_ovP)
     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",
+    fprintf(fs_outFD, "\t%10d rx_nFreeCallStructs\n",
            a_ovP->rx_nFreeCallStructs);
+    fprintf(fs_outFD, "\t%10d rx_nBusies\n\n", a_ovP->rx_nBusies);
+
+    fprintf(fs_outFD, "\t%10d fs_nBusies\n", a_ovP->fs_nBusies);
+    fprintf(fs_outFD, "\t%10d fs_GetCapabilities\n\n", a_ovP->fs_nGetCaps);
 
     /*
      * Host module fields.
@@ -244,6 +248,7 @@ Print_fs_OverallPerfInfo(struct afs_PerfStats *a_ovP)
     fprintf(fs_outFD, "\t%10d host_ClientBlocks\n\n",
            a_ovP->host_ClientBlocks);
 
+    fprintf(fs_outFD, "\t%10d sysname_ID\n", a_ovP->sysname_ID);
 }                              /*Print_fs_OverallPerfInfo */
 
 
index 158a5e4..84a73b2 100644 (file)
@@ -88,7 +88,7 @@ short cm_showFlags[NUM_CM_STAT_ENTRIES];
 #define CM 2                   /* for misc. use */
 
 
-#define        NUM_XSTAT_FS_AFS_PERFSTATS_LONGS 66     /* number of fields (longs) in struct afs_PerfStats that we display */
+#define NUM_XSTAT_FS_AFS_PERFSTATS_LONGS 70    /* number of fields from struct afs_PerfStats that we display */
 #define NUM_AFS_STATS_CMPERF_LONGS 40  /* number of longs in struct afs_stats_CMPerf excluding up/down stats and fields we dont display */
 
 
index 36f8a48..38292a0 100644 (file)
@@ -41,7 +41,7 @@ struct afsmon_hostEntry {
     struct afsmon_hostEntry *next;
 };
 
-#define NUM_FS_FULLPERF_ENTRIES 271 /* number fields saved from full prefs */
+#define NUM_FS_FULLPERF_ENTRIES 275 /* number fields saved from full prefs */
 #define NUM_FS_CB_ENTRIES 16   /* number fields saved from callback counters */
 #define NUM_FS_STAT_ENTRIES  \
        (NUM_FS_FULLPERF_ENTRIES + NUM_FS_CB_ENTRIES)
@@ -90,7 +90,7 @@ other. Hence we should update only the one that completed. */
 
 /* Data is categorized into sections and groups to enable to user to choose
 what he wants displayed. */
-#define FS_NUM_DATA_CATEGORIES 12      /* # of fs categories */
+#define FS_NUM_DATA_CATEGORIES 13      /* # of fs categories */
 #define CM_NUM_DATA_CATEGORIES 16      /* # of cm categories */
 
 /* Set this  enable detailed debugging with the -debug switch */