Commit d4530214 authored by Florence Guitton's avatar Florence Guitton

add log

parent 7f165431
allsky.jpg

49.8 KB | W: | H:

allsky.jpg

105 KB | W: | H:

allsky.jpg
allsky.jpg
allsky.jpg
allsky.jpg
  • 2-up
  • Swipe
  • Onion skin
......@@ -108,15 +108,39 @@ include "client.php";
</td></tr>
<tr>
<td><center>OBSERVATIONS</center></td>
<td><center>log</center></td>
<td><center>log</center>
<?php
$path='/METEOSPACE-C-DATA/picardsol/DATA/journaux_pilotage_sodism2/';
exec('ls -ltr '.$path, $chaine) ;
$info=explode(" ",$chaine[count($chaine)-1]);
//echo '<p> le fichier :'.$path.$info[count($info)-1].'</p>';
exec('tail -3 '.$path.$info[count($info)-1], $chaine1) ;
for ($i=0; $i<count($chaine1); $i++){
echo '<p style="Color:green" >'.$chaine1[$i].'<br></p>';
}
$chaine="";
$info="";
?>
</td>
<td rowspan=3><center>ALARMES</center></td>
<td rowspan=2><center>HK FONDAMENTAUX</center></td>
</tr>
<tr><td colspan=2><center> etat disque</center>
<!-- en rouge si >90% -->
<?php exec('df -h /', $chaine) ;
$info=explode(" ",$chaine[2]);
$number= (double)substr($info[4],-5,2);
<?php
$chaine="";
$info="";
$number="";
exec('df -h /', $chaine) ;
$info=explode(" ",$chaine[1]);
$number= substr($info[count($info)-1], -5,2);//pas propre
if ($number<90){
echo '<p style="Color:green" >disque: '.explode(" ",$info[4])[1].', occupation: '.$number.'%</p>';
//echo '<p style="Color:green" >disque: '.$chaine[2].', occupation: '.$number.'%</p>';
......@@ -127,8 +151,10 @@ else{
?>
<?php exec('df -h /METEOSPACE-C-DATA', $chaine2);
$number2= (double)substr(explode(" ",$chaine2[1])[4],0,2);
<?php
exec('df -h /METEOSPACE-C-DATA', $chaine2);
$info2=explode(" ",$chaine2[1]);
$number2=substr(explode(" ",$info2[count($info2)-1])[0],-3,2);//pas propre
if ($number2<90){
echo '<p style="Color:green" >disque: '.explode(" ",explode(" ",$chaine2[1])[4])[2].', occupation: '.$number2.'%</p>';
}
......
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