674 |
out_print(res, |
out_print(res, |
675 |
"<tr><td>Memory usage</a></td><td>%.1f%% [%ldkB]</td></tr>", |
"<tr><td>Memory usage</a></td><td>%.1f%% [%ldkB]</td></tr>", |
676 |
pi->mem_percent/10.0,pi->mem_kbyte); |
pi->mem_percent/10.0,pi->mem_kbyte); |
677 |
|
out_print(res, |
678 |
|
"<tr><td>Children</a></td><td>%d</td></tr>", |
679 |
|
pi->children); |
680 |
|
out_print(res, |
681 |
|
"<tr><td>Total memory usage (incl. children) </a></td><td>%.1f%% [%ldkB]</td></tr>", |
682 |
|
pi->total_mem_percent/10.0,pi->total_mem_kbyte); |
683 |
} |
} |
684 |
{ |
{ |
685 |
Port_T n; |
Port_T n; |
787 |
q->limit/10.0, q->max_cycle, |
q->limit/10.0, q->max_cycle, |
788 |
actionnames[q->action]); |
actionnames[q->action]); |
789 |
break; |
break; |
790 |
|
|
791 |
|
case RESOURCE_ID_CHILDREN: |
792 |
|
out_print(res,"<tr><td>Children</a></td>" |
793 |
|
"<td>If %s %d for %d cycle(s) then %s</td></tr>", |
794 |
|
operatornames[q->operator], |
795 |
|
q->limit, q->max_cycle, |
796 |
|
actionnames[q->action]); |
797 |
|
break; |
798 |
|
|
799 |
|
case RESOURCE_ID_TOTAL_MEM_KBYTE: |
800 |
|
out_print(res,"<tr><td>Memory amount limit (incl. children)</a></td>" |
801 |
|
"<td>If %s %d for %d cycle(s) then %s</td></tr>", |
802 |
|
operatornames[q->operator], |
803 |
|
q->limit, q->max_cycle, |
804 |
|
actionnames[q->action]); |
805 |
|
break; |
806 |
|
|
807 |
|
case RESOURCE_ID_TOTAL_MEM_PERCENT: |
808 |
|
out_print(res,"<tr><td>Memory usage limit (incl. children)</a></td>" |
809 |
|
"<td>If %s %.1f%% for %d cycle(s) then %s</td></tr>", |
810 |
|
operatornames[q->operator], |
811 |
|
q->limit/10.0, q->max_cycle, |
812 |
|
actionnames[q->action]); |
813 |
|
break; |
814 |
|
|
815 |
} |
} |
816 |
} |
} |
902 |
|
|
903 |
printf_ssl_socket(res->ssl, |
printf_ssl_socket(res->ssl, |
904 |
"Process '%s' is running with pid [%d]\n\tUptime: %s " |
"Process '%s' is running with pid [%d]\n\tUptime: %s " |
905 |
"CPU: %.1f%% Memory: %.1f%% [%ldkB]\n\tMonitoring status: %s\n", |
"CPU: %.1f%% Memory w/o children: %.1f%% [%ldkB]\n" |
906 |
|
"\tChildren: %i Memory w/ children: %.1f%% [%ldkB]\n" |
907 |
|
"\tMonitoring status: %s\n", |
908 |
p->name, (int)pid, uptime, pi->cpu_percent/10.0, |
p->name, (int)pid, uptime, pi->cpu_percent/10.0, |
909 |
pi->mem_percent/10.0,pi->mem_kbyte, statusnames[p->do_validate]); |
pi->mem_percent/10.0,pi->mem_kbyte, |
910 |
|
pi->children,pi->total_mem_percent/10.0,pi->total_mem_kbyte, |
911 |
|
statusnames[p->do_validate]); |
912 |
|
|
913 |
} else { |
} else { |
914 |
|
|
915 |
fprintf(out, |
fprintf(out, |
916 |
"Process '%s' is running with pid [%d]\n\tUptime: %s " |
"Process '%s' is running with pid [%d]\n\tUptime: %s " |
917 |
"CPU: %.1f%% Memory: %.1f%% [%ldkB]\n\tMonitoring status: %s\n", |
"CPU: %.1f%% Memory w/o children: %.1f%% [%ldkB]\n" |
918 |
|
"\tChildren: %i Memory w/ children: %.1f%% [%ldkB]\n" |
919 |
|
"\tMonitoring status: %s\n", |
920 |
p->name, (int)pid, uptime, pi->cpu_percent/10.0, |
p->name, (int)pid, uptime, pi->cpu_percent/10.0, |
921 |
pi->mem_percent/10.0,pi->mem_kbyte, statusnames[p->do_validate]); |
pi->mem_percent/10.0,pi->mem_kbyte, |
922 |
|
pi->children,pi->total_mem_percent/10.0,pi->total_mem_kbyte, |
923 |
|
statusnames[p->do_validate]); |
924 |
|
|
925 |
} |
} |
926 |
|
|