/[monit]/monit/util.c
ViewVC logotype

Diff of /monit/util.c

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

revision 1.45 by martinp, Fri Nov 29 13:38:51 2002 UTC revision 1.46 by martinp, Fri Nov 29 23:23:31 2002 UTC
# Line 437  void printprocess(Process_T p) { Line 437  void printprocess(Process_T p) {
437    printf("%-21s = %s\n", "Process Name", p->name);    printf("%-21s = %s\n", "Process Name", p->name);
438    printf(" %-20s = %s\n", "Group", is_str_defined(p->group));    printf(" %-20s = %s\n", "Group", is_str_defined(p->group));
439    printf(" %-20s = %s\n", "Pid file", p->pidfile);    printf(" %-20s = %s\n", "Pid file", p->pidfile);
440      printf(" %-20s = %s\n", "Monitoring mode", modenames[p->mode]);
441    if(p->start)    if(p->start)
442        printf(" %-20s = %s\n", "Start program", is_str_defined(p->start->arg[0]));        printf(" %-20s = %s\n", "Start program", is_str_defined(p->start->arg[0]));
443    if(p->stop)    if(p->stop)
# Line 502  void printprocess(Process_T p) { Line 503  void printprocess(Process_T p) {
503            
504    }    }
505    
   if(p->def_timeout) {  
       
     printf(" %-20s = Do timeout if %d restart within %d cycles\n",  
            "Timeout", p->to_start, p->to_cycle);  
       
   } else {  
       
     printf(" %-20s = (not defined)\n", "Timeout");  
       
   }  
   
   for(r= p->maillist; r; r= r->next) {  
       
     printf(" %-20s = %s\n", "Alert mail to", is_str_defined(r->to));  
     printf("   %-18s = %s\n", "alert from", is_str_defined_default(r->from));  
     printf("   %-18s = %s\n", "alert subject",  
            is_str_defined_default(r->subject));  
     printf("   %-18s = %-.20s%s\n", "alert message",  
            is_str_defined_default(r->message),  
            r->message?"..":"");  
     printf("   %-18s = %s\n", "alert on timeout",  
            r->alert_on_timeout?"yes":"no");  
     printf("   %-18s = %s\n", "alert on restart",  
              r->alert_on_restart?"yes":"no");  
     printf("   %-18s = %s\n", "alert on checksum",  
            r->alert_on_checksum?"yes":"no");  
     printf("   %-18s = %s\n", "alert on resource",  
            r->alert_on_resource?"yes":"no");  
     printf("   %-18s = %s\n", "alert on stop",  
            r->alert_on_stop?"yes":"no");  
     printf("   %-18s = %s\n", "alert on timestamp",  
            r->alert_on_timestamp?"yes":"no");  
   
   }  
   
506    if(! p->resourcelist) {    if(! p->resourcelist) {
507    
508      printf(" %-20s = (not defined)\n", "Resource Limits");      printf(" %-20s = (not defined)\n", "Resource Limits");
# Line 607  void printprocess(Process_T p) { Line 573  void printprocess(Process_T p) {
573      printf(" %-20s = (not defined)\n", "Every");      printf(" %-20s = (not defined)\n", "Every");
574            
575    }    }
576      
577    printf(" %-20s = %s\n", "Monitoring mode", modenames[p->mode]);    if(p->def_timeout) {
578        
579        printf(" %-20s = Do timeout if %d restart within %d cycles\n",
580               "Timeout", p->to_start, p->to_cycle);
581        
582      } else {
583        
584        printf(" %-20s = (not defined)\n", "Timeout");
585        
586      }
587    
588      for(r= p->maillist; r; r= r->next) {
589        
590        printf(" %-20s = %s\n", "Alert mail to", is_str_defined(r->to));
591        printf("   %-18s = %s\n", "alert from", is_str_defined_default(r->from));
592        printf("   %-18s = %s\n", "alert subject",
593               is_str_defined_default(r->subject));
594        printf("   %-18s = %-.20s%s\n", "alert message",
595               is_str_defined_default(r->message),
596               r->message?"..":"");
597        printf("   %-18s = %s\n", "alert on timeout",
598               r->alert_on_timeout?"yes":"no");
599        printf("   %-18s = %s\n", "alert on restart",
600                 r->alert_on_restart?"yes":"no");
601        printf("   %-18s = %s\n", "alert on checksum",
602               r->alert_on_checksum?"yes":"no");
603        printf("   %-18s = %s\n", "alert on resource",
604               r->alert_on_resource?"yes":"no");
605        printf("   %-18s = %s\n", "alert on stop",
606               r->alert_on_stop?"yes":"no");
607        printf("   %-18s = %s\n", "alert on timestamp",
608               r->alert_on_timestamp?"yes":"no");
609    
610      }
611    
612    printf("\n");    printf("\n");
613        
614  }  }

Legend:
Removed from v.1.45  
changed lines
  Added in v.1.46

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