HP3000-L Archives

October 1999, Week 1

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:
Stan Sieler <[log in to unmask]>
Reply To:
Stan Sieler <[log in to unmask]>
Date:
Mon, 4 Oct 1999 16:56:17 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (69 lines)
Ted asks:

>   Is there a (preferably User mode) method to find out what command invoked a
> given program (not Posix)?  Under Un*x, a program can exist under multiple
> names and can act differently depending on which name was used to invoke it
> (witness gzip, gunzip, gzcat).  Is there a way to find out that same
> information for, say, a Pascal/iX program?  (I've already checked PROCINFO,
> HPMYFILE and HPMYPROGRAM, all of which give the actual file name, not the
> name used)

Well, what if your process is the result of an intrinsic call *other*
than COMMAND or HPCICOMMAND?  (E.g., CREATE or CREATEPROCESS)...
then there's no "command" to look at anyway!

Even for commands (via COMMAND, HPCICOMMAND, or as input (direct or
otherwise) to CI.PUB.SYS (or a *copy* of it :), your name may vary:

   /SYS/PUB/FOO
   foo.pub.sys
   foo
   run /SYS/PUB/FOO
   run foo.pub.sys

newlink fum.pub.sys, foo.pub.sys
   run fum.pub.sys

:)

However, the closest that *might* match your needs is:

   Use JOBINFO to determine your job/session's last *TOP-LEVEL* CI command.

E.g, from SHOT:

#J7   JINETD,MANAGER.SYS, PUB, total CPU = 2 seconds, ldev 10, jsmain 71.
   Step: RUN inetd.net.sys
    74    456 CI.PUB.SYS                202 D           Nn SON, FATHER
     76   1571 INETD.NET.SYS            235 D           Pn MESSAGE_WAIT

#J90  JHTTPD,MGR.WWW, OMI, total CPU = 1581 seconds, ldev 10, jsmain 100.
   Step: RUN HTTPD.OMI.WWW;info="-consolelog /WWW/OMI/conf/httpd.config"
   119    537 CI.PUB.SYS                202 D           Nn SON, FATHER
     94    416 HTTPD.OMI.WWW            202 D           Pn MESSAGE_WAIT
      90 250589 HTTPD.OMI.WWW           238 D           nn MESSAGE_WAIT
      91  1326s HTTPD.OMI.WWW           238 D           nn MESSAGE_WAIT

Sessions:
#S1   OPERATOR.SYS, OPERATOR, total CPU = 9 seconds, ldev 20, jsmain 50.
   Step: FULL now,77
    53   5095 CI.PUB.SYS                152 C           Nn TERMINAL_READ_WAIT

#S94  EM,STAN.SIELER, SOURCE, total CPU = 97 seconds, ldev 12, jsmain 84.
   Step: O
    86    523 CI.PUB.SYS                152 C           Nn SON, FATHER
    110  20775 QEDIT.PUB.ROBELLE        152 C           Nn TERMINAL_READ_WAIT
   114   1389 VTSERVER.NET.SYS          152 C           Nn TERMINAL_READ_WAIT

#S55  EM,STAN.SIELER, SOURCE, total CPU = 1053 seconds, ldev 15, jsmain 111.
   Step: QEDIT

Look at the "Step" line...that's what JOBINFO reported.  Note that for
#S94 (where "Step" is "O"), QEDIT (PIN 110) wouldn't have recognized
"O" as somehow invoking itself :)     (O [filename] is my UDC that
runs QEDIT and opens a file (if provided)).

--
Stan Sieler                                          [log in to unmask]
                                         http://www.allegro.com/sieler/

ATOM RSS1 RSS2