/[monit]/monit/http/cervlet.c
ViewVC logotype

Diff of /monit/http/cervlet.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.56 by chopp, Fri Jun 6 09:31:17 2003 UTC revision 1.57 by chopp, Fri Jun 6 12:50:41 2003 UTC
# Line 896  static void print_status(Process_T p, Ht Line 896  static void print_status(Process_T p, Ht
896    if((pid= is_process_running(p))) {    if((pid= is_process_running(p))) {
897            
898      char *uptime= get_process_uptime(p->pidfile);      char *uptime= get_process_uptime(p->pidfile);
899        char buf[STRLEN];
900      ProcInfo_T pi= p->procinfo;      ProcInfo_T pi= p->procinfo;
901    
902        if ( Run.doprocess ) {
903    
904          sprintf(buf,
905                  "Process '%s' is running with pid [%d]\n\tUptime: %s "
906                  "CPU: %.1f%% Memory w/o children: %.1f%% [%ldkB]\n"
907                  "\tChildren: %i Memory w/ children: %.1f%% [%ldkB]\n"
908                  "\tMonitoring status: %s\n",
909                  p->name, (int)pid, uptime, pi->cpu_percent/10.0,
910                  pi->mem_percent/10.0,pi->mem_kbyte,
911                  pi->children,pi->total_mem_percent/10.0,pi->total_mem_kbyte,
912                  statusnames[p->do_validate]);
913    
914        } else {
915    
916          sprintf(buf,
917                  "Process '%s' is running with pid [%d]\n\tUptime: %s "
918                  "\tMonitoring status: %s\n",
919                  p->name, (int)pid, uptime,statusnames[p->do_validate]);
920    
921        }
922    
923      if( Run.httpdssl ) {      if( Run.httpdssl ) {
924    
925        printf_ssl_socket(res->ssl,        printf_ssl_socket(res->ssl, "%s", buf);
         "Process '%s' is running with pid [%d]\n\tUptime: %s "  
         "CPU: %.1f%% Memory w/o children: %.1f%% [%ldkB]\n"  
         "\tChildren: %i Memory w/ children: %.1f%% [%ldkB]\n"  
         "\tMonitoring status: %s\n",  
         p->name, (int)pid, uptime, pi->cpu_percent/10.0,  
         pi->mem_percent/10.0,pi->mem_kbyte,  
         pi->children,pi->total_mem_percent/10.0,pi->total_mem_kbyte,  
         statusnames[p->do_validate]);  
926                
927      } else {      } else {
928    
929        fprintf(out,        fprintf(out, "%s", buf);
         "Process '%s' is running with pid [%d]\n\tUptime: %s "  
         "CPU: %.1f%% Memory w/o children: %.1f%% [%ldkB]\n"  
         "\tChildren: %i Memory w/ children: %.1f%% [%ldkB]\n"  
         "\tMonitoring status: %s\n",  
         p->name, (int)pid, uptime, pi->cpu_percent/10.0,  
         pi->mem_percent/10.0,pi->mem_kbyte,  
         pi->children,pi->total_mem_percent/10.0,pi->total_mem_kbyte,  
         statusnames[p->do_validate]);  
930    
931      }          }    
932    

Legend:
Removed from v.1.56  
changed lines
  Added in v.1.57

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26