]> granicus.if.org Git - sysstat/commitdiff
sar: Add PSI keyword to option -q
authorSebastien GODARD <sysstat@users.noreply.github.com>
Sun, 12 Apr 2020 08:29:46 +0000 (10:29 +0200)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Sun, 12 Apr 2020 08:29:46 +0000 (10:29 +0200)
Specifying "sar -q PSI" will be equivalent to "sar -q CPU,MEM,IO".

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
sa.h
sa_common.c

diff --git a/sa.h b/sa.h
index 3f4189e10abf7668008bc8ac71cc5db971b32a69..b1abff45c2fbdd50d2418f3b650f8dbf572ca832 100644 (file)
--- a/sa.h
+++ b/sa.h
 #define K_MOUNT                "MOUNT"
 #define K_NFS          "NFS"
 #define K_NFSD         "NFSD"
+#define K_PSI          "PSI"
 #define K_SID          "SID"
 #define K_SOCK         "SOCK"
 #define K_SOCK6                "SOCK6"
index bd5caca4a34bd78ae3b47ec25a38c205352dfc4a..c37fde1f85fae840b4f0b0bd38be256f5a70ba05 100644 (file)
@@ -2616,6 +2616,11 @@ int parse_sar_q_opt(char *argv[], int *opt, struct activity *act[])
                else if (!strcmp(t, K_PSI_MEM)) {
                        SELECT_ACTIVITY(A_PSI_MEM);
                }
+               else if (!strcmp(t, K_PSI)) {
+                       SELECT_ACTIVITY(A_PSI_CPU);
+                       SELECT_ACTIVITY(A_PSI_IO);
+                       SELECT_ACTIVITY(A_PSI_MEM);
+               }
                else if (!strcmp(t, K_ALL)) {
                        SELECT_ACTIVITY(A_QUEUE);
                        SELECT_ACTIVITY(A_PSI_CPU);