diff options
author | Nathan Scott <nathans@redhat.com> | 2021-08-06 16:45:30 +1000 |
---|---|---|
committer | BenBE <BenBE@geshi.org> | 2021-08-09 07:56:13 +0200 |
commit | 1bd95983b2703cb313ea301367ff3199fabd1f9d (patch) | |
tree | de70612626231c6f522ddf1a43ef36ec041fbb48 /pcp/PCPProcess.h | |
parent | aa0424ade806715ea0f410dc068a1eb648300bb9 (diff) |
Add columns for process autogroup identifier and nice value
Adds AGRP (autogroup) and ANI (autogroup nice) columns that
report the information from /proc/PID/autogroup, as well as
handlers for '{' and '}' to change the autogroup nice value.
This is guarded by /proc/sys/kernel/sched_autogroup_enabled
such that sampling and/or changing values wont be attempted
unless the kernel feature is enabled.
Fixes: #720
Diffstat (limited to 'pcp/PCPProcess.h')
-rw-r--r-- | pcp/PCPProcess.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/pcp/PCPProcess.h b/pcp/PCPProcess.h index 25707f2b..2d1a8b6c 100644 --- a/pcp/PCPProcess.h +++ b/pcp/PCPProcess.h @@ -20,11 +20,12 @@ in the source distribution for its full text. #include "Settings.h" -#define PROCESS_FLAG_LINUX_CGROUP 0x0800 -#define PROCESS_FLAG_LINUX_OOM 0x1000 -#define PROCESS_FLAG_LINUX_SMAPS 0x2000 -#define PROCESS_FLAG_LINUX_CTXT 0x4000 -#define PROCESS_FLAG_LINUX_SECATTR 0x8000 +#define PROCESS_FLAG_LINUX_CGROUP 0x00000800 +#define PROCESS_FLAG_LINUX_OOM 0x00001000 +#define PROCESS_FLAG_LINUX_SMAPS 0x00002000 +#define PROCESS_FLAG_LINUX_CTXT 0x00004000 +#define PROCESS_FLAG_LINUX_SECATTR 0x00008000 +#define PROCESS_FLAG_LINUX_AUTOGROUP 0x00080000 typedef struct PCPProcess_ { Process super; @@ -70,6 +71,8 @@ typedef struct PCPProcess_ { double io_rate_read_bps; double io_rate_write_bps; char* cgroup; + long int autogroup_id; + int autogroup_nice; unsigned int oom; unsigned long long int delay_read_time; unsigned long long cpu_delay_total; |