Browse Source

added host name and build number

Thomas Thuemmler 2 weeks ago
parent
commit
006e54fe5f
1 changed files with 13 additions and 1 deletions
  1. 13 1
      index.php

+ 13 - 1
index.php

@@ -194,14 +194,26 @@ else { echo '<meta http-equiv="refresh" content="120">'; $slowrefresh= true; }
       //echo $loop."  ".$includeflag."  ".$valuesincluded.PHP_EOL;
 
 
+
+
 	// ########## TIME STAMP ##########
 //	echo '<font size="6" color="#FF0000"><b>Deprecated KATRIN Spectrometer and Detector Section Status Overview</b></font><br>';
         echo '<h3 style="font-family: CorporateESC; font-weight: bold; font-style: normal;">KATRIN - Karlsruhe Tritium Neutrino Experiment</h3>';
         echo '<h1 style="font-family: CorporateESC; font-weight: bold; font-style: normal;">Spectrometer and Detector Section Status Overview</h1>';
         echo '<h2 style="font-family: inherit; font-weight: plain; font-style: normal;">Page refreshed:&emsp;' . date(DATE_RFC850) . '</h2>';
         echo '<h2 style="font-family: inherit; font-weight: plain; font-style: normal;">Data extracted:&ensp;&thinsp;&thinsp;&thinsp;&thinsp;' . $extraction_time . '</h2>';
+
+        // ########## Client IP ##########
         echo '<font size="3" color="#FFFFFF">&emsp; &emsp; &emsp; Client IP:' . $ip . ' </font><br>';
-        echo '<font size="3" color="#FFFFFF">&emsp; &emsp; &emsp; Uptime:' . @file_get_contents( "/proc/uptime") . ' </font><br>';
+
+        // ########## Host and build ##########
+        $buildname = getenv("OPENSHIFT_BUILD_NAME");
+        $hostname = getenv("HOSTNAME");
+        if (strlen($hostname) < 1) $hostname="iap-neu-katrin";
+        if (strlen($buildname) < 1) $buildname="not used";
+        echo '<font size="3" color="#FFFFFF">&emsp; &emsp; &emsp; Client IP:' . $ip . '    Host: '.$hostname.'    Build: '.$buildname.' </font><br>';
+
+//        echo '<font size="3" color="#FFFFFF">&emsp; &emsp; &emsp; Uptime:' . @file_get_contents( "/proc/uptime") . ' </font><br>';
 
 //('.  date("s", time() - $extraction_timestamp).'&thinsp;s old data)<br>';