[torqueusers] patch to support "-n1" (fwd)

Garrick Staples garrick at usc.edu
Wed Nov 23 18:06:30 MST 2005


The patch broke -R output.  I'm commiting this:

@@ -751,11 +751,11 @@
         usecput ? rqtimecpu : rqtimewal,
         jstate, 
         usecput ? eltimecpu : eltimewal);
-
-      if (!(alt_opt & ALT_DISPLAY_o)) 
-        printf("\n");
       }
 
+    if (!(alt_opt & ALT_DISPLAY_o)) 
+      printf("\n");
+
     if (alt_opt & ALT_DISPLAY_n) 
       {
       /* print assigned nodes */


Also, I found that the columns aren't lining up anymore after the recent
patch that increased the field size for jobname and nodes.  Fixed.


On Wed, Nov 23, 2005 at 01:30:51PM -0700, Dave Jackson alleged:
> Andrew,
> 
>   We have rolled in the patch locally and are testing it now prior to
> release.
> 
>   Thanks for the contribution!
> 
> Dave
> 
> On Wed, 2005-11-23 at 14:55 -0500, Andrew J Caird wrote:
> > That last patch wasn't quite right; the attached one is better.
> > 
> > --andy
> > 
> > On Tue, 22 Nov 2005, Andrew J Caird wrote:
> > 
> > > We were using another version of PBS and had scripts that relied on being 
> > > able to have the "-n" output from qstat on the same lines as the job ID 
> > > (handy for grep'ing and otherwise parsing); the option to do this was -1, but 
> > > it required a -n.  The existing way looks like:
> > > 
> > > [acaird at morpheus-login ~]$ qstat -an
> > > 
> > > cluster1:
> > >                                                               Req'd  Req'd 
> > > Elap
> > > Job ID             Username Queue    Jobname    SessID NDS TSK Memory Time  S 
> > > Time
> > > ------------------ -------- -------- ---------- ------ --- --- ------ ----- - 
> > > -----
> > > 494.cluster1       user1   cac      Sgmntd_CsI   7249     1  --  250mb 02:00 
> > > R 00:29
> > >   mor061/0
> > > 495.cluster1       user1   cac      Sgmntd_CsI   7276     1  --  250mb 02:00 
> > > R 00:29
> > >   mor061/1
> > > 
> > > But we wanted:
> > > 
> > > $ qstat -an1
> > > 
> > > cluster1
> > >                                                               Req'd  Req'd 
> > > Elap
> > > Job ID             Username Queue    Jobname    SessID NDS TSK Memory Time  S 
> > > Time
> > > ------------------ -------- -------- ---------- ------ --- --- ------ ----- - 
> > > -----
> > > 494.cluster1        user1   cac      Sgmntd_CsI   7249     1  --  250mb 02:00 
> > > R 00:30   mor061/0
> > > 495.cluster1        user1   cac      Sgmntd_CsI   7276     1  --  250mb 02:00 
> > > R 00:30   mor061/1
> > > 
> > > It might not be clear from the line wrapping, but in the second example, the 
> > > node names are on the same line as the job ID.
> > > 
> > > The patch to make this happen is attached.  It might not be perfect, but I 
> > > tried to make it as much like the surrounding code as I could.
> > > 
> > > --andy
> > _______________________________________________ torqueusers mailing list torqueusers at supercluster.org http://www.supercluster.org/mailman/listinfo/torqueusers
> 
> _______________________________________________
> torqueusers mailing list
> torqueusers at supercluster.org
> http://www.supercluster.org/mailman/listinfo/torqueusers

-- 
Garrick Staples, Linux/HPCC Administrator
University of Southern California
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.supercluster.org/pipermail/torqueusers/attachments/20051123/62c2acaf/attachment.bin


More information about the torqueusers mailing list