mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Merge pull request #3950 from marcelloc/patch-5
This commit is contained in:
commit
fc00cb2082
@ -177,7 +177,7 @@ function disk_usage($slice = '/') {
|
||||
}
|
||||
|
||||
function swap_usage() {
|
||||
exec("/usr/sbin/swapinfo", $swap_info);
|
||||
exec("/usr/sbin/swapinfo | /usr/bin/tail -1", $swap_info);
|
||||
$swap_used = "";
|
||||
foreach ($swap_info as $line) {
|
||||
if (preg_match('/(\d+)%$/', $line, $matches)) {
|
||||
|
||||
@ -435,7 +435,7 @@ $temp_use_f = (isset($user_settings['widgets']['thermal_sensors-0']) && !empty($
|
||||
<div class="progress-bar progress-bar-striped" role="progressbar" aria-valuenow="<?=$swapusage?>" aria-valuemin="0" aria-valuemax="100" style="width: <?=$swapusage?>%">
|
||||
</div>
|
||||
</div>
|
||||
<span><?=$swapusage?>% of <?= sprintf("%.0f", `/usr/sbin/swapinfo -m | /usr/bin/grep -v Device | /usr/bin/awk '{ print $2;}'`) ?> MiB</span>
|
||||
<span><?=$swapusage?>% of <?= sprintf("%.0f", `/usr/sbin/swapinfo -m | /usr/bin/tail -1 | /usr/bin/awk '{ print $2;}'`) ?> MiB</span>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user