From b0bc270b1be116cd941d8855238f0d353032d9d5 Mon Sep 17 00:00:00 2001
From: Morris Jette <jette@schedmd.com>
Date: Wed, 7 Nov 2012 09:27:52 -0800
Subject: [PATCH] Disable sstat command on Cray and Bluegene systems

---
 doc/html/bluegene.shtml |  5 +++--
 doc/html/cray.shtml     | 12 +++++++-----
 doc/man/man1/sstat.1    |  6 +++++-
 src/sstat/sstat.c       |  9 +++++++++
 4 files changed, 24 insertions(+), 8 deletions(-)

diff --git a/doc/html/bluegene.shtml b/doc/html/bluegene.shtml
index 5c166605617..4c84b6614be 100644
--- a/doc/html/bluegene.shtml
+++ b/doc/html/bluegene.shtml
@@ -70,7 +70,8 @@ have, for instance, the 4th nodeboard populated instead of the 1st.
 
 <p>The normal set of SLURM user tools: <i>sbatch</i>, <i>scancel</i>,
 <i>sinfo</i>, <i>squeue</i>, and <i>scontrol</i> provide all of the expected
-services except support for job steps, which is detailed later.</p>
+services except support for job steps, which is detailed later.
+The sstat command is not supported on Cray systems.</p>
 
 <p>Seven job submission options are available exclusively on BlueGene systems:</p>
 <table>
@@ -866,6 +867,6 @@ scheduling logic, etc. </p>
 
 <p class="footer"><a href="#top">top</a></p>
 
-<p style="text-align:center;">Last modified 8 August 2012</p>
+<p style="text-align:center;">Last modified 7 November 2012</p>
 
 <!--#include virtual="footer.txt"-->
diff --git a/doc/html/cray.shtml b/doc/html/cray.shtml
index 7adc8c81a7f..e96045a3b10 100644
--- a/doc/html/cray.shtml
+++ b/doc/html/cray.shtml
@@ -154,12 +154,14 @@ file.  This option is set with RPMs from Cray.</p>
 <p>Cray/ALPS node ordering is a topic of ongoing work, some information can be found in the CUG-2010 paper
    "<i>ALPS, Topology, and Performance</i>" by Carl Albing and Mark Baker.</p>
 
-<h3>The scancel command and signalling jobs</h3>
-On Cray systems, all signals <b>except</b>
-SIGCHLD, SIGCONT, SIGSTOP, SIGTSTP, SIGTTIN, SIGTTOU, SIGURG, or SIGWINCH
-cause the ALPS reservation to be released.
+<h3>Other Command Differences</h3>
+<p>On Cray systems, all signals sent to the job using the scancel command
+<b>except</b> SIGCHLD, SIGCONT, SIGSTOP, SIGTSTP, SIGTTIN, SIGTTOU, SIGURG, or
+SIGWINCH cause the ALPS reservation to be released.
 The job however will not be terminated except in the case of SIGKILL and
-may then be used for post processing.
+may then be used for post processing.</p>
+
+<p>The sstat command is not supported on Cray systems.</p>
 
 <h3>GPU Use</h3>
 
diff --git a/doc/man/man1/sstat.1 b/doc/man/man1/sstat.1
index 7978968d967..56b13929b63 100644
--- a/doc/man/man1/sstat.1
+++ b/doc/man/man1/sstat.1
@@ -32,10 +32,14 @@ For the non\-root user, the
 output is limited to the user's jobs.
 
 .PP
-Note:  the
+NOTE:  The
 .BR "sstat "
 command requires that the \f3jobacct_gather\fP plugin be installed and
 operational.
+.PP
+NOTE:  The
+.BR "sstat "
+command is not supported on Cray or IBM BlueGene systems. 
 
 .TP
 \f3\-a\fP\f3,\fP \f3\-\-allsteps\fP
diff --git a/src/sstat/sstat.c b/src/sstat/sstat.c
index 8de2866db43..ebca70e6823 100644
--- a/src/sstat/sstat.c
+++ b/src/sstat/sstat.c
@@ -171,6 +171,15 @@ int main(int argc, char **argv)
 	uint32_t stepid = 0;
 	slurmdb_selected_step_t *selected_step = NULL;
 
+#ifdef HAVE_CRAY
+	error("The sstat command is not supported on Cray systems");
+	return 1;
+#endif
+#ifdef HAVE_BG
+	error("The sstat command is not supported on IBM BlueGene systems");
+	return 1;
+#endif
+
 	print_fields_list = list_create(NULL);
 	print_fields_itr = list_iterator_create(print_fields_list);
 
-- 
GitLab