Operating System - OpenVMS
1748211 Members
4771 Online
108759 Solutions
New Discussion

Ending interactive sessions

 
SOLVED
Go to solution
Capt_Vaxman
New Member

Ending interactive sessions

There is a user who never properly logs off of their sessions (despite being asked to do it correctly and shown how to) who I need to end their sessions. This is on a Vax running VAX/VMS V5.5-2H4.

 

I do:

 

> show users

 

VAX/VMS User Processes at 23-APR-2012 10:55:20.83
Total number of users = 6, number of processes = 24

Username Interactive Subprocess Batch
REMOTE 1
OBERKT 19
SYSTEM 1
VT03BM 1
VT05BM 1
VT10BM 1

 

I'd like to get rid of the 19 sessions being run by OBERKT, but when I do a > show sys to find the PID of that process it only lists OBERKT once. How do I get rid of the other 18 sessions being run?

4 REPLIES 4
abrsvc
Respected Contributor
Solution

Re: Ending interactive sessions

The easiest is to user:

SHO USER/INTER OBERKT/FUL

This will produce a list of all of the interactive connections for that user. Please note that the process names for the others will be the "terminal" names. For example: When connected via telnet, the others will be _TNAxxxx where the xxxx is the device number.

Dan
Capt_Vaxman
New Member

Re: Ending interactive sessions

Thank Dan, that's what I was looking for!
Steven Schweda
Honored Contributor

Re: Ending interactive sessions

 
John Gillings
Honored Contributor

Re: Ending interactive sessions

I'm fairly sure F$CONTEXT was available on V5.5, so you can be very specific about what processes you want to find. This procedure will kill all interactive processes for a specified user (or list or users, wildcards permitted), across a cluster. Batch, network and detached processes are ignored.

 

KILLUSER.COM

 

$ ctx = ""
$ temp = F$CONTEXT ("PROCESS", ctx, "NODENAME", "*","EQL")
$ temp = F$CONTEXT ("PROCESS", ctx, "USERNAME", p1,"EQL")
$ temp = F$CONTEXT ("PROCESS", ctx, "MODE", "INTERACTIVE", "EQL")
$ loop: pid=F$PID(ctx)
$ IF pid.NES.""
$ THEN
$   STOP/ID='pid'
$   GOTO loop
$ ENDIF

 

 

 

Example use

$ @KILLUSER BADBOY
$ @KILLUSER JOHN,HOFF,HEIN
$ @KILLUSER J*,H*

 

Looking further at your issue, why are there 19 interactive sessions? Is the user connecting from (say) a PC, not logging off and leaving a dangling process? Depending on the nature of the network connections, you may be able to set network timeouts which will automatically drop a connection. Another possibility would be to enable disconnectable terminals. That way, if a user disconnects, the process will remain for (SYSGEN) TTY_TIMEOUT seconds. If the user logs in again, they will be offered the option to reconnect to the disconnected session. Apart from helping you with your problem user, this is also good for all users. If their PC crashes or the network or p[hone line goes down, they don't necessarily lose the work they were in the middle of on the VMS system. Just log back in and pick up where you left off.

 

Yet another possibility, modify the users UAF entry to

 

UAF> MODIFY BADUSER/MAXJOBS=1

 

This will limit them to a single interactive login. It will obviously prevent them from accumulating 19 dead sessions, and they'll quickly learn that if they don't log off cleanly, they won't be able to get back in without asking you to kill off the dead session.

A crucible of informative mistakes