diff options
| author | alex <alex@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-11-15 21:58:15 +0000 |
|---|---|---|
| committer | alex <alex@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-11-15 21:58:15 +0000 |
| commit | aa5625aedb61676a3d82068cce0146fa64fa4d35 (patch) | |
| tree | cbf956246dbce3d014153813201dcfb91993d2b5 /src | |
| parent | 2c588e4eb27d43d8a0fe2ee19319a131f6454b4f (diff) | |
| download | zabbix-aa5625aedb61676a3d82068cce0146fa64fa4d35.tar.gz zabbix-aa5625aedb61676a3d82068cce0146fa64fa4d35.tar.xz zabbix-aa5625aedb61676a3d82068cce0146fa64fa4d35.zip | |
- [ZBX-106] support of 16 processors for system.cpu.util[], other fixes (Alexei)
[svn merge -r5054:5057 svn://svn.zabbix.com/branches/1.4]
git-svn-id: svn://svn.zabbix.com/trunk@5058 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'src')
| -rw-r--r-- | src/libs/zbxsysinfo/linux/cpu.c | 2 | ||||
| -rw-r--r-- | src/zabbix_agent/cpustat.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/libs/zbxsysinfo/linux/cpu.c b/src/libs/zbxsysinfo/linux/cpu.c index 4761369d..54858a92 100644 --- a/src/libs/zbxsysinfo/linux/cpu.c +++ b/src/libs/zbxsysinfo/linux/cpu.c @@ -125,7 +125,7 @@ int SYSTEM_CPU_UTIL(const char *cmd, const char *param, unsigned flags, AGENT_RE } else { - cpu_num = atoi(cpuname)+1; + cpu_num = atoi(cpuname); if ((cpu_num < 1) || (cpu_num > collector->cpus.count)) return SYSINFO_RET_FAIL; } diff --git a/src/zabbix_agent/cpustat.h b/src/zabbix_agent/cpustat.h index 6b05b371..f437243d 100644 --- a/src/zabbix_agent/cpustat.h +++ b/src/zabbix_agent/cpustat.h @@ -41,7 +41,7 @@ typedef struct s_cpus_stat_data { - ZBX_SINGLE_CPU_STAT_DATA cpu[MAX_CPU]; + ZBX_SINGLE_CPU_STAT_DATA cpu[MAX_CPU+1]; int count; double load1; @@ -91,7 +91,7 @@ typedef struct s_cpus_stat_data { - ZBX_SINGLE_CPU_STAT_DATA cpu[MAX_CPU]; + ZBX_SINGLE_CPU_STAT_DATA cpu[MAX_CPU+1]; int count; } ZBX_CPUS_STAT_DATA; |
