sdiag currently only operates on the local cluster. At NOAA/ORNL, we do not have login nodes in each cluster (the login nodes sit in an 'external' cluster), so there is no way for end users to run sdiag against the compute resource controllers.
Created attachment 10727 [details] Refactor sdiag option handling
Created attachment 10728 [details] Add cluster option to sdiag
(In reply to Matt Ezell from comment #1) > Created attachment 10727 [details] > Refactor sdiag option handling Can you please fix the license block to reflect your authorship of this new header? BSC / Alejandro Lucero did not write any of that, you did...
Created attachment 10731 [details] Refactor sdiag option handling
Anything else needed from our side before this could be merged to master? Thanks.
Looks good. Thanks! https://github.com/SchedMD/slurm/commit/209dbb02ec723a6c0790972cf6cb55c86531be2c Thanks, Brian FYI. I made these small changes: diff --git a/src/sdiag/opts.c b/src/sdiag/opts.c index 923a58cc04..f66c23f707 100644 --- a/src/sdiag/opts.c +++ b/src/sdiag/opts.c @@ -42,6 +42,7 @@ #include "src/common/xstring.h" #include "src/common/proc_args.h" + #include "sdiag.h" #define OPT_LONG_USAGE 0x101 @@ -132,8 +133,7 @@ extern void parse_command_line(int argc, char **argv) if (params.clusters) { if (list_count(params.clusters) > 1) { - fatal("Only one cluster can be used at a time with " - "sdiag"); + fatal("Only one cluster can be used at a time with sdiag"); } working_cluster_rec = list_peek(params.clusters); } diff --git a/src/sdiag/sdiag.c b/src/sdiag/sdiag.c index 99095f83d0..82a2caec96 100644 --- a/src/sdiag/sdiag.c +++ b/src/sdiag/sdiag.c @@ -47,6 +47,7 @@ #include "src/common/uid.h" #include "src/common/xmalloc.h" #include "src/common/xstring.h" + #include "sdiag.h" /******************** diff --git a/src/sdiag/sdiag.h b/src/sdiag/sdiag.h index aeec647fb6..43b8ef6f54 100644 --- a/src/sdiag/sdiag.h +++ b/src/sdiag/sdiag.h @@ -35,8 +35,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. \*****************************************************************************/ -#ifndef __SDIAG_H__ -#define __SDIAG_H__ +#ifndef _SDIAG_H +#define _SDIAG_H struct sdiag_parameters { int mode; @@ -48,7 +48,7 @@ typedef enum { SORT_COUNT, SORT_ID, SORT_TIME, - SORT_TIME2 + SORT_TIME2, } sdiag_sort_types_t; /******************** diff --git a/doc/man/man1/sdiag.1 b/doc/man/man1/sdiag.1 index 609d54e072..7065d056f0 100644 --- a/doc/man/man1/sdiag.1 +++ b/doc/man/man1/sdiag.1 @@ -313,7 +313,7 @@ environment variables, along with their corresponding options, are listed below. (Note: commandline options will always override these settings) .TP 20 \fBSLURM_CLUSTERS\fR -The cluster to issue commands to. +Same as \fB\-\-cluster\fR .TP 20 \fBSLURM_CONF\fR