4
0
Эх сурвалжийг харах

main: Make schedmiss in cmap and log equal

Second call of qb_util_nano_from_epoch_get may differ a bit. Solution is
to use previously stored timestamp (similarly as in master branch).

Also fix man page to follow similar style as other keys.

Thanks Patrik Hagara <phagara@redhat.com> for reporting the problem.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
Jan Friesse 5 жил өмнө
parent
commit
44c1c8ea31
2 өөрчлөгдсөн 8 нэмэгдсэн , 6 устгасан
  1. 1 1
      exec/main.c
  2. 7 5
      man/cmap_keys.8

+ 1 - 1
exec/main.c

@@ -858,7 +858,7 @@ static void timer_function_scheduler_timeout (void *data)
 		    (float)tv_diff / QB_TIME_NS_IN_MSEC, (float)timeout_data->max_tv_diff / QB_TIME_NS_IN_MSEC);
 		    (float)tv_diff / QB_TIME_NS_IN_MSEC, (float)timeout_data->max_tv_diff / QB_TIME_NS_IN_MSEC);
 
 
 		icmap_set_float("runtime.schedmiss.delay", (float)tv_diff / QB_TIME_NS_IN_MSEC);
 		icmap_set_float("runtime.schedmiss.delay", (float)tv_diff / QB_TIME_NS_IN_MSEC);
-		icmap_set_uint64("runtime.schedmiss.timestamp", qb_util_nano_from_epoch_get() / QB_TIME_NS_IN_MSEC);
+		icmap_set_uint64("runtime.schedmiss.timestamp", schedmiss_event_tstamp);
 	}
 	}
 
 
 	/*
 	/*

+ 7 - 5
man/cmap_keys.8

@@ -256,13 +256,15 @@ Status of the processor. Can be one of joined and left.
 Config version of the member node.
 Config version of the member node.
 
 
 .TP
 .TP
-runtime.schedmiss.timestamp
+runtime.schedmiss.*
+If corosync is not scheduled after the required period of time it will
+log this event and also write an entry to cmap under following keys:
+
+.B timestamp
 The timestamp of the last time when corosync failed to be scheduled
 The timestamp of the last time when corosync failed to be scheduled
-for the required amount of time. The even is warned in syslog but this
-is easier to find. The time is milli-seconds since the epoch.
+for the required amount of time. The time is milli-seconds since the epoch.
 
 
-.B
-runtime.schedmiss.delay
+.B delay
 The amount of time (milliseconds as a float) that corosync was delayed.
 The amount of time (milliseconds as a float) that corosync was delayed.
 
 
 .TP
 .TP