summaryrefslogtreecommitdiffstats
path: root/src/zabbix_agent
diff options
context:
space:
mode:
authorsasha <sasha@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-01-29 08:55:00 +0000
committersasha <sasha@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-01-29 08:55:00 +0000
commit4ffa6f7a29d17b58416be20bd8cb43dac1952d60 (patch)
tree7f5a60d37e3a44657b36f34f2587be44ca0b5f26 /src/zabbix_agent
parent5b9fce202eb6c9fff9b64d4eacb697a1257c4640 (diff)
downloadzabbix-4ffa6f7a29d17b58416be20bd8cb43dac1952d60.tar.gz
zabbix-4ffa6f7a29d17b58416be20bd8cb43dac1952d60.tar.xz
zabbix-4ffa6f7a29d17b58416be20bd8cb43dac1952d60.zip
- [ZBX-7] support of system.cpu.util[] for FreeBSD agents
[svn merge svn://svn.zabbix.com/branches/1.4 -r5280:5283] git-svn-id: svn://svn.zabbix.com/trunk@5285 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'src/zabbix_agent')
-rw-r--r--src/zabbix_agent/cpustat.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/zabbix_agent/cpustat.c b/src/zabbix_agent/cpustat.c
index b17008d5..63157296 100644
--- a/src/zabbix_agent/cpustat.c
+++ b/src/zabbix_agent/cpustat.c
@@ -270,17 +270,17 @@ static int get_cpustat(
char line[1024];
char cpu_name[10];
- #elif defined(HAVE_SYS_PSTAT_H) /* not HAVE_PROC_STAT */
+ #elif defined(HAVE_SYS_PSTAT_H)
struct pst_dynamic stats;
- struct pst_processor psp;
+ struct pst_processor psp;
- #elif defined(HAVE_SYS_SYSCTL_H) /* HAVE_SYS_SYSCTL_H */
+ #elif defined(HAVE_FUNCTION_SYSCTLBYNAME)
- static long cp_time[5];
- size_t nlen = sizeof(cp_time);
+ static long cp_time[5];
+ size_t nlen = sizeof(cp_time);
- #else /* not HAVE_SYS_SYSCTL_H */
+ #else /* not HAVE_FUNCTION_SYSCTLBYNAME */
return 1;
@@ -353,6 +353,7 @@ static int get_cpustat(
*cpu_idle = (zbx_uint64_t)cp_time[4];
#endif /* HAVE_FUNCTION_SYSCTLBYNAME */
+
return 0;
}