Operating System - OpenVMS
1748074 Members
5307 Online
108758 Solutions
New Discussion юеВ

Re: Lexical function node of a running process

 
Toine_1
Regular Advisor

Lexical function node of a running process

Hi,

In a VMS cluster you can use the lexical functions below to find out if a process is running some where in a VMS Cluster.
The lexical function f$pid gives back the process id.
Is there also a lexical function that gives back the actual node name on which the process is running.

$ PROC_NAME = "PRC_TOINE"
$ ctx = ""
$ tmp = F$CONTEXT("PROCESS", ctx, "NODENAME", "*","EQL")
$ tmp = f$context("PROCESS",ctx,"PRCNAM","''PROC_NAME'","EQL")
$ pid = f$pid(ctx)

Thanks,

/Toine
4 REPLIES 4
Toine_1
Regular Advisor

Re: Lexical function node of a running process

Hello,

I found it in the help.

f$getjpi(pid,"NODENAME")

Toine_1
Regular Advisor

Re: Lexical function node of a running process

Closed
Phil.Howell
Honored Contributor

Re: Lexical function node of a running process

use f$getjpi(pid,"NODENAME")
Phil
Hoff
Honored Contributor

Re: Lexical function node of a running process

Well, other than the fact that this approach won't work in other than carefully architected same UIC group environments, and other than that the process name isn't reliable and duplicates have arisen, sure, have at...