extern void acct_gather_filesystem_g_conf_values(void *data)
{
	if (acct_gather_filesystem_init() < 0)
		return;

	(*(ops.conf_values))(data);
}
extern void acct_gather_filesystem_g_conf_options(s_p_options_t **full_options,
						  int *full_options_cnt)
{
        if (acct_gather_filesystem_init() < 0)
                return;
        (*(ops.conf_options))(full_options, full_options_cnt);
}
extern void acct_gather_filesystem_g_conf_set(s_p_hashtbl_t *tbl)
{
        if (acct_gather_filesystem_init() < 0)
                return;

        (*(ops.conf_set))(tbl);
}
Esempio n. 4
0
extern int acct_gather_filesystem_startpoll(uint32_t frequency)
{
	int retval = SLURM_SUCCESS;

	if (acct_gather_filesystem_init() < 0)
		return SLURM_ERROR;

	if (!acct_shutdown) {
		error("acct_gather_filesystem_startpoll: "
		      "poll already started!");
		return retval;
	}

	acct_shutdown = false;

	freq = frequency;

	if (frequency == 0) {   /* don't want dynamic monitoring? */
		debug2("acct_gather_filesystem dynamic logging disabled");
		return retval;
	}

	/* create polling thread */
	slurm_thread_create(&watch_node_thread_id, _watch_node, NULL);

	debug3("acct_gather_filesystem dynamic logging enabled");

	return retval;
}
Esempio n. 5
0
extern int acct_gather_filesystem_g_conf_values(void *data)
{
	if (acct_gather_filesystem_init() < 0)
		return SLURM_ERROR;

	(*(ops.conf_values))(data);
	return SLURM_SUCCESS;
}
Esempio n. 6
0
extern int acct_gather_filesystem_g_conf_set(s_p_hashtbl_t *tbl)
{
        if (acct_gather_filesystem_init() < 0)
		return SLURM_ERROR;

        (*(ops.conf_set))(tbl);
	return SLURM_SUCCESS;
}
Esempio n. 7
0
extern int acct_gather_filesystem_g_conf_options(s_p_options_t **full_options,
						  int *full_options_cnt)
{
        if (acct_gather_filesystem_init() < 0)
		return SLURM_ERROR;
        (*(ops.conf_options))(full_options, full_options_cnt);
	return SLURM_SUCCESS;
}
extern int acct_gather_filesystem_startpoll(uint32_t frequency)
{
	int retval = SLURM_SUCCESS;
	pthread_attr_t attr;
	pthread_t _watch_node_thread_id;

	if (acct_gather_filesystem_init() < 0)
		return SLURM_ERROR;

	if (!acct_shutdown) {
		error("acct_gather_filesystem_startpoll: "
		      "poll already started!");
		return retval;
	}

	acct_shutdown = false;

	freq = frequency;

	if (frequency == 0) {   /* don't want dynamic monitoring? */
		debug2("acct_gather_filesystem dynamic logging disabled");
		return retval;
	}

	/* create polling thread */
	slurm_attr_init(&attr);
	if (pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED))
		error("pthread_attr_setdetachstate error %m");

	if (pthread_create(&_watch_node_thread_id, &attr, &_watch_node, NULL)) {
		debug("acct_gather_filesystem failed to create _watch_node "
			"thread: %m");
	} else
		debug3("acct_gather_filesystem dynamic logging enabled");
	slurm_attr_destroy(&attr);

	return retval;
}