diff options
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | src/libs/zbxsysinfo/osf/cpu.c | 8 |
2 files changed, 5 insertions, 4 deletions
@@ -1,5 +1,6 @@ Changes for 1.3: + - fixed 'system.cpu.util[*]' for Tru64 (Eugene) - disabled exit code handling of UserParameter scripts (Eugene) - improved UserParameter substitution (Eugene) - improved definition of integer and float point types (Eugene) diff --git a/src/libs/zbxsysinfo/osf/cpu.c b/src/libs/zbxsysinfo/osf/cpu.c index 8cdd5179..7d42ba91 100644 --- a/src/libs/zbxsysinfo/osf/cpu.c +++ b/src/libs/zbxsysinfo/osf/cpu.c @@ -29,22 +29,22 @@ int OLD_CPU(const char *cmd, const char *param, unsigned flags, AGENT_RESULT static int SYSTEM_CPU_IDLE1(const char *cmd, const char *param, unsigned flags, AGENT_RESULT *result) { - return EXECUTE_INT(cmd, "iostat | tail -n 1 | awk '{printf(\"%s\",$(NF))}'", flags, result); + return EXECUTE_INT(cmd, "iostat 1 2 | tail -n 1 | awk '{printf(\"%s\",$(NF))}'", flags, result); } static int SYSTEM_CPU_SYS1(const char *cmd, const char *param, unsigned flags, AGENT_RESULT *result) { - return EXECUTE_INT(cmd, "iostat | tail -n 1 | awk '{printf(\"%s\",$(NF-1))}'", flags, result); + return EXECUTE_INT(cmd, "iostat 1 2 | tail -n 1 | awk '{printf(\"%s\",$(NF-1))}'", flags, result); } static int SYSTEM_CPU_NICE1(const char *cmd, const char *param, unsigned flags, AGENT_RESULT *result) { - return EXECUTE_INT(cmd, "iostat | tail -n 1 | awk '{printf(\"%s\",$(NF-2))}'", flags, result); + return EXECUTE_INT(cmd, "iostat 1 2 | tail -n 1 | awk '{printf(\"%s\",$(NF-2))}'", flags, result); } static int SYSTEM_CPU_USER1(const char *cmd, const char *param, unsigned flags, AGENT_RESULT *result) { - return EXECUTE_INT(cmd, "iostat | tail -n 1 | awk '{printf(\"%s\",$(NF-3))}'", flags, result); + return EXECUTE_INT(cmd, "iostat 1 2 | tail -n 1 | awk '{printf(\"%s\",$(NF-3))}'", flags, result); } int SYSTEM_CPU_UTIL(const char *cmd, const char *param, unsigned flags, AGENT_RESULT *result) |