- System : fix to get the distro name

- Services : fix on service names with accent
- Services : ability to specify a host for each service
- Network usage : fix to retrieve the name of the network interfaces
- Memory : the cached and buffers memory are added to free memory now
- Load Average : taking into account the number of cores
- Disk usage : new option to hide tmpfs mountpoints
- General : remove all PHP short tags
This commit is contained in:
ShevAbam
2014-06-18 10:15:18 +02:00
parent 20705a550d
commit 3f6a49bae3
11 changed files with 50 additions and 27 deletions
+6 -9
View File
@@ -1,9 +1,11 @@
<?php
require 'Utils/Misc.class.php';
require 'Utils/Config.class.php';
$Config = new Config();
$datas = array();
if (!(exec('/bin/df | awk \'{print $2","$3","$4","$5","$6}\'', $df)))
if (!(exec('/bin/df -T | tail -n +2 | awk \'{print $2","$3","$4","$5","$6","$7}\'', $df)))
{
$datas[] = array(
'total' => 'N.A',
@@ -15,19 +17,14 @@ if (!(exec('/bin/df | awk \'{print $2","$3","$4","$5","$6}\'', $df)))
}
else
{
$first_line = false;
$mounted_points = array();
foreach ($df as $mounted)
{
if ($first_line === false)
{
$first_line = true;
continue;
}
list($type, $total, $used, $free, $percent, $mount) = explode(',', $mounted);
list($total, $used, $free, $percent, $mount) = explode(',', $mounted);
if (strpos($type, 'tmpfs') !== false && $Config->get('disk:show_tmpfs') === false)
continue;
if (!in_array($mount, $mounted_points))
{