Enhance-system information (#2650)
use human format and wide display for free under linux use posix output format and totals on df under linux make spacing consistent on value assignements
This commit is contained in:
@@ -210,7 +210,7 @@ $document['title'] = $text['title-sys-status'];
|
|||||||
//linux
|
//linux
|
||||||
if (stristr(PHP_OS, 'Linux')) {
|
if (stristr(PHP_OS, 'Linux')) {
|
||||||
echo "<!--\n";
|
echo "<!--\n";
|
||||||
$shellcmd='free';
|
$shellcmd = 'free -hw';
|
||||||
$shell_result = shell_exec($shellcmd);
|
$shell_result = shell_exec($shellcmd);
|
||||||
echo "-->\n";
|
echo "-->\n";
|
||||||
if (strlen($shell_result) > 0) {
|
if (strlen($shell_result) > 0) {
|
||||||
@@ -330,6 +330,10 @@ $document['title'] = $text['title-sys-status'];
|
|||||||
//drive space
|
//drive space
|
||||||
if (permission_exists('system_view_hdd')) {
|
if (permission_exists('system_view_hdd')) {
|
||||||
if (stristr(PHP_OS, 'Linux') || stristr(PHP_OS, 'FreeBSD')) {
|
if (stristr(PHP_OS, 'Linux') || stristr(PHP_OS, 'FreeBSD')) {
|
||||||
|
echo "<!--\n";
|
||||||
|
$shellcmd = 'df -hP --total';
|
||||||
|
$shell_result = shell_exec($shellcmd);
|
||||||
|
echo "-->\n";
|
||||||
echo "<table width=\"100%\" border=\"0\" cellpadding=\"7\" cellspacing=\"0\">\n";
|
echo "<table width=\"100%\" border=\"0\" cellpadding=\"7\" cellspacing=\"0\">\n";
|
||||||
echo "<tr>\n";
|
echo "<tr>\n";
|
||||||
echo " <th class='th' colspan='2' align='left'>".$text['title-drive']."</th>\n";
|
echo " <th class='th' colspan='2' align='left'>".$text['title-drive']."</th>\n";
|
||||||
@@ -340,8 +344,6 @@ $document['title'] = $text['title-sys-status'];
|
|||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
echo " <td class=\"row_style1\">\n";
|
echo " <td class=\"row_style1\">\n";
|
||||||
echo "<pre>\n";
|
echo "<pre>\n";
|
||||||
$shellcmd = 'df -h';
|
|
||||||
$shell_result = shell_exec($shellcmd);
|
|
||||||
echo "$shell_result<br>";
|
echo "$shell_result<br>";
|
||||||
echo "</pre>\n";
|
echo "</pre>\n";
|
||||||
echo " </td>\n";
|
echo " </td>\n";
|
||||||
|
|||||||
Reference in New Issue
Block a user