mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Show the CPU Frequency on the dashboard if it's not running at full speed (due to powerd)
This commit is contained in:
parent
5d8cd81abd
commit
81ab3a736c
@ -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): ?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user