Skip to content
Permalink
Browse files

0.9.8.rc1

  • Loading branch information...
stdonato
stdonato committed May 30, 2019
1 parent e5cccb4 commit 3a89f0085a221d7ad76d1104df6df6c634bd7f14
Showing with 25 additions and 9 deletions.
  1. +3 −0 front/sh/df.php
  2. 0 front/sh/index.html
  3. +2 −1 front/sh/issue.php
  4. +2 −2 front/sh/load.php
  5. +0 −3 front/sh/media.php
  6. +3 −0 front/sh/mem.php
  7. +3 −0 front/sh/traf.php
  8. +12 −3 front/sh/uptime.php
@@ -1,5 +1,8 @@
<?php
Session::checkLoginUser();
Session::checkRight("profile", READ);
$disk = exec('/bin/df -hm |grep sd | awk \'{print $1","$2","$3","$4","$5","$6}\'', $result);
$count = exec('/bin/df -h |grep sd | awk \'{print $1","$2","$3","$4","$5","$6}\' |wc -l');
No changes.
@@ -1,6 +1,7 @@
<?php
//header('Content-Type: application/json; charset=UTF-8');
Session::checkLoginUser();
Session::checkRight("profile", READ);
if(file_exists('/usr/bin/lsb_release')) {
echo substr(shell_exec('/usr/bin/lsb_release -ds'),0,21); //ubuntu - debian
@@ -1,14 +1,14 @@
<?php
// /bin/cat /proc/loadavg | /usr/bin/awk '{print $1","$2","$3}'
Session::checkLoginUser();
Session::checkRight("profile", READ);
$cores = exec('/bin/grep -c ^processor /proc/cpuinfo');
$loadavg = exec('/bin/cat /proc/loadavg | /usr/bin/awk \'{print $2}\'');
$load = round(($loadavg*100)/$cores ,1);
//$load = $perc;
if($cores == 1) {
$ncores = '1 core'; }
@@ -8,9 +8,6 @@
Session::checkLoginUser();
Session::checkRight("profile", READ);
//$ver = explode(" ",implode(" ",plugin_version_dashboard()));
// count years
$query_y = "SELECT DISTINCT DATE_FORMAT( date, '%Y' ) AS year
FROM glpi_tickets
@@ -1,5 +1,8 @@
<?php
Session::checkLoginUser();
Session::checkRight("profile", READ);
$totalm = exec('/usr/bin/free -tm | /usr/bin/awk \'{print $1","$2","$3-$6-$7","$4+$6+$7}\' |grep -i mem: |cut -f2 -d,');
$usedm = exec('/usr/bin/free -tm | /usr/bin/awk \'{print $1","$2","$3","$4+$6+$7}\' |grep -i mem: |cut -f3 -d,');
@@ -1,5 +1,8 @@
<?php
Session::checkLoginUser();
Session::checkRight("profile", READ);
$interval = 2;
$tx_path = 'cat /sys/class/net/eth0/statistics/tx_bytes';
@@ -1,6 +1,13 @@
<?php
$totalSeconds1 = shell_exec("/usr/bin/cut -d. -f1 /proc/uptime");
Session::checkLoginUser();
Session::checkRight("profile", READ);
$uptime = shell_exec('uptime |cut -d" " -f4-8');
echo $uptime;
/*$totalSeconds1 = shell_exec("/usr/bin/cut -d'.' -f1 /proc/uptime");
$totalSeconds = strtotime($totalSeconds1);
$totalMin = $totalSeconds / 60;
$totalHours = $totalMin / 60;
@@ -10,6 +17,7 @@
$min = floor($totalMin - ($days * 60 * 24) - ($hours * 60));
$formatUptime = '';
if ($days != 0) {
$formatUptime .= "$days d ";
}
@@ -22,5 +30,6 @@
$formatUptime .= "$min m";
}
//header('Content-Type: application/json; charset=UTF-8');
echo ($formatUptime);
echo ($formatUptime);*/
?>

0 comments on commit 3a89f00

Please sign in to comment.
You can’t perform that action at this time.