Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor cleanup #1245

Merged
merged 4 commits into from
Jul 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions ldms/man/Plugin_jobid.man
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,29 @@ The sampler offset for the jobid plugin should be slightly less than all other p

Other samplers use the jobid plugin as the jobid data source. If the jobid sampler is not loaded, these samplers will report 0 jobid values.

.SH FILE FORMAT

The file consists of key-value pairs, one per line, separated by an equals-sign. The recognized keys are:

.TP
JOBID
.BR
An unsigned integer (up to 64-bit) identifying the job. The number zero is reserved to mean that no job is currently running.
.TP
UID
.BR
An unsigned integer (up to 64-bit) representing the User ID associated with the job.
.TP
APPID
.BR
An unsigned integer (up to 64-bit) representing the an application ID for the job.
.TP
USER
.BR
A string representing the username associated with the job.

Only the JOBID field is required. The other fields are optional, and will default to zero.

.SH EXAMPLES
.PP
.nf
Expand Down Expand Up @@ -90,8 +113,6 @@ echo UID=$SLURM_UID >> /var/run/ldms.jobinfo
echo USER=$SLURM_JOB_USER >> /var/run/ldms.jobinfo

.fi
These slurm files might be found in /etc/nodestate/bin/.


.SH SEE ALSO
ldms(7), ldmsd(8), ldmsd_controller(8)
1 change: 0 additions & 1 deletion ldms/src/sampler/ibmad_records_sampler/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ libibmad_records_sampler_la_SOURCES = \
libibmad_records_sampler_la_LIBADD = \
$(top_builddir)/ldms/src/core/libldms.la \
$(top_builddir)/lib/src/coll/libcoll.la \
$(top_builddir)/ldms/src/sampler/libjobid_helper.la \
$(top_builddir)/ldms/src/sampler/libsampler_base.la \
$(LTLIBIBMAD) $(LTLIBIBUMAD)
libibmad_records_sampler_la_LDFLAGS = \
Expand Down
4 changes: 2 additions & 2 deletions ldms/src/sampler/ldms_jobid.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ static int32_t jend_pos = 0;
static char ji_buf[JI_SIZE];
static int set_meta_new = 0;
static int parse_err_logged = 0;

static int parse_jobinfo(const char* file, struct ldms_job_info *ji, ldms_set_t js) {
int rc = 0;
ji->appid = ji->jobid = ji->uid = 0;
Expand Down Expand Up @@ -222,11 +223,10 @@ static int parse_jobinfo(const char* file, struct ldms_job_info *ji, ldms_set_t
parse_err_logged = 1;
}
rc = EINVAL;
goto err;
ji->jobid = 0;
goto err;
}


tmp = av_value(avl, "UID");
if (tmp) {
endp = NULL;
Expand Down
6 changes: 2 additions & 4 deletions ldms/src/sampler/sampler_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,7 @@ void base_set_delete(base_data_t base);
* current job id in the metric set. If job data is not
* configured on the system, no job data is stored in the set.
*
* \param jd The job data structure returned by sampler_job_config
* \param set The metric set containing the job_id_metric
* \param job_id_metric The job id metric in \c set
* \param base The base data structure
*/
void base_sample_begin(base_data_t base);

Expand Down Expand Up @@ -236,7 +234,7 @@ int base_auth_parse(struct attr_value_list *avl, struct base_auth *auth, ovis_lo
* to employ this function directly if your plugin calls base_set_new() to
* create its metric sets. base_set_new() will call base_auth_set().
*
* \param [in] base The base_data_t struct that holds the authentication options
* \param [in] auth The struct base_auth that holds the authentication options
* \param [out] set The metric set that shall have its authentication values set
*/
void base_auth_set(const struct base_auth *auth, ldms_set_t set);
Expand Down