Ejemplo n.º 1
0
static void sigusr2_handler (int num)
{
	/*
	 * TODO remove this from sigusr2 handler and access via cfg service
	 * engine api - corosync-cfgtool
	 */
	corosync_state_dump ();
}
Ejemplo n.º 2
0
static void fplay_key_change_notify_fn (
	int32_t event,
	const char *key_name,
	struct icmap_notify_value new_val,
	struct icmap_notify_value old_val,
	void *user_data)
{
	if (strcmp(key_name, "runtime.blackbox.dump_flight_data") == 0) {
		fprintf(stderr,"Writetofile\n");
		corosync_blackbox_write_to_file ();
	}
	if (strcmp(key_name, "runtime.blackbox.dump_state") == 0) {
		fprintf(stderr,"statefump\n");
		corosync_state_dump ();
	}
}
Ejemplo n.º 3
0
static void fplay_key_change_notify_fn (
	object_change_type_t change_type,
	hdb_handle_t parent_object_handle,
	hdb_handle_t object_handle,
	const void *object_name_pt, size_t object_name_len,
	const void *key_name_pt, size_t key_len,
	const void *key_value_pt, size_t key_value_len,
	void *priv_data_pt)
{
	if (key_len == strlen ("dump_flight_data") &&
		memcmp ("dump_flight_data", key_name_pt, key_len) == 0) {
		qb_log_blackbox_write_to_file (LOCALSTATEDIR "/lib/corosync/fdata");
	}
	if (key_len == strlen ("dump_state") &&
		memcmp ("dump_state", key_name_pt, key_len) == 0) {
		corosync_state_dump ();
	}
}
Ejemplo n.º 4
0
static int32_t sig_diag_handler (int num, void *data)
{
	corosync_state_dump ();
	return 0;
}
Ejemplo n.º 5
0
static int32_t sig_diag_handler (int num, void *data)
{
	corosync_state_dump ();
	qb_log_blackbox_write_to_file(LOCALSTATEDIR "/lib/corosync/fdata");
	return 0;
}