Commit 5a26aa3c authored by Adam Wujek's avatar Adam Wujek 💬

www: rename temp file from /tmp/wrinfo to /tmp/www_wr_mon.txt

Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent 5db3b83f
...@@ -11,14 +11,14 @@ include 'functions.php'; ...@@ -11,14 +11,14 @@ include 'functions.php';
#Save info to temp file so we dont have to execute command at each call #Save info to temp file so we dont have to execute command at each call
function createTempDataFile(){ function createTempDataFile(){
shell_exec("/wr/bin/wr_mon -w > /tmp/wrinfo"); shell_exec("/wr/bin/wr_mon -w > /tmp/www_wr_mon.txt");
} }
createTempDataFile(); createTempDataFile();
#Obtain the temperatures #Obtain the temperatures
function getTemperatures($sub_id = -1){ function getTemperatures($sub_id = -1){
$temperatures=shell_exec("cat /tmp/wrinfo | grep TEMP"); $temperatures=shell_exec("cat /tmp/www_wr_mon.txt | grep TEMP");
$temperatures = split(" ", $temperatures); $temperatures = split(" ", $temperatures);
if($sub_id != -1){ if($sub_id != -1){
$temperatures = $temperatures[$sub_id]; $temperatures = $temperatures[$sub_id];
...@@ -28,7 +28,7 @@ function getTemperatures($sub_id = -1){ ...@@ -28,7 +28,7 @@ function getTemperatures($sub_id = -1){
#Obtain the wr servo timing #Obtain the wr servo timing
function getTiming(){ function getTiming(){
$ports = shell_exec("cat /tmp/wrinfo | grep SERVO"); $ports = shell_exec("cat /tmp/www_wr_mon.txt | grep SERVO");
$ports = explode(" ", $ports); $ports = explode(" ", $ports);
$txt = $ports; $txt = $ports;
return $txt; return $txt;
...@@ -52,7 +52,7 @@ function getTablePortStatus(){ ...@@ -52,7 +52,7 @@ function getTablePortStatus(){
#Obtain the wr info #Obtain the wr info
function getPortStatus(){ function getPortStatus(){
$wrinfo=shell_exec("cat /tmp/wrinfo | grep wri"); $wrinfo=shell_exec("cat /tmp/www_wr_mon.txt | grep wri");
$wrinfo = explode("\n", $wrinfo); $wrinfo = explode("\n", $wrinfo);
return $wrinfo; return $wrinfo;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment