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';
#Save info to temp file so we dont have to execute command at each call
function createTempDataFile(){
shell_exec("/wr/bin/wr_mon -w > /tmp/wrinfo");
shell_exec("/wr/bin/wr_mon -w > /tmp/www_wr_mon.txt");
}
createTempDataFile();
#Obtain the temperatures
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);
if($sub_id != -1){
$temperatures = $temperatures[$sub_id];
......@@ -28,7 +28,7 @@ function getTemperatures($sub_id = -1){
#Obtain the wr servo timing
function getTiming(){
$ports = shell_exec("cat /tmp/wrinfo | grep SERVO");
$ports = shell_exec("cat /tmp/www_wr_mon.txt | grep SERVO");
$ports = explode(" ", $ports);
$txt = $ports;
return $txt;
......@@ -52,7 +52,7 @@ function getTablePortStatus(){
#Obtain the wr info
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);
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