Operating System - OpenVMS
1751697 Members
4922 Online
108781 Solutions
New Discussion юеВ

Re: How to get the terminal host on a cluster node.

 
SOLVED
Go to solution
Piet Timmers
Advisor

How to get the terminal host on a cluster node.

Hi,

I have a two node cluster, node1 and node2.
I am logged in node1.

$ show user user1/full gives:
Username Node Process Name PID Terminal
User1 Node1 User1 20E124A3 VTA1290: TNA1291:
(Host: trsr1.bedrijf.lokatie.nl Port: 3399)

User1 Node2 _VTA420: 21017350 VTA420: TNA421:
(Host: trsr2.bedrijf.lokatie.nl Port: 2293)

and I use the following DCL to get the "host" name for this user.


$ Terminal = F$GETJPI(Pid,"TERMINAL")
$ Accpornam = F$GETDVI(Terminal,"TT_ACCPORNAM")
$ Host = F$EDIT(F$ELEMENT(1," ",Accpornam),"COLLAPSE")

And for user1 on node1 I get the requested information, but how to get this for user1 on node2.

Greetings.
4 REPLIES 4
Wim Van den Wyngaert
Honored Contributor

Re: How to get the terminal host on a cluster node.

Piet,

The problem is that you can not examine the terminal with getdvi because it is not on your local node. And getdvi has no node parameter.

You could do :
sh us/fu/out=xxx
open/read x xxx
r:
read x x_rec
pos=f$loc("(Host:",x_rec)
...

Wim
Wim
Wim Van den Wyngaert
Honored Contributor
Solution

Re: How to get the terminal host on a cluster node.

Piet,

You can try f$getjpi(pid,"tt_accpornam).
That works.

Wim
Wim
Piet Timmers
Advisor

Re: How to get the terminal host on a cluster node.

Wim,

Thanks I had not seen that I can use this argument code also for getjpi, but it works.

Thanks.

Piet
Wim Van den Wyngaert
Honored Contributor

Re: How to get the terminal host on a cluster node.

Piet,

Note that when you ho from node a to b to c, you will get b as the return value for the process on c.

Wim
Wim