[torqueusers] patch to support '-n1'
Michael Barnes
mbarnes at compsci.wm.edu
Mon Mar 6 14:48:28 MST 2006
On Fri, Feb 24, 2006 at 12:21:11PM -0800, Garrick Staples wrote:
> Where is the patch?
Attached.
--
/-----------------------------------------\
| Michael Barnes <mbarnes at compsci.wm.edu> |
| UNIX/Linux HPC Systems Administrator |
| College of William and Mary |
| Phone: (757) 879-3930 (cell) |
\-----------------------------------------/
-------------- next part --------------
--- /usr/local/src/torque-2.0.0p8/src/cmds/qstat.c Fri Jan 27 13:42:08 2006
+++ qstat.torque.c Wed Feb 15 10:48:00 2006
@@ -123,6 +123,8 @@
#define ALT_DISPLAY_Mw 0x200 /* -M option - show sizes in MW */
#define ALT_DISPLAY_G 0x400 /* -G option - show sizes in GB */
#define ALT_DISPLAY_o 0x800 /* -1 option - add node list on same line */
+#define ALT_DISPLAY_N 0x1000 /* -N option - show nodespec */
+#define ALT_DISPLAY_Qt 0x2000 /* -t option - show qtime */
#endif /* not PBS_NO_POSIX_VIOLATION */
@@ -618,7 +620,23 @@
printf("Job ID Username Queue NDS TSK Memory Time S Time BIG FAST PFS\n");
printf("-------------------- -------- -------- ----- --- ------ ----- - ----- ----- ----- -----\n");
- }
+ }
+ else if (alt_opt & ALT_DISPLAY_N && alt_opt & ALT_DISPLAY_Qt)
+ {
+ printf("\n Req'd Req'd Elap\n");
+
+ printf("Job ID Username Queue Jobname SessID NDS Memory Time S Time NodeSpec Qtime\n");
+
+ printf("--------------- -------- -------- ---------- ------ --- ------ ----- - ----- ------------------------- ------------------------\n");
+ }
+ else if (alt_opt & ALT_DISPLAY_N)
+ {
+ printf("\n Req'd Req'd Elap\n");
+
+ printf("Job ID Username Queue Jobname SessID NDS Memory Time S Time NodeSpec\n");
+
+ printf("--------------- -------- -------- ---------- ------ --- ------ ----- - ----- --------\n");
+ }
else
{
printf("\n Req'd Req'd Elap\n");
@@ -760,7 +778,27 @@
srfsbig,
srfsfast,
pfs);
- }
+ }
+ else if (alt_opt & ALT_DISPLAY_N)
+ {
+ printf("%-10.10s %6.6s %3.3s %6.6s %5.5s %1.1s %5.5s %-25.25s",
+ jobn,
+ sess,
+ nodect,
+ rqmem,
+ usecput ? rqtimecpu : rqtimewal,
+ jstate,
+ usecput ? eltimecpu : eltimewal,
+ nodespec);
+
+ if (alt_opt & ALT_DISPLAY_Qt)
+ {
+ printf(" %s",qtime);
+ }
+ else
+ {
+ printf ("\n");
+ }
else
{
printf("%-10.10s %6.6s %5.5s %3.3s %6.6s %5.5s %1.1s %5.5s",
@@ -1856,7 +1894,7 @@
#endif /* !FALSE */
#if !defined(PBS_NO_POSIX_VIOLATION)
-#define GETOPT_ARGS "aefin1qrsu:xGMQRBW:-:"
+#define GETOPT_ARGS "aefin1qrsu:txGMQRNBW:-:"
#else
#define GETOPT_ARGS "fQBW:"
#endif /* PBS_NO_POSIX_VIOLATION */
@@ -1954,7 +1992,20 @@
alt_opt |= ALT_DISPLAY_R;
break;
-
+
+ case 'N':
+ alt_opt |= ALT_DISPLAY_N;
+
+ break;
+
+ case 't':
+
+ alt_opt |= ALT_DISPLAY_QTIME;
+
+ alt_opt |= ALT_DISPLAY_N;
+
+ break;
+
case 'G':
alt_opt |= ALT_DISPLAY_G;
-------------- next part --------------
--- /usr/local/src/torque-2.0.0p8/doc/man1/qstat.1B Fri Jan 27 13:42:03 2006
+++ qstat.torque.1B Mon Mar 6 16:43:31 2006
@@ -83,7 +83,7 @@
.Sh SYNOPSIS
qstat [-f][-W site_specific] [\^job_identifier... | destination...\^]
.sp
-qstat [-a|-i|-r|-e] [-n [-1]] [-s] [-G|-M] [-R] [-u user_list] [\^job_identifier... |\
+qstat [-a|-i|-r|-e] [-n [-1]] [-N] [-t] [-s] [-G|-M] [-R] [-u user_list] [\^job_identifier... |\
destination...\^]
.sp
qstat -Q [-f][-W site_specific] [\^destination...\^]
@@ -153,6 +153,10 @@
In addition to the basic information, nodes allocated to a job are listed.
.IP "-1" 10
In combination with the -n, the -1 option puts all of the nodes on the same line as the job ID. This is intended to ease the parsing of the qstat output.
+.IP "-N" 10
+In addition to the basic information, the node specification is also displayed.
+.IP "-t" 10
+In addition to the basic information, the queue time is also displayed.
.IP "-s" 10
In addition to the basic information, any comment provided by the batch
administrator or scheduler is shown.
More information about the torqueusers
mailing list