blob: ff9aa40a03ec4e224cf279d40d8fad117e1791ed [file] [log] [blame] [edit]
.TH "Slurm API" "3" "October 2012" "Slurm API 2.5" "Slurm event trigger management functions"
.SH "NAME"
slurm_init_trigger_msg, slurm_clear_trigger, slurm_free_trigger_msg,
slurm_get_triggers, slurm_set_trigger \- Slurm event trigger management functions
.SH "SYNTAX"
.LP
#include <slurm/slurm.h>
.LP
.LP
int \fBslurm_set_trigger\fR (
.br
trigger_info_t *\fItrigger_info\fP
.br
);
.LP
int \fBslurm_clear_trigger\fR (
.br
trigger_info_t *\fItrigger_info\fP
.br
);
.LP
int \fBslurm_get_triggers\fR (
.br
trigger_info_msg_t **\fItrigger_info_msg\fP
.br
);
.LP
int \fBslurm_free_trigger\fR (
.br
trigger_info_msg_t *\fItrigger_info_msg\fP
.br
);
.LP
int \fBslurm_init_trigger_msg\fR (
.br
trigger_info_msg_t *\fItrigger_info_msg\fP
.br
);
.SH "ARGUMENTS"
.LP
.TP
\fItrigger_info\fP
Information about one event trigger including trigger ID, type, time offset, etc.
See \fIslurm.h\fP for details.
.TP
\fItrigger_info_msg\fP
A data structure including an array of \fItrigger_info\fP structures
plus their count.
See \fIslurm.h\fP for details.
.SH "DESCRIPTION"
.LP
\fBslurm_set_trigger\fR Create a new event trigger.
Note that any trigger ID specified in \fItrigger_info\fP is unused.
.LP
\fBslurm_clear_trigger\fR Clear or remove existing event triggers.
If a trigger ID is specified then only that one trigger will be cleared.
If a job ID or node name is specified, then all triggers associated with
that resource are cleared.
.LP
\fBslurm_get_triggers\fR Get information about all currently configured
event triggers. To avoid memory leaks, always follow this with a call
to the \fBslurm_free_trigger\fR function.
.LP
\fBslurm_free_trigger\fR Release the memory allocated for the array
returned by the \fBslurm_get_triggers\fR function.
.LP
\fBslurm_init_trigger_msg\fR Initialize the data structure to be used in
subsequent call to \fBslurm_set_trigger\fR or \fBslurm_clear_trigger\fR.
.SH "RETURN VALUE"
.LP
\fBSLURM_SUCCESS\fR is returned on successful completion,
otherwise an error code is returned as described below.
.SH "ERRORS"
.LP
\fBEINVAL\fR Invalid argument
.LP
\fBESLURM_ACCESS_DENIED\fR Attempt by non\-privileged user to set an
event trigger.
.LP
\fBESLURM_ALREADY_DONE\fR Attempt to set an event trigger for a job which
has already completed.
.LP
\fBESLURM_INVALID_NODE_NAME\fR Attempt to set an event trigger for a node
name which is invalid.
.LP
\fBESLURM_INVALID_JOB_ID\fR the specified job id does not exist.
.SH "NOTE"
These functions are included in the libslurm library,
which must be linked to your process for use
(e.g. "cc \-lslurm myprog.c").
.SH "COPYING"
Copyright (C) 2010 Lawrence Livermore National Security.
Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
CODE\-OCEC\-09\-009. All rights reserved.
.LP
This file is part of SLURM, a resource management program.
For details, see <http://slurm.schedmd.com/>.
.LP
SLURM is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2 of the License, or (at your option)
any later version.
.LP
SLURM is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
.SH "SEE ALSO"
.LP
\fBstrigger\fR(1),
\fBslurm_get_errno\fR(3), \fBslurm_perror\fR(3), \fBslurm_strerror\fR(3)