diff options
author | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-08-30 07:33:44 +0000 |
---|---|---|
committer | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-08-30 07:33:44 +0000 |
commit | 71a100254b626b45ed75005ac218c3dda1260a8b (patch) | |
tree | 12c243b7045790ca26d8323cbfb1caeea87782d6 | |
parent | e8a42c01c573311c587920e6d7ebacb747284ea9 (diff) | |
download | zabbix-71a100254b626b45ed75005ac218c3dda1260a8b.tar.gz zabbix-71a100254b626b45ed75005ac218c3dda1260a8b.tar.xz zabbix-71a100254b626b45ed75005ac218c3dda1260a8b.zip |
ported r3240 (fixed 'cpu.util' for Tru64) from 1.1.2
git-svn-id: svn://svn.zabbix.com/trunk@3244 97f52cf1-0a1b-0410-bd0e-c28be96e8082
-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) |