diff options
-rw-r--r-- | include/sysinfo.h | 4 | ||||
-rw-r--r-- | src/libs/zbxsysinfo/linux/cpu.c | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/include/sysinfo.h b/include/sysinfo.h index 4d48cda4d05..aa5a1701719 100644 --- a/include/sysinfo.h +++ b/include/sysinfo.h @@ -141,7 +141,9 @@ extern int CONFIG_UNSAFE_USER_PARAMETERS; #define ZBX_CPU_STATE_IOWAIT 5 #define ZBX_CPU_STATE_SOFTIRQ 6 #define ZBX_CPU_STATE_STEAL 7 -#define ZBX_CPU_STATE_COUNT 8 +#define ZBX_CPU_STATE_GCPU 8 +#define ZBX_CPU_STATE_GNICE 9 +#define ZBX_CPU_STATE_COUNT 10 #define ZBX_PROC_STAT_ALL 0 #define ZBX_PROC_STAT_RUN 1 diff --git a/src/libs/zbxsysinfo/linux/cpu.c b/src/libs/zbxsysinfo/linux/cpu.c index 5abeb9d7c4b..91f13c4b0ce 100644 --- a/src/libs/zbxsysinfo/linux/cpu.c +++ b/src/libs/zbxsysinfo/linux/cpu.c @@ -140,6 +140,10 @@ int SYSTEM_CPU_UTIL(AGENT_REQUEST *request, AGENT_RESULT *result) state = ZBX_CPU_STATE_SOFTIRQ; else if (0 == strcmp(tmp, "steal")) state = ZBX_CPU_STATE_STEAL; + else if (0 == strcmp(tmp, "guest")) + state = ZBX_CPU_STATE_GCPU; + else if (0 == strcmp(tmp, "guest_nice")) + state = ZBX_CPU_STATE_GNICE; else { SET_MSG_RESULT(result, zbx_strdup(NULL, "Invalid second parameter.")); |