diff options
author | jim-p <jimp@pfsense.org> | 2010-06-30 11:55:39 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2010-06-30 11:55:39 -0400 |
commit | 81ab3a736c155e9726fa809061d4a2ef2ef1b6a8 (patch) | |
tree | ed461ce11c9b1f9ce3834f9c79cd4d58fb7915b9 /usr/local/www/widgets | |
parent | 5d8cd81abdd4a3b5e2f4af40b9714fd7066e33fb (diff) | |
download | pfsense-81ab3a736c155e9726fa809061d4a2ef2ef1b6a8.zip pfsense-81ab3a736c155e9726fa809061d4a2ef2ef1b6a8.tar.gz |
Show the CPU Frequency on the dashboard if it's not running at full speed (due to powerd)
Diffstat (limited to 'usr/local/www/widgets')
-rw-r--r-- | usr/local/www/widgets/widgets/system_information.widget.php | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/usr/local/www/widgets/widgets/system_information.widget.php b/usr/local/www/widgets/widgets/system_information.widget.php index 066133f..bbdd6b5 100644 --- a/usr/local/www/widgets/widgets/system_information.widget.php +++ b/usr/local/www/widgets/widgets/system_information.widget.php @@ -130,7 +130,19 @@ $curcfg = $config['system']['firmware']; $cpumodel = ""; exec("/sbin/sysctl -n hw.model", $cpumodel); $cpumodel = implode(" ", $cpumodel); - echo (htmlspecialchars($cpumodel)); ?> + echo (htmlspecialchars($cpumodel)); + + $cpufreqs = ""; + exec("/sbin/sysctl -n dev.cpu.0.freq_levels", $cpufreqs); + $cpufreqs = explode(" ", trim($cpufreqs[0])); + $maxfreq = explode("/", $cpufreqs[0]); + $maxfreq = $maxfreq[0]; + $curfreq = ""; + exec("/sbin/sysctl -n dev.cpu.0.freq", $curfreq); + $curfreq = trim($curfreq[0]); + if ($curfreq != $maxfreq) + echo "<br/>Current: {$curfreq} MHz, Max: {$maxfreq} MHz"; + ?> </td> </tr> <?php if ($hwcrypto): ?> |