On Sun, May 02, 2010 at 10:12:29PM +1000, Angus Salkeld wrote:
> This is an updated patch with a wrapper script and dump functionality
> as well.
> 
> 
> trigger the dumping of flight data using:
>  corosync-objctl -w runtime.blackbox.dump_flight_data=anything
> trigger the dumping of state using:
>  corosync-objctl -w runtime.blackbox.dump_state=anything
> 
> then read the flight data as usual:
>  corosync-fplay
> 
> This patch includes a wrapper script called:
>  corosync-blackbox
> 
> Signed-off-by: Angus Salkeld <[email protected]>
> ---
>  exec/main.c             |   57 +++++++++++++++++++++++++++++++++++++++++++---
>  services/cpg.c          |   10 +++++++-
>  tools/corosync-blackbox |   35 ++++++++++++++++++++++++++++
>  3 files changed, 97 insertions(+), 5 deletions(-)
>  create mode 100755 tools/corosync-blackbox
> 
[snip]
> diff --git a/services/cpg.c b/services/cpg.c
> index 8ce74ae..2a8180b 100644
> --- a/services/cpg.c
> +++ b/services/cpg.c
> @@ -253,6 +253,8 @@ static void cpg_sync_init_v2 (
>       size_t member_list_entries,
>       const struct memb_ring_id *ring_id);
>  
> +static void cpg_exec_dump (void);
> +
>  static int  cpg_sync_process (void);
>  
>  static void cpg_sync_activate (void);
> @@ -343,7 +345,7 @@ struct corosync_service_engine cpg_service_engine = {
>       .lib_engine                             = cpg_lib_engine,
>       .lib_engine_count                       = sizeof (cpg_lib_engine) / 
> sizeof (struct corosync_lib_handler),
>       .exec_init_fn                           = cpg_exec_init_fn,
> -     .exec_dump_fn                           = NULL,
> +     .exec_dump_fn                           = cpg_exec_dump,
>       .exec_engine                            = cpg_exec_engine,
>       .exec_engine_count                      = sizeof (cpg_exec_engine) / 
> sizeof (struct corosync_exec_handler),
>       .sync_mode                              = CS_SYNC_V1_APIV2,
> @@ -444,6 +446,12 @@ static int memb_list_remove_value (unsigned int *list,
>               return list_entries;
>  }
>  
> +
> +static void cpg_exec_dump (void)
> +{
> +     log_printf (LOGSYS_LEVEL_DEBUG, "hello");
> +}
> +
>  static void cpg_sync_init_v2 (
>       const unsigned int *trans_list,
>       size_t trans_list_entries,


I'll remove this debug (just testing).

-Angus

_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais

Reply via email to