afsmonitor: add fs callback xstats collection
[openafs.git] / src / afsmonitor / afsmonitor.h
index 3561432..36f8a48 100644 (file)
@@ -9,10 +9,13 @@
 
 /* include file for afsmonitor */
 
+#ifndef AFSMONITOR_H
+#define AFSMONITOR_H
 
 #define HOST_NAME_LEN  80      /* length of server/cm names */
 
 #define XSTAT_FS_FULLPERF_RESULTS_LEN 424      /* value of xstat_fs_Results.data.AFS_COllData_len. We use this value before making any xstat calls and hence need this definition. Remember to change this value appropriately if the size of any of the fs related data structures change. Need to find a better way of doing this */
+#define XSTAT_FS_CBSTATS_RESULTS_LEN 16
 
 #define XSTAT_CM_FULLPERF_RESULTS_LEN 740      /* value of xstat_cm_Results.data.AFS_COllData_len. We use this value before making any xstat calls and hence need this definition. Remember to change this value appropriately if the size of any of the cm related data structures change. Need to find a better way of doing this */
 
@@ -38,14 +41,23 @@ struct afsmon_hostEntry {
     struct afsmon_hostEntry *next;
 };
 
-
-#define NUM_FS_STAT_ENTRIES 271        /* number of file server statistics
+#define NUM_FS_FULLPERF_ENTRIES 271 /* 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)
+                               /* max number of file server statistics
                                 * entries to display */
 #define FS_STAT_STRING_LEN 14  /* max length of each string above */
-#define NUM_CM_STAT_ENTRIES 571        /* number of cache manager statistics
+#define NUM_CM_STAT_ENTRIES 571        /* max number of cache manager statistics
                                 * entries to display */
 #define CM_STAT_STRING_LEN 14  /* max length of each string above */
 
+/* The positions of the xstat collections in display columns */
+#define FS_FULLPERF_ENTRY_START 0
+#define FS_FULLPERF_ENTRY_END   (NUM_FS_FULLPERF_ENTRIES - 1)
+#define FS_CB_ENTRY_START (FS_FULLPERF_ENTRY_END + 1)
+#define FS_CB_ENTRY_END   (FS_CB_ENTRY_START + NUM_FS_CB_ENTRIES - 1)
+
 /* structures to store statistics in a format convenient to dump to the 
 screen */
 /* for file servers */
@@ -78,8 +90,25 @@ 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 8       /* # of fs categories */
-#define CM_NUM_DATA_CATEGORIES 14      /* # of cm categories */
+#define FS_NUM_DATA_CATEGORIES 12      /* # of fs categories */
+#define CM_NUM_DATA_CATEGORIES 16      /* # of cm categories */
 
 /* Set this  enable detailed debugging with the -debug switch */
 #define DETAILED_DEBUG 0
+
+/* afsmon-output.c */
+  
+extern int afsmon_fsOutput(char *, int);
+extern int afsmon_cmOutput(char *, int);
+
+/* afsmon-win.c */
+extern int ovw_refresh(int, int);
+extern int fs_refresh(int, int);
+extern int cm_refresh(int, int);
+extern int gtx_initialize(void);
+
+/* afsmonitor.c */
+extern int afsmon_Exit(int a_exitVal);
+
+#endif /* AFSMONITOR_H */