summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2001-09-27 08:53:33 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2001-09-27 08:53:33 +0000
commit46e9153f5a8d8793d003139d34282cd4997d3c7c (patch)
tree945a82560aaefaaa2bb90d1bb3d8b54ea0e898b9 /src
parent046f94dddfa5e3e4cd69dc8625c439c2b5e5a445 (diff)
downloadzabbix-46e9153f5a8d8793d003139d34282cd4997d3c7c.tar.gz
zabbix-46e9153f5a8d8793d003139d34282cd4997d3c7c.tar.xz
zabbix-46e9153f5a8d8793d003139d34282cd4997d3c7c.zip
Added define HAVE_PROC_LOADAVG (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@223 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'src')
-rw-r--r--src/zabbix_agent/sysinfo.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/zabbix_agent/sysinfo.c b/src/zabbix_agent/sysinfo.c
index 55e09865..65ca4940 100644
--- a/src/zabbix_agent/sysinfo.c
+++ b/src/zabbix_agent/sysinfo.c
@@ -134,7 +134,9 @@ COMMAND commands[]=
{"system[procload5]" ,PROCLOAD5, 0},
{"system[procload15]" ,PROCLOAD15, 0},
{"system[proccount]" ,PROCCOUNT, 0},
+#ifdef HAVE_PROC_LOADAVG
{"system[procrunning]" ,EXECUTE, "cat /proc/loadavg|cut -f1 -d'/'|cut -f4 -d' '"},
+#endif
{"system[uptime]" ,UPTIME, 0},
{"system[users]" ,EXECUTE, "who|wc -l"},
@@ -628,7 +630,7 @@ float PROCLOAD(void)
return dyn.psd_avg_1_min;
}
#else
-#ifdef HAVE_PROC
+#ifdef HAVE_PROC_LOADAVG
return getPROC("/proc/loadavg",1,1);
#else
return FAIL;
@@ -663,7 +665,7 @@ float PROCLOAD5(void)
return dyn.psd_avg_5_min;
}
#else
-#ifdef HAVE_PROC
+#ifdef HAVE_PROC_LOADAVG
return getPROC("/proc/loadavg",1,2);
#else
return FAIL;
@@ -698,7 +700,7 @@ float PROCLOAD15(void)
return dyn.psd_avg_5_min;
}
#else
-#ifdef HAVE_PROC
+#ifdef HAVE_PROC_LOADAVG
return getPROC("/proc/loadavg",1,3);
#else
return FAIL;