Procházet zdrojové kódy

allowing debug messages for client_supervisor

* added 'heartbeat' to client supervisor to report back to central
  server.
clementinecomputing před 6 roky
rodič
revize
9e12de515a

+ 7 - 1
busunit/client_supervisor/client_supervisor.c

@@ -305,6 +305,10 @@ void monitor_system_status()
     }
 }
 
+void send_heartbeat() {
+  route_debug_message("heartbeat\n");
+}
+
 int launch_module(int n)
 {
     pid_t fork_ret;
@@ -969,6 +973,8 @@ int main(int argc, char **argv)
         if( (time(NULL) - last_system_stat) >= SUPERVISOR_SYSTEM_STAT_INTERVAL)
         {
             monitor_system_status();
+
+            send_heartbeat();
             
             last_system_stat = time(NULL);
         }
@@ -1099,7 +1105,7 @@ int main(int argc, char **argv)
             
                 if(fds[i].fd == module_status[modnum].stdout_fd)
                 {
-                     route_debug_message("%s [%d]: %s", module_name[modnum], (int)module_status[modnum].pid, linebuffer);
+                     //route_debug_message("%s [%d]: %s", module_name[modnum], (int)module_status[modnum].pid, linebuffer);
                 }
                 else if(fds[i].fd == module_status[modnum].stderr_fd)
                 {

+ 1 - 1
busunit/common/common_config.h

@@ -516,7 +516,7 @@
 #endif
 
 //Which types of log entries should be sent to the server via the billing log?
-//#define SUPERVISOR_LOG_DEBUG_TO_BILLDB
+#define SUPERVISOR_LOG_DEBUG_TO_BILLDB
 #define SUPERVISOR_LOG_WARNING_TO_BILLDB
 #define SUPERVISOR_LOG_ERROR_TO_BILLDB