Index: tools/eLogStatus/eLogStatus.cc
===================================================================
--- tools/eLogStatus/eLogStatus.cc	(revision 270)
+++ tools/eLogStatus/eLogStatus.cc	(revision 272)
@@ -1,4 +1,7 @@
 //
 // Generate status.xml for elogbook status display
+//
+// Copy executable to /srv/www/htdocs/FACTelog/bin/ and
+// change owner to 'tomcat'.
 //
 // Oliver Grimm, 29/7/2010
@@ -14,6 +17,8 @@
 int main() {
 
+  string Status1, Status2, Status3, Status4, Status5;
+
   // Open file
-  ofstream File("status.xml");
+  ofstream File("/srv/www/htdocs/FACTelog/jsp/status.xml");
   if (!File.is_open()) {
     cerr << "Could not open file for writing" << endl;
@@ -22,17 +27,36 @@
   
   // Request data from DIM
-  string Status1, Status2;
   DimCurrentInfo Alarm("Alarm/MasterAlarm", NO_LINK);
   DimCurrentInfo FBState("Feedback/State", NO_LINK);
+  DimCurrentInfo RunNumber("drsdaq/RunNumber", NO_LINK);
+  DimCurrentInfo RunSize("drsdaq/RunSizeMB", NO_LINK);
+  DimCurrentInfo EventNo("drsdaq/EventNumber", NO_LINK);
 
-  if (!EvidenceServer::ServiceOK(&FBState)) {
-    Status1 = "Feedback state n/a";
+  // Feedback state
+  if (!EvidenceServer::ServiceOK(&FBState)) Status1 = "Feedback state n/a";
+  else Status1 = EvidenceServer::ToString((char *) "I:1;C", FBState.getData(), FBState.getSize()).substr(2);
+
+  // MasterAlarm level
+  if (!EvidenceServer::ServiceOK(&Alarm)) Status2 = "MasterAlarm n/a";
+  else {
+    switch (Alarm.getInt()) {
+      case 0: Status2 = "OK"; break;
+      case 1: Status2 = "Server WARN"; break;
+      case 2: Status2 = "Server ERROR"; break;
+      case 3: Status2 = "Server FATAL"; break;
+      case 4: Status2 = "Server UNAVAILABLE"; break;
+      default: Status2 = "MasterAlarm ???";
+    }
   }
-  else Status1 = EvidenceServer::ToString((char *) "I:1;C", FBState.getData(), FBState.getSize());
 
-  if (!EvidenceServer::ServiceOK(&Alarm)) {
-    Status2 = "MasterAlarm n/a";
-  }
-  else Status2 = "MasterAlarm is " + EvidenceServer::ToString((char *) "I", Alarm.getData(), Alarm.getSize());
+  // Run-related information 
+  if (!EvidenceServer::ServiceOK(&RunNumber)) Status3 = "Run #n/a";
+  else Status3 = "Run #" + EvidenceServer::ToString((char *) "I", RunNumber.getData(), RunNumber.getSize());
+  
+  if (!EvidenceServer::ServiceOK(&RunSize)) Status4 = "Size n/a";
+  else Status4 = "Size " + EvidenceServer::ToString((char *) "F", RunSize.getData(), RunSize.getSize()) + " MB";
+
+  if (!EvidenceServer::ServiceOK(&RunSize)) Status5 = "Event #n/a";
+  else Status5 = "Event #" + EvidenceServer::ToString((char *) "I", EventNo.getData(), EventNo.getSize());
   
   // Write file
@@ -40,8 +64,8 @@
   File << "<status_val1>" << Status1 << "</status_val1>" << endl;
   File << "<status_val2>" << Status2 << "</status_val2>" << endl;
-  File << "<status_val3>" << "n/a" << "</status_val3>" << endl;
-  File << "<status_val4>" << "n/a" << "</status_val4>" << endl;
-  File << "<status_val5>" << "n/a" << "</status_val5>" << endl;
-  File << "<status_val6>" << "n/a" << "</status_val6>" << endl;
+  File << "<status_val3>" << Status3 << "</status_val3>" << endl;
+  File << "<status_val4>" << Status4 << "</status_val4>" << endl;
+  File << "<status_val5>" << Status5 << "</status_val5>" << endl;
+  File << "<status_val6>" << " " << "</status_val6>" << endl;
   File << "</status_info>" << endl;
   
