]> granicus.if.org Git - sysstat/blobdiff - sa.h
sar/sadc: Add stable identifier support for disks statistics
[sysstat] / sa.h
diff --git a/sa.h b/sa.h
index 583b3678d208bb545b2cf25f6dec43f814d45ee9..3082485bb0d323d17baa15ce0779ff2b5638ba62 100644 (file)
--- a/sa.h
+++ b/sa.h
@@ -82,7 +82,8 @@
  */
 
 #define S_F_SINCE_BOOT         0x00000001
-#define S_F_SA_ROTAT           0x00000002
+#define S_F_SA_ROTAT           0x00000002      /* Only used by sadc */
+#define S_F_DEV_SID            0x00000002      /* Only used by sar/sadf */
 #define S_F_DEV_PRETTY         0x00000004
 #define S_F_FORCE_FILE         0x00000008
 #define S_F_INTERVAL_SET       0x00000010
 #define S_F_ZERO_OMIT          0x02000000
 #define S_F_SVG_SHOW_TOC       0x04000000
 #define S_F_FDATASYNC          0x08000000
+#define S_F_OPTION_A           0x10000000
+#define S_F_OPTION_P           0x20000000
+#define S_F_OPTION_I           0x40000000
 
 #define WANT_SINCE_BOOT(m)             (((m) & S_F_SINCE_BOOT)   == S_F_SINCE_BOOT)
 #define WANT_SA_ROTAT(m)               (((m) & S_F_SA_ROTAT)     == S_F_SA_ROTAT)
+#define USE_STABLE_ID(m)               (((m) & S_F_DEV_SID)      == S_F_DEV_SID)
 #define USE_PRETTY_OPTION(m)           (((m) & S_F_DEV_PRETTY)   == S_F_DEV_PRETTY)
 #define FORCE_FILE(m)                  (((m) & S_F_FORCE_FILE)   == S_F_FORCE_FILE)
 #define INTERVAL_SET(m)                        (((m) & S_F_INTERVAL_SET) == S_F_INTERVAL_SET)
 #define DISPLAY_ZERO_OMIT(m)           (((m) & S_F_ZERO_OMIT)    == S_F_ZERO_OMIT)
 #define DISPLAY_DEBUG_MODE(m)          (((m) & S_F_RAW_DEBUG_MODE) == S_F_RAW_DEBUG_MODE)
 #define AUTOSCALE_ON(m)                        (((m) & S_F_SVG_AUTOSCALE) == S_F_SVG_AUTOSCALE)
-#define DISPLAY_ONE_DAY(m)             (((m) & S_F_SVG_ONE_DAY)   == S_F_SVG_ONE_DAY)
+#define DISPLAY_ONE_DAY(m)             (((m) & S_F_SVG_ONE_DAY)  == S_F_SVG_ONE_DAY)
 #define DISPLAY_IDLE(m)                        (((m) & S_F_SVG_SHOW_IDLE) == S_F_SVG_SHOW_IDLE)
 #define DISPLAY_INFO(m)                        (((m) & S_F_SVG_SHOW_INFO) == S_F_SVG_SHOW_INFO)
-#define DISPLAY_UNIT(m)                        (((m) & S_F_UNIT) == S_F_UNIT)
-#define SET_CANVAS_HEIGHT(m)           (((m) & S_F_SVG_HEIGHT) == S_F_SVG_HEIGHT)
-#define PACK_VIEWS(m)                  (((m) & S_F_SVG_PACKED) == S_F_SVG_PACKED)
-#define DISPLAY_HUMAN_READ(m)          (((m) & S_F_HUMAN_READ) == S_F_HUMAN_READ)
+#define DISPLAY_UNIT(m)                        (((m) & S_F_UNIT)         == S_F_UNIT)
+#define SET_CANVAS_HEIGHT(m)           (((m) & S_F_SVG_HEIGHT)   == S_F_SVG_HEIGHT)
+#define PACK_VIEWS(m)                  (((m) & S_F_SVG_PACKED)   == S_F_SVG_PACKED)
+#define DISPLAY_HUMAN_READ(m)          (((m) & S_F_HUMAN_READ)   == S_F_HUMAN_READ)
 #define DISPLAY_TOC(m)                 (((m) & S_F_SVG_SHOW_TOC) == S_F_SVG_SHOW_TOC)
 #define FDATASYNC(m)                   (((m) & S_F_FDATASYNC)    == S_F_FDATASYNC)
+#define USE_OPTION_A(m)                        (((m) & S_F_OPTION_A)     == S_F_OPTION_A)
+#define USE_OPTION_P(m)                        (((m) & S_F_OPTION_P)     == S_F_OPTION_P)
+#define USE_OPTION_I(m)                        (((m) & S_F_OPTION_I)     == S_F_OPTION_I)
 
 #define AO_F_NULL              0x00000000
 
 
 /* Keywords */
 #define K_A_NULL       "A_NULL"
-#define K_XALL         "XALL"
-#define K_SUM          "SUM"
+#define K_CPU          "CPU"
 #define K_DEV          "DEV"
 #define K_EDEV         "EDEV"
-#define K_NFS          "NFS"
-#define K_NFSD         "NFSD"
-#define K_SOCK         "SOCK"
-#define K_IP           "IP"
-#define K_EIP          "EIP"
-#define K_ICMP         "ICMP"
 #define K_EICMP                "EICMP"
-#define K_TCP          "TCP"
-#define K_ETCP         "ETCP"
-#define K_UDP          "UDP"
-#define K_SOCK6                "SOCK6"
-#define K_IP6          "IP6"
-#define K_EIP6         "EIP6"
-#define K_ICMP6                "ICMP6"
 #define K_EICMP6       "EICMP6"
-#define K_UDP6         "UDP6"
-#define K_CPU          "CPU"
+#define K_EIP          "EIP"
+#define K_EIP6         "EIP6"
+#define K_ETCP         "ETCP"
 #define K_FAN          "FAN"
-#define K_TEMP         "TEMP"
-#define K_IN           "IN"
+#define K_FC           "FC"
 #define K_FREQ         "FREQ"
+#define K_ICMP         "ICMP"
+#define K_ICMP6                "ICMP6"
+#define K_IN           "IN"
+#define K_IP           "IP"
+#define K_IP6          "IP6"
 #define K_MOUNT                "MOUNT"
-#define K_FC           "FC"
+#define K_NFS          "NFS"
+#define K_NFSD         "NFSD"
+#define K_SID          "SID"
+#define K_SOCK         "SOCK"
+#define K_SOCK6                "SOCK6"
 #define K_SOFT         "SOFT"
+#define K_SUM          "SUM"
+#define K_TCP          "TCP"
+#define K_TEMP         "TEMP"
+#define K_UDP          "UDP"
+#define K_UDP6         "UDP6"
+#define K_XALL         "XALL"
 
 #define K_INT          "INT"
 #define K_DISK         "DISK"
@@ -1049,7 +1058,7 @@ struct report_format {
         * This is the main function used to display all the statistics for current format.
         */
        void (*f_display) (int, char *, struct file_activity *, struct file_magic *,
-                          struct tm *, struct tm *, void *);
+                          struct tm *, void *);
 };
 
 
@@ -1356,7 +1365,7 @@ double compute_ifutil
 void copy_structures
        (struct activity * [], unsigned int [], struct record_header [], int, int);
 int datecmp
-       (struct tm *, struct tstamp *);
+       (struct tm *, struct tstamp *, int);
 void display_sa_file_version
        (FILE *, struct file_magic *);
 void free_bitmaps
@@ -1366,7 +1375,7 @@ void free_structures
 char *get_devname
        (unsigned int, unsigned int, int);
 char *get_sa_devname
-       (unsigned int, unsigned int, unsigned int);
+       (unsigned int, unsigned int, unsigned long long [], unsigned int, unsigned int);
 void get_file_timestamp_struct
        (unsigned int, struct tm *, struct file_header *);
 unsigned long long get_global_cpu_statistics
@@ -1384,7 +1393,7 @@ void parse_sa_devices
 int parse_sar_opt
        (char * [], int *, struct activity * [], unsigned int *, int);
 int parse_sar_I_opt
-       (char * [], int *, struct activity * []);
+       (char * [], int *, unsigned int *, struct activity * []);
 int parse_sa_P_opt
        (char * [], int *, unsigned int *, struct activity * []);
 int parse_sar_m_opt
@@ -1402,7 +1411,7 @@ __printf_funct_t print_sar_restart
        (int *, int, char *, char *, int, struct file_header *, struct record_header *);
 int print_special_record
        (struct record_header *, unsigned int, struct tstamp *, struct tstamp *,
-        int, int, struct tm *, struct tm *, char *, int, struct file_magic *,
+        int, int, struct tm *, char *, int, struct file_magic *,
         struct file_header *, struct activity * [], struct report_format *, int, int);
 int read_file_stat_bunch
        (struct activity * [], int, int, int, struct file_activity *, int, int,
@@ -1419,7 +1428,7 @@ void replace_nonprintable_char
 int sa_fread
        (int, void *, size_t, int, int);
 int sa_get_record_timestamp_struct
-       (unsigned int, struct record_header *, struct tm *, struct tm *);
+       (unsigned int, struct record_header *, struct tm *);
 int sa_open_read_magic
        (int *, char *, struct file_magic *, int, int *, int);
 int search_list_item
@@ -1428,8 +1437,8 @@ void select_all_activities
        (struct activity * []);
 void select_default_activity
        (struct activity * []);
-void set_bitmap
-       (unsigned char [], unsigned char, unsigned int);
+void set_bitmaps
+       (struct activity * [], unsigned int *);
 void set_hdr_rectime
        (unsigned int, struct tm *, struct file_header *);
 void set_record_timestamp_string