Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

How to find the pid associated to a lnm$job_xxxxx table

 
SOLVED
Go to solution

How to find the pid associated to a lnm$job_xxxxx table

Hi,

Here is my question :

I have a logical name defined in a lnm$job_xxxxxx table.
I would like to know what is the pid of the process that has this table as job table.

Thanks for your help

Seghers Bruno
Belgium (French speaking)
6 REPLIES 6
Kris Clippeleyr
Honored Contributor
Solution

Re: How to find the pid associated to a lnm$job_xxxxx table

Hi,
Example with LNM$JOB_816F1F40, using ANALYZE/SYSTEM on OpenVMS Alpha V7.3-2...

SDA> read sysdef
SDA> format 816F1F40
Look for the "JIB$L_MPID"

FFFFFFFF.816F1FA4 JIB$L_MPID 0004014A

SDA> set proc/id=0004014A
SDA> show proc

And you have the info...
Regards,
Kris (aka Qkcl)
I'm gonna hit the highway like a battering ram on a silver-black phantom bike...
Wim Van den Wyngaert
Honored Contributor

Re: How to find the pid associated to a lnm$job_xxxxx table

Hi Bruno of Belgium-South,

Put in sylogin
def/job jobpid 'f$getjpi(0,"pid")'

and you see the pid in the job table. Of course, only for processes that execute the sylogin.

Wim of Belgium-Nord
Wim
Jon Pinkley
Honored Contributor

Re: How to find the pid associated to a lnm$job_xxxxx table

Kris gave the answer to get one (the master pid) of the (possibly many) processes that are part of the same job, and therefore share the job logical name table. Since a job is the master process and all of its subprocesses, there are possibly many processes within the same job.

Here's an explaination of the method he provided.

The 8 hex digits following lnm$job_ form the system address of the Job Information Block (JIB), and at offset JIB$L_MPID there is a longword that contains the internal PID of the Master Process (the initial process in the job). The internal PID doesn't have the stuff that makes a PID unique in a cluster, but SDA is happy to accept the IPID or the EPID in a set process/id, and a show process will then display the Extended PID (EPID) which is what you normally see in things like show system.

Given the above example give by Kris, you can also use the command:

SDA> exam 816F1F40+JIB$L_MPID

in place of the

SDA> format 816F1F40

so you don't need to search for the JIB$L_MPID.
it depends

Re: How to find the pid associated to a lnm$job_xxxxx table

Thanks a lot,

It works fine

Re: How to find the pid associated to a lnm$job_xxxxx table

Thanks to all
labadie_1
Honored Contributor

Re: How to find the pid associated to a lnm$job_xxxxx table

Bonjour Bruno

Ian Miller has written a handy SDA extension called LN
http://vms.process.com/ftp/vms-freeware/fileserv/ln_sda.zip

that may help.

And in Sda, you have LNM
sda> LNM LOAD
sda> LNM START TRACE
or
sda> LNM SH TRACE/LOGICAL

and
sda> LNM START COLLECT/LOGICAL

By the way, once you have your value, you can pipe all that, example with 8182DFC0
$ say := wr sys$output
$ pipe ( say "read sysdef" ; say " exam 8182DFC0+JIB$L_MPID" ) | ana/sys

I have submitted 3 procedures recently with a similar idea on dcl.openvms.org