aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--inc/html.inc.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/inc/html.inc.php b/inc/html.inc.php
index e6c6f6d..b4d295a 100644
--- a/inc/html.inc.php
+++ b/inc/html.inc.php
@@ -191,8 +191,6 @@ function host_summary($cat, $hosts) {
191 foreach($hosts as $host) { 191 foreach($hosts as $host) {
192 $host_counter++; 192 $host_counter++;
193 193
194 $cores = count(group_plugindata(collectd_plugindata($host, 'cpu')));
195
196 printf('<tr class="%s">', $row_style[$host_counter % 2]); 194 printf('<tr class="%s">', $row_style[$host_counter % 2]);
197 printf('<th><a href="%shost.php?h=%s">%s</a></th>', 195 printf('<th><a href="%shost.php?h=%s">%s</a></th>',
198 $CONFIG['weburl'],$host, $host); 196 $CONFIG['weburl'],$host, $host);
@@ -209,6 +207,8 @@ function host_summary($cat, $hosts) {
209 isset($rrd_info['ds[midterm].last_ds']) && 207 isset($rrd_info['ds[midterm].last_ds']) &&
210 isset($rrd_info['ds[longterm].last_ds'])) { 208 isset($rrd_info['ds[longterm].last_ds'])) {
211 209
210 $cores = count(group_plugindata(collectd_plugindata($host, 'cpu')));
211
212 foreach (array('ds[shortterm].last_ds', 'ds[midterm].last_ds', 'ds[longterm].last_ds') as $info) { 212 foreach (array('ds[shortterm].last_ds', 'ds[midterm].last_ds', 'ds[longterm].last_ds') as $info) {
213 $class = ''; 213 $class = '';
214 if ($cores > 0 && $rrd_info[$info] > $cores * 2) 214 if ($cores > 0 && $rrd_info[$info] > $cores * 2)