mirror of
https://github.com/ShaYmez/ezservermonitor-web.git
synced 2026-06-01 13:44:11 -04:00
- 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:
+6
-9
@@ -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))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user