HP3000-L Archives

May 2004, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Vance, Jeff H (Cupertino)" <[log in to unmask]>
Reply To:
Vance, Jeff H (Cupertino)
Date:
Mon, 17 May 2004 12:55:44 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (106 lines)
Hi all,

Partly to satisfy a SIB ballot item ("Add ability to the SHOWJOB command
to see all jobs in a job queue: SHOWJOB JOB=@J;JOBQ=MYQUEUE..."), and
partly just for fun, I put a new script on Jazz which I think does this
and more.  Check out:
  http://jazz.external.hp.com/src/scripts/showj.txt

Let me know if this meets the need stated above, and if not please let
me know why and how it can be improved.

If you enter :showj ? you will get this help page:

==================================================================
  Usage: SHOWJ [jobIDs userIDs...] [- jobIDs - userIDs...]
               [;JOBQ= qname] [;DEV=ldev] [;IP=ip_addr]
               [;EXEC] [;SCHED] [;WAIT] [;SUSP]
  where: jobID   :: [#]J|Snnn
         userID  :: [@J|S:][jobname,]username[.acctname] or
                    @  or @J  or @S
                  * a specified jobname, even '@', means that a
                    jobname must be present to match.
                  * an omitted jobname means the jobname does not
                    affect the selection, it is ignored.
                  * a null jobname ',' means a jobname must not be
                    present in order to match.

         qname   :: the name of a job queue (jobs only).
         ldev    :: a valid LDEV number.
         ip_addr :: an IP address in dotted form (sessions only).
         EXEC    = show only executing jobs that match.
         SCHED   = show only scheduled jobs that match.
         WAIT    = show only waiting jobs that match.
         SUSP    = show only suspended jobs that match.
                   EXEC, SCHED, WAIT, SUSP can be combined, e.g.,
                   ;exec ;wait

 The default is to show all job/sessions that match the jobID
 specifications.  If jobID is omitted '@' is assumed.

 Note: jobname, username, acctname, qname, ldev and ip address can
       be wildcarded.
 Note: the @S|J: format means to match only jobs or only sessions
       for the supplied user.acct.

 Jobs/sessions matching IDs after a minus ('-') are skipped and thus
 not displayed.

 Multiple jobIDs and userIDs can *only* be separated by a space
 since a comma is part of the userID specification.
==================================================================

A few examples:

1. find all sessions (not jobs) logged on in the SYS account, plus #J2,
but nothing in SYS with a username starting with "OP".

:showj @s:@.sys j2 [log in to unmask]
JobNum  State InPri JIn JList JobQ     Introduced  Job Name

#J2     EXEC        10S LP    HPSYSJQ  WED 10:13A  JINETD,MANAGER.SYS
#S7     EXEC        31  31             WED  4:24P  LAR,MANAGER.SYS
#S12    EXEC        16  16             THU  7:01A  MIKEA,MANAGER.SYS
#S32    EXEC        35  35             FRI  4:05P  BA,MANAGER.SYS

    Number of sessions displayed: 3
    Number of jobs     displayed: 1

      Total: 4    Skipped: 10

2. show all jobs in all job queues ending in "Q" which are scheduled.

:showj ;jobq=@q ;sched
JobNum  State InPri JIn JList JobQ     Introduced  Job Name

#J145   SCHED   15  10S PP    HPSYSJQ   5/17/04 13:13
CHECKJOB,MANAGER.SYS

    Number of sessions displayed: 0
    Number of jobs     displayed: 1

3. show all connections whose remote IP address begins with "15." and
have logged on
to any account but SYS

:showj @[log in to unmask]; ip=15.@
JobNum  State InPri JIn JList JobQ     Introduced  Job Name

#S42    EXEC        17  17             MON  9:58A  JEFF.VANCE
        15.244.74.194
#S43    EXEC        18  18             MON 11:00A  T4475026,MGR.HAWKINS
        15.61.193.201

    Number of sessions displayed: 2
    Number of jobs     displayed: 0

      Total: 2    Skipped: 12



 Regards,
 Jeff Vance, vCSY

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2