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:
parent
16a0797900
commit
43f1c10396
|
|
@ -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) {
|
||||||
|
|
@ -237,7 +237,7 @@ $document['title'] = $text['title-sys-status'];
|
||||||
//freebsd
|
//freebsd
|
||||||
if (stristr(PHP_OS, 'FreeBSD')) {
|
if (stristr(PHP_OS, 'FreeBSD')) {
|
||||||
echo "<!--\n";
|
echo "<!--\n";
|
||||||
$shellcmd='sysctl vm.vmtotal';
|
$shellcmd = 'sysctl vm.vmtotal';
|
||||||
$shell_result = shell_exec($shellcmd);
|
$shell_result = shell_exec($shellcmd);
|
||||||
echo "-->\n";
|
echo "-->\n";
|
||||||
if (strlen($shell_result) > 0) {
|
if (strlen($shell_result) > 0) {
|
||||||
|
|
@ -267,7 +267,7 @@ $document['title'] = $text['title-sys-status'];
|
||||||
//linux
|
//linux
|
||||||
if (stristr(PHP_OS, 'Linux')) {
|
if (stristr(PHP_OS, 'Linux')) {
|
||||||
echo "<!--\n";
|
echo "<!--\n";
|
||||||
$shellcmd="ps -e -o pcpu,cpu,nice,state,cputime,args --sort pcpu | sed '/^ 0.0 /d'";
|
$shellcmd = "ps -e -o pcpu,cpu,nice,state,cputime,args --sort pcpu | sed '/^ 0.0 /d'";
|
||||||
$shell_result = shell_exec($shellcmd);
|
$shell_result = shell_exec($shellcmd);
|
||||||
echo "-->\n";
|
echo "-->\n";
|
||||||
if (strlen($shell_result) > 0) {
|
if (strlen($shell_result) > 0) {
|
||||||
|
|
@ -302,7 +302,7 @@ $document['title'] = $text['title-sys-status'];
|
||||||
//freebsd
|
//freebsd
|
||||||
if (stristr(PHP_OS, 'FreeBSD')) {
|
if (stristr(PHP_OS, 'FreeBSD')) {
|
||||||
echo "<!--\n";
|
echo "<!--\n";
|
||||||
$shellcmd='top';
|
$shellcmd = 'top';
|
||||||
$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";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue