From: <ber...@us...> - 2010-07-12 19:57:35
|
Revision: 2309 http://ganglia.svn.sourceforge.net/ganglia/?rev=2309&view=rev Author: bernardli Date: 2010-07-12 19:57:28 +0000 (Mon, 12 Jul 2010) Log Message: ----------- [web] Fix Bugzilla #266: 1 GHz = 1000 MHz, not 1024. Reported-by: Hristo Iliev <bug...@ic...> Modified Paths: -------------- trunk/monitor-core/web/functions.php trunk/monitor-core/web/show_node.php Modified: trunk/monitor-core/web/functions.php =================================================================== --- trunk/monitor-core/web/functions.php 2010-07-05 16:08:21 UTC (rev 2308) +++ trunk/monitor-core/web/functions.php 2010-07-12 19:57:28 UTC (rev 2309) @@ -305,7 +305,7 @@ # Give memory in Gigabytes. 1GB = 2^20 bytes. $mem_total_gb = $m['mem_total']['VAL']/1048576; $load_one=$m['load_one']['VAL']; - $cpu_speed=$m['cpu_speed']['VAL']/1024; + $cpu_speed=round($m['cpu_speed']['VAL']/1000, 2); $cpu_num= $m['cpu_num']['VAL']; # # The nested tables are to get the formatting. Insane. Modified: trunk/monitor-core/web/show_node.php =================================================================== --- trunk/monitor-core/web/show_node.php 2010-07-05 16:08:21 UTC (rev 2308) +++ trunk/monitor-core/web/show_node.php 2010-07-12 19:57:28 UTC (rev 2309) @@ -54,7 +54,7 @@ $cpu_num=$metrics['cpu_num']['VAL']; # Cannot be zero, since we use it as a divisor. if (!$cpu_num) { $cpu_num=1; } -$cpu_speed=$metrics['cpu_speed']['VAL']/1024; +$cpu_speed=round($metrics['cpu_speed']['VAL']/1000, 2); $disk_total=$metrics['disk_total']['VAL']; $disk_free=$metrics['disk_free']['VAL']; $disk_use = $disk_total - $disk_free; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |