Ticket 7306 - sdiag --cluster option
Summary: sdiag --cluster option
Status: RESOLVED FIXED
Alias: None
Product: Slurm
Classification: Unclassified
Component: User Commands (show other tickets)
Version: 18.08.6
Hardware: Linux Linux
: C - Contributions
Assignee: Brian Christiansen
QA Contact:
URL:
Depends on:
Blocks:
 
Reported: 2019-06-27 09:11 MDT by Matt Ezell
Modified: 2019-07-22 22:35 MDT (History)
0 users

See Also:
Site: NOAA
Slinky Site: ---
Alineos Sites: ---
Atos/Eviden Sites: ---
Confidential Site: ---
Coreweave sites: ---
Cray Sites: ---
DS9 clusters: ---
Google sites: ---
HPCnow Sites: ---
HPE Sites: ---
IBM Sites: ---
NOAA SIte: ORNL
NoveTech Sites: ---
Nvidia HWinf-CS Sites: ---
OCF Sites: ---
Recursion Pharma Sites: ---
SFW Sites: ---
SNIC sites: ---
Tzag Elita Sites: ---
Linux Distro: ---
Machine Name:
CLE Version:
Version Fixed: 20.02.0pre1
Target Release: ---
DevPrio: ---
Emory-Cloud Sites: ---


Attachments
Refactor sdiag option handling (6.20 KB, patch)
2019-06-27 09:13 MDT, Matt Ezell
Details | Diff
Add cluster option to sdiag (3.89 KB, patch)
2019-06-27 09:13 MDT, Matt Ezell
Details | Diff
Refactor sdiag option handling (6.23 KB, patch)
2019-06-27 15:16 MDT, Matt Ezell
Details | Diff

Note You need to log in before you can comment on or make changes to this ticket.
Description Matt Ezell 2019-06-27 09:11:20 MDT
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.
Comment 1 Matt Ezell 2019-06-27 09:13:19 MDT
Created attachment 10727 [details]
Refactor sdiag option handling
Comment 2 Matt Ezell 2019-06-27 09:13:41 MDT
Created attachment 10728 [details]
Add cluster option to sdiag
Comment 3 Tim Wickberg 2019-06-27 14:34:31 MDT
(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...
Comment 4 Matt Ezell 2019-06-27 15:16:28 MDT
Created attachment 10731 [details]
Refactor sdiag option handling
Comment 6 Matt Ezell 2019-07-22 12:57:23 MDT
Anything else needed from our side before this could be merged to master?  Thanks.
Comment 7 Brian Christiansen 2019-07-22 22:35:03 MDT
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