diff --git a/index.php b/index.php
index fbf0c09..fae9439 100644
--- a/index.php
+++ b/index.php
@@ -174,6 +174,14 @@
Bogomips |
|
+
+ | Running Processes |
+ |
+
+
+ | Total Processes |
+ |
+
get('cpu:enable_temperature')): ?>
| Temperature |
diff --git a/libs/cpu.php b/libs/cpu.php
index 9665c87..b789d38 100644
--- a/libs/cpu.php
+++ b/libs/cpu.php
@@ -12,6 +12,8 @@
$cache = 'N.A';
$bogomips = 'N.A';
$temp = 'N.A';
+$runningproc= 'N.A';
+$totalproc = 'N.A';
if ($cpuinfo = shell_exec('cat /proc/cpuinfo'))
{
@@ -78,6 +80,18 @@
}
}
+//Process running / total
+if (!($processestmp=shell_exec('cat /proc/loadavg | awk \'{print $4}\'')))
+{
+ $processes=0;
+}
+else
+{
+ $procsplit=explode("/",$processestmp);
+ $runningproc=(int)$procsplit[0];
+ $totalproc=(int)$procsplit[1];
+}
+
$datas = array(
'model' => $model,
@@ -86,6 +100,8 @@
'cache' => $cache,
'bogomips' => $bogomips,
'temp' => $temp,
+ 'runningproc'=> $runningproc,
+ 'totalproc' => $totalproc,
);
-echo json_encode($datas);
\ No newline at end of file
+echo json_encode($datas);