1 file changed, 17 insertions(+), 15 deletions(-)
tools/crm_mon.c | 32 +++++++++++++++++---------------
# HG changeset patch
# User Andrew Beekhof <[EMAIL PROTECTED]>
# Date 1224766544 -7200
# Node ID 5d90c8287a087f4479f2dd42196f809bf924549c
# Parent 59a110c159f3a7c8444a841fd7f478796afea2c5
Medium: Tools: crm_mon - Fix the display of timing data
diff --git a/tools/crm_mon.c b/tools/crm_mon.c
--- a/tools/crm_mon.c
+++ b/tools/crm_mon.c
@@ -644,32 +644,34 @@ static void print_rsc_history(pe_working
if(print_timing) {
int int_value;
- value = crm_element_value(xml_op, "last_rc_change");
+ const char *attr = "last-rc-change";
+ value = crm_element_value(xml_op, attr);
if(value) {
int_value = crm_parse_int(value, NULL);
- print_as(" last-rc-change=");
+ print_as(" %s=", attr);
+ print_date(int_value);
+ }
+
+ attr = "last-run";
+ value = crm_element_value(xml_op, attr);
+ if(value) {
+ int_value = crm_parse_int(value, NULL);
+ print_as(" %s=", attr);
print_date(int_value);
}
- value = crm_element_value(xml_op, "last_run");
+ attr = "exec-time";
+ value = crm_element_value(xml_op, attr);
if(value) {
int_value = crm_parse_int(value, NULL);
- print_as(" last-run=");
- print_date(int_value);
+ print_as(" %s=%dms", attr, int_value);
}
- value = crm_element_value(xml_op, "exec_time");
+ attr = "queue-time";
+ value = crm_element_value(xml_op, attr);
if(value) {
int_value = crm_parse_int(value, NULL);
- print_as(" exec-time=");
- print_date(int_value);
- }
-
- value = crm_element_value(xml_op, "queue_time");
- if(value) {
- int_value = crm_parse_int(value, NULL);
- print_as(" queue-time=");
- print_date(int_value);
+ print_as(" %s=%dms", attr, int_value);
}
}
_______________________________________________
Pacemaker mailing list
[email protected]
http://list.clusterlabs.org/mailman/listinfo/pacemaker