diff options
-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): ?> |