]> granicus.if.org Git - sysstat/commitdiff
sar: Change some activities' name
authorSebastien GODARD <sysstat@users.noreply.github.com>
Mon, 15 Jan 2018 16:34:53 +0000 (17:34 +0100)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Mon, 15 Jan 2018 16:34:53 +0000 (17:34 +0100)
Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
activity.c
sa.h
sa_common.c

index 867dbc4469c710bd17f445020dcf3abe33a59e47..51af5a3b983bf0be18ff40bd524f2f533701b75a 100644 (file)
@@ -1267,7 +1267,7 @@ struct activity net_udp6_act = {
 
 /* CPU frequency */
 struct activity pwr_cpufreq_act = {
-       .id             = A_PWR_CPUFREQ,
+       .id             = A_PWR_CPU,
        .options        = AO_COUNTED + AO_GRAPH_PER_ITEM,
        .magic          = ACTIVITY_MAGIC_BASE,
        .group          = G_POWER,
@@ -1291,7 +1291,7 @@ struct activity pwr_cpufreq_act = {
        .f_json_print   = json_print_pwr_cpufreq_stats,
        .f_svg_print    = svg_print_pwr_cpufreq_stats,
        .f_raw_print    = raw_print_pwr_cpufreq_stats,
-       .name           = "A_PWR_CPUFREQ",
+       .name           = "A_PWR_CPU",
        .g_nr           = 1,
 #endif
        .nr_ini         = -1,
@@ -1472,7 +1472,7 @@ struct activity huge_act = {
 
 /* CPU weighted frequency */
 struct activity pwr_wghfreq_act = {
-       .id             = A_PWR_WGHFREQ,
+       .id             = A_PWR_FREQ,
        .options        = AO_COUNTED + AO_MATRIX,
        .magic          = ACTIVITY_MAGIC_BASE,
        .group          = G_POWER,
@@ -1496,7 +1496,7 @@ struct activity pwr_wghfreq_act = {
        .f_json_print   = json_print_pwr_wghfreq_stats,
        .f_svg_print    = NULL,
        .f_raw_print    = raw_print_pwr_wghfreq_stats,
-       .name           = "A_PWR_WGHFREQ",
+       .name           = "A_PWR_FREQ",
        .g_nr           = 0,
 #endif
        .nr_ini         = -1,
@@ -1554,7 +1554,7 @@ struct activity pwr_usb_act = {
 
 /* Filesystem usage activity */
 struct activity filesystem_act = {
-       .id             = A_FILESYSTEM,
+       .id             = A_FS,
        .options        = AO_COUNTED + AO_GRAPH_PER_ITEM + AO_MULTIPLE_OUTPUTS,
        .magic          = ACTIVITY_MAGIC_BASE,
        .group          = G_XDISK,
@@ -1579,7 +1579,7 @@ struct activity filesystem_act = {
        .f_json_print   = json_print_filesystem_stats,
        .f_svg_print    = svg_print_filesystem_stats,
        .f_raw_print    = raw_print_filesystem_stats,
-       .name           = "A_FILESYSTEM",
+       .name           = "A_FS",
        .g_nr           = 4,
 #endif
        .nr_ini         = -1,
@@ -1620,7 +1620,7 @@ struct activity fchost_act = {
        .f_json_print   = json_print_fchost_stats,
        .f_svg_print    = svg_print_fchost_stats,
        .f_raw_print    = raw_print_fchost_stats,
-       .name           = "A_FCHOST",
+       .name           = "A_NET_FC",
        .g_nr           = 2,
 #endif
        .nr_ini         = -1,
diff --git a/sa.h b/sa.h
index 945f79f1d9fc616cc01c7f09739d046123359fcb..df4f826e822efd762eef842340e4a4a9e3e78980 100644 (file)
--- a/sa.h
+++ b/sa.h
 #define A_NET_ICMP6    27
 #define A_NET_EICMP6   28
 #define A_NET_UDP6     29
-#define A_PWR_CPUFREQ  30
+#define A_PWR_CPU      30
 #define A_PWR_FAN      31
 #define A_PWR_TEMP     32
 #define A_PWR_IN       33
 #define A_HUGE         34
-#define A_PWR_WGHFREQ  35
+#define A_PWR_FREQ     35
 #define A_PWR_USB      36
-#define A_FILESYSTEM   37
+#define A_FS           37
 #define A_NET_FC       38
 #define A_NET_SOFT     39
 
index 1fd0506b7d03152441385f194ebd546c39a11358..218b92888e04a66ff3108142d0170f7ec8c7dced 100644 (file)
@@ -1035,7 +1035,7 @@ void select_default_activity(struct activity *act[])
 
        /*
         * If no CPU's have been selected then select CPU "all".
-        * cpu_bitmap bitmap may be used by several activities (A_CPU, A_PWR_CPUFREQ...)
+        * cpu_bitmap bitmap may be used by several activities (A_CPU, A_PWR_CPU...)
         */
        if (!count_bits(cpu_bitmap.b_array, BITMAP_SIZE(cpu_bitmap.b_size))) {
                cpu_bitmap.b_array[0] |= 0x01;
@@ -1859,7 +1859,7 @@ int parse_sar_opt(char *argv[], int *opt, struct activity *act[],
                               BITMAP_SIZE(act[p]->bitmap->b_size));
                        act[p]->opt_flags = AO_F_CPU_ALL;
 
-                       p = get_activity_position(act, A_FILESYSTEM, EXIT_IF_NOT_FOUND);
+                       p = get_activity_position(act, A_FS, EXIT_IF_NOT_FOUND);
                        act[p]->opt_flags = AO_F_FILESYSTEM;
                        break;
 
@@ -1880,7 +1880,7 @@ int parse_sar_opt(char *argv[], int *opt, struct activity *act[],
                        break;
 
                case 'F':
-                       p = get_activity_position(act, A_FILESYSTEM, EXIT_IF_NOT_FOUND);
+                       p = get_activity_position(act, A_FS, EXIT_IF_NOT_FOUND);
                        act[p]->options |= AO_SELECTED;
                        if (!*(argv[*opt] + i + 1) && argv[*opt + 1] && !strcmp(argv[*opt + 1], K_MOUNT)) {
                                (*opt)++;
@@ -2019,7 +2019,7 @@ int parse_sar_m_opt(char *argv[], int *opt, struct activity *act[])
 
        for (t = strtok(argv[*opt], ","); t; t = strtok(NULL, ",")) {
                if (!strcmp(t, K_CPU)) {
-                       SELECT_ACTIVITY(A_PWR_CPUFREQ);
+                       SELECT_ACTIVITY(A_PWR_CPU);
                }
                else if (!strcmp(t, K_FAN)) {
                        SELECT_ACTIVITY(A_PWR_FAN);
@@ -2031,17 +2031,17 @@ int parse_sar_m_opt(char *argv[], int *opt, struct activity *act[])
                        SELECT_ACTIVITY(A_PWR_TEMP);
                }
                else if (!strcmp(t, K_FREQ)) {
-                       SELECT_ACTIVITY(A_PWR_WGHFREQ);
+                       SELECT_ACTIVITY(A_PWR_FREQ);
                }
                else if (!strcmp(t, K_USB)) {
                        SELECT_ACTIVITY(A_PWR_USB);
                }
                else if (!strcmp(t, K_ALL)) {
-                       SELECT_ACTIVITY(A_PWR_CPUFREQ);
+                       SELECT_ACTIVITY(A_PWR_CPU);
                        SELECT_ACTIVITY(A_PWR_FAN);
                        SELECT_ACTIVITY(A_PWR_IN);
                        SELECT_ACTIVITY(A_PWR_TEMP);
-                       SELECT_ACTIVITY(A_PWR_WGHFREQ);
+                       SELECT_ACTIVITY(A_PWR_FREQ);
                        SELECT_ACTIVITY(A_PWR_USB);
                }
                else