From aa8584f717d75cbd1efca300206dc4713d255335 Mon Sep 17 00:00:00 2001 From: hugetoad Date: Thu, 1 Sep 2005 12:59:15 +0000 Subject: - all CPU-related metrics renamed to system.cpu.xxx (Alexei) git-svn-id: svn://svn.zabbix.com/trunk@2020 97f52cf1-0a1b-0410-bd0e-c28be96e8082 --- src/libs/zbxsysinfo/cpu.c | 24 ++++++++++++------------ src/libs/zbxsysinfo/sysinfo.c | 40 ++++++++++++++++++++++++++++------------ 2 files changed, 40 insertions(+), 24 deletions(-) (limited to 'src/libs/zbxsysinfo') diff --git a/src/libs/zbxsysinfo/cpu.c b/src/libs/zbxsysinfo/cpu.c index 38cd9757..7a26b569 100644 --- a/src/libs/zbxsysinfo/cpu.c +++ b/src/libs/zbxsysinfo/cpu.c @@ -139,61 +139,61 @@ #include "common.h" #include "sysinfo.h" -int CPUIDLE1(const char *cmd, const char *param,double *value) +int SYSTEM_CPU_IDLE1(const char *cmd, const char *param,double *value) { return get_stat("cpu[idle1]",value); } -int CPUIDLE5(const char *cmd, const char *param,double *value) +int SYSTEM_CPU_IDLE5(const char *cmd, const char *param,double *value) { return get_stat("cpu[idle5]",value); } -int CPUIDLE15(const char *cmd, const char *param,double *value) +int SYSTEM_CPU_IDLE15(const char *cmd, const char *param,double *value) { return get_stat("cpu[idle15]",value); } -int CPUNICE1(const char *cmd, const char *param,double *value) +int SYSTEM_CPU_NICE1(const char *cmd, const char *param,double *value) { return get_stat("cpu[nice1]",value); } -int CPUNICE5(const char *cmd, const char *param,double *value) +int SYSTEM_CPU_NICE5(const char *cmd, const char *param,double *value) { return get_stat("cpu[nice5]",value); } -int CPUNICE15(const char *cmd, const char *param,double *value) +int SYSTEM_CPU_NICE15(const char *cmd, const char *param,double *value) { return get_stat("cpu[nice15]",value); } -int CPUUSER1(const char *cmd, const char *param,double *value) +int SYSTEM_CPU_USER1(const char *cmd, const char *param,double *value) { return get_stat("cpu[user1]",value); } -int CPUUSER5(const char *cmd, const char *param,double *value) +int SYSTEM_CPU_USER5(const char *cmd, const char *param,double *value) { return get_stat("cpu[user5]",value); } -int CPUUSER15(const char *cmd, const char *param,double *value) +int SYSTEM_CPU_USER15(const char *cmd, const char *param,double *value) { return get_stat("cpu[user15]",value); } -int CPUSYSTEM1(const char *cmd, const char *param,double *value) +int SYSTEM_CPU_SYS1(const char *cmd, const char *param,double *value) { return get_stat("cpu[system1]",value); } -int CPUSYSTEM5(const char *cmd, const char *param,double *value) +int SYSTEM_CPU_SYS5(const char *cmd, const char *param,double *value) { return get_stat("cpu[system5]",value); } -int CPUSYSTEM15(const char *cmd, const char *param,double *value) +int SYSTEM_CPU_SYS15(const char *cmd, const char *param,double *value) { return get_stat("cpu[system15]",value); } diff --git a/src/libs/zbxsysinfo/sysinfo.c b/src/libs/zbxsysinfo/sysinfo.c index 4477afed..2ab03b7b 100644 --- a/src/libs/zbxsysinfo/sysinfo.c +++ b/src/libs/zbxsysinfo/sysinfo.c @@ -184,21 +184,37 @@ COMMAND agent_commands[]= {"file[*]" ,FS_FILE_EXISTS, 0, "/etc/passwd"}, {"fs.file.exists[*]" ,FS_FILE_EXISTS, 0, "/etc/passwd"}, - {"cpu[idle1]" ,CPUIDLE1, 0, 0}, - {"cpu[idle5]" ,CPUIDLE5, 0, 0}, - {"cpu[idle15]" ,CPUIDLE15, 0, 0}, + {"cpu[idle1]" ,SYSTEM_CPU_IDLE1, 0, 0}, + {"cpu[idle5]" ,SYSTEM_CPU_IDLE5, 0, 0}, + {"cpu[idle15]" ,SYSTEM_CPU_IDLE15, 0, 0}, - {"cpu[nice1]" ,CPUNICE1, 0, 0}, - {"cpu[nice5]" ,CPUNICE5, 0, 0}, - {"cpu[nice15]" ,CPUNICE15, 0, 0}, + {"system.cpu.idle1" ,SYSTEM_CPU_IDLE1, 0, 0}, + {"system.cpu.idle5" ,SYSTEM_CPU_IDLE5, 0, 0}, + {"system.cpu.idle15" ,SYSTEM_CPU_IDLE15, 0, 0}, - {"cpu[user1]" ,CPUUSER1, 0, 0}, - {"cpu[user5]" ,CPUUSER5, 0, 0}, - {"cpu[user15]" ,CPUUSER15, 0, 0}, + {"cpu[nice1]" ,SYSTEM_CPU_NICE1, 0, 0}, + {"cpu[nice5]" ,SYSTEM_CPU_NICE5, 0, 0}, + {"cpu[nice15]" ,SYSTEM_CPU_NICE15, 0, 0}, - {"cpu[system1]" ,CPUSYSTEM1, 0, 0}, - {"cpu[system5]" ,CPUSYSTEM5, 0, 0}, - {"cpu[system15]" ,CPUSYSTEM15, 0, 0}, + {"system.cpu.nice1" ,SYSTEM_CPU_NICE1, 0, 0}, + {"system.cpu.nice5" ,SYSTEM_CPU_NICE5, 0, 0}, + {"system.cpu.nice15" ,SYSTEM_CPU_NICE15, 0, 0}, + + {"cpu[user1]" ,SYSTEM_CPU_USER1, 0, 0}, + {"cpu[user5]" ,SYSTEM_CPU_USER5, 0, 0}, + {"cpu[user15]" ,SYSTEM_CPU_USER15, 0, 0}, + + {"system.cpu.user1" ,SYSTEM_CPU_USER1, 0, 0}, + {"system.cpu.user5" ,SYSTEM_CPU_USER5, 0, 0}, + {"system.cpu.user15" ,SYSTEM_CPU_USER15, 0, 0}, + + {"cpu[system1]" ,SYSTEM_CPU_SYS1, 0, 0}, + {"cpu[system5]" ,SYSTEM_CPU_SYS5, 0, 0}, + {"cpu[system15]" ,SYSTEM_CPU_SYS15, 0, 0}, + + {"system.cpu.sys1" ,SYSTEM_CPU_SYS1, 0, 0}, + {"system.cpu.sys5" ,SYSTEM_CPU_SYS5, 0, 0}, + {"system.cpu.sys15" ,SYSTEM_CPU_SYS15, 0, 0}, {"netloadin1[*]" ,NETLOADIN1, 0, "lo"}, {"netloadin5[*]" ,NETLOADIN5, 0, "lo"}, -- cgit