summaryrefslogtreecommitdiffstats
path: root/usr/local/www/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'usr/local/www/widgets')
-rw-r--r--usr/local/www/widgets/include/thermal_sensors.inc2
-rw-r--r--usr/local/www/widgets/widgets/system_information.widget.php7
2 files changed, 3 insertions, 6 deletions
diff --git a/usr/local/www/widgets/include/thermal_sensors.inc b/usr/local/www/widgets/include/thermal_sensors.inc
index 2ebc31d..e193b15 100644
--- a/usr/local/www/widgets/include/thermal_sensors.inc
+++ b/usr/local/www/widgets/include/thermal_sensors.inc
@@ -19,7 +19,7 @@ $thermal_sensors_widget_title = "Thermal Sensors";
//NOTE: depends on proper cofing in System >> Advanced >> Miscellaneous tab >> Thermal Sensors section.
function getThermalSensorsData() {
- exec("/sbin/sysctl -a | grep temperature", $dfout);
+ $_gb = exec("/sbin/sysctl -a | grep temperature", $dfout);
$thermalSensorsData = join("|", $dfout);
return $thermalSensorsData;
diff --git a/usr/local/www/widgets/widgets/system_information.widget.php b/usr/local/www/widgets/widgets/system_information.widget.php
index 3705937..694eefd 100644
--- a/usr/local/www/widgets/widgets/system_information.widget.php
+++ b/usr/local/www/widgets/widgets/system_information.widget.php
@@ -167,10 +167,7 @@ $filesystems = get_mounted_filesystems();
<td width="25%" class="vncellt"><?=gettext("CPU Type");?></td>
<td width="75%" class="listr">
<?php
- $cpumodel = "";
- exec("/sbin/sysctl -n hw.model", $cpumodel);
- $cpumodel = implode(" ", $cpumodel);
- echo (htmlspecialchars($cpumodel));
+ echo (htmlspecialchars(get_single_sysctl("hw.model")));
?>
<div id="cpufreq"><?= get_cpufreq(); ?></div>
<?php $cpucount = get_cpu_count();
@@ -264,7 +261,7 @@ $filesystems = get_mounted_filesystems();
<td width="75%" class="listr">
<?php $memUsage = mem_usage(); ?>
<div id="memUsagePB"></div>
- <span id="memusagemeter"><?= $memUsage.'%'; ?></span> of <?= sprintf("%.0f", `/sbin/sysctl -n hw.physmem` / (1024*1024)) ?> MB
+ <span id="memusagemeter"><?= $memUsage.'%'; ?></span> of <?= sprintf("%.0f", get_single_sysctl('hw.physmem') / (1024*1024)) ?> MB
</td>
</tr>
<?php if($showswap == true): ?>
OpenPOWER on IntegriCloud