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

VMS Logins and logouts

SOLVED
Go to solution
Steve ward_3
Advisor

VMS Logins and logouts

Other than referencing the accounting.dat file to find out when a user logs in, is there a reference that tells us when they logout?

6 REPLIES
John Gillings
Honored Contributor
Solution

Re: VMS Logins and logouts

Steve,
Auditing is probably the best:

$ SET AUDIT/AUDIT/ENABLE=LOGIN=ALL
$ SET AUDIT/AUDIT/ENABLE=LOGOUT=ALL

The former writes an audit record for any login, the latter a record for any logout.

Use ANALYZE/AUDIT to find events.

ACCOUNTING records have both the login and logout times for the process they're recording, but obviously the login isn't recorded until the process has logged out. Since a power failure or system crash will stop the process without an accounting record, you'll lose all record of a process which was logged in at the time. With auditing you'll at least be able to identify which processes were logged in.

In OOTB OpenVMS there is no "hook" to catch a logout and (say) execute some code. There are numberous ways of implementing such a mechanism with variable reliability.
A crucible of informative mistakes
Jon Pinkley
Honored Contributor

Re: VMS Logins and logouts

If you are thinking of something analogous to the "last login" maintained in the UAF, no there is no "last logout".

Besides accountng.dat Process Termination records, there is auditing for logouts (if selected), but that doesn't catch process deletions caused by $stop/id=xxx. Auditing for process DELPRC will catch that.

$ set audit/audit/enable=process=(DELPRC) ! you may want additional items

We use /enable=process=all which results in these being audited:

CREPRC,DELPRC,SCHDWK,CANWAK,WAKE,SUSPND,RESUME,GRANTID,REVOKID,GETJPI,FORCEX,SIGPRC,SETPRI,PRCTERM,CPU_CAPABILITIES,PROCESS_CAPABILITIES,PROCESS_AFFINITY,SET_IMPLICIT_AFFINITY

Accounting and auditing are the only reliable sources of process termination times that I am aware of in the general case.
it depends
Steve ward_3
Advisor

Re: VMS Logins and logouts

Thanks!

Steve ward_3
Advisor

Re: VMS Logins and logouts

Thanks!
Jon Pinkley
Honored Contributor

Re: VMS Logins and logouts

In the case of a cluster, the process termination or accounting times are from the node where the process was running, so unless you are running something to keep the clocks synchronized (NTP, DTSS or something else), clocks on each node will tend to drift apart, just like your battery operated quartz clocks do.

The point is that a time stamp of 17:05:01.23 on NODEA didn't necessarily occur before something with a timestamp of 17:06:23.89 on NODEB (hopefully your clocks wouldn't be over a minute different from each other, but I have seen that on clusters that have been up for a long time).

Jon
it depends
Hoff
Honored Contributor

Re: VMS Logins and logouts

How are these nice folks logging in and out?

OpenVMS is fairly limited here, but there are other solutions to the requirement. Network monitoring or out-board monitors comes to mind, for instance. Though distributed auditing tie-ins with OpenVMS itself are lacking, it can be done. (Few folks now work locally on hard-wired connections, after all.)

Probably the most reliable mechanism is to implement a simple system monitor task; a process that watches user activity, and writes records for significant changes. Supplement what OpenVMS is doing here.

Poke around for previous discussions, too.