HP3000-L Archives

April 2000, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
John Burke <[log in to unmask]>
Reply To:
John Burke <[log in to unmask]>
Date:
Sun, 23 Apr 2000 21:26:36 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (117 lines)
This seemed almost too good to be true. Turns out it may be.

I was about to include this in the Hidden Value column of the May issue of
The 3000 News/Wire, but when I checked it out (as I usually try to do before
putting a tip in) I found what appears to be a small problem: It only works
on VT and Telnet sessions.

It appears that for DTC connections (and the console, LDEV 20) the
corresponding file in /3000devs/DEVICES/ is created upon boot up and is
never purged, nor is it even updated when someone new signs on to the
device. Thus, while listfile /3000devs/DEVICES/00000020,3 will tell you when
the system was last booted, that is all it will tell you.

John Burke
[log in to unmask]

-----Original Message-----
From: HP-3000 Systems Discussion [mailto:[log in to unmask]]On
Behalf Of Ed Stouder
Sent: Tuesday, April 11, 2000 8:05 AM
To: [log in to unmask]
Subject: Re: User Limits


Here is the rest of the information about seeing when a session signed on.
 This includes a small script file to automate the process.


:showjob  job=@s

JOBNUM  STATE IPRI JIN  JLIST    INTRODUCED  JOB NAME

#S146   EXEC         3  3        TUE  8:23A  FRED,MANAGER.SYS
#S147   EXEC         8  8        TUE  8:44A  JOE,JOE.SMITH
#S148   EXEC         9  9        TUE  8:47A  FRANK,MGR.FRANK


Using the LISTFILE command, we can see what date JOE signed on by looking at
a specific file.

LISTFILE /3000devs/DEVICES/00000008,3


This file in the HFS is purged(if it exists) and then created when ever a
session signons to the logical device 8.

:LISTFILE /3000devs/DEVICES/00000008,3
 ********************
 FILE: /3000devs/DEVICES/00000008

 FILE CODE : 0                   FOPTIONS: BINARY,FIXED,NOCCTL,STD
 BLK FACTOR: 1                   OWNER   : **
 REC SIZE: 256(BYTES)            GROUP ID: **
 BLK SIZE: 256(BYTES)            SECURITY--READ    : ANY
 EXT SIZE: 0(SECT)                         WRITE   : ANY
 NUM REC: 0                                APPEND  : ANY
 NUM SEC: 0                                LOCK    : ANY
 NUM EXT: 0                                EXECUTE : ANY
 MAX REC: 8388607                        **SECURITY IS ON
,PROTECTED,NOBACKUP
                                 FLAGS   : NO ACCESSORS
 NUM LABELS: 0                   CREATED : TUE, APR 11, 2000,  8:44 AM
 MAX LABELS: 0                   MODIFIED: TUE, APR 11, 2000,  8:44 AM
 DISC DEV #: 1                   ACCESSED: TUE, APR 11, 2000,  8:44 AM
 SEC OFFSET: 0                   LABEL ADDR: **
 VOLNAME   : MPEXL_SYSTEM_VOLUME_SET:MEMBER1


As you can see this person signon today. But the same general process can be
used to write a script to tell you what date a session logged on.


Here is a quick script to do the above.

!SETVAR HPMSGFENCE 17
!IF FINFO("SJMSG",0)
!  PURGE SJMSG,TEMP
!ENDIF
!IF FINFO("PFILE",0)
!  PURGE PFILE,TEMP
!ENDIF
!BUILD SJMSG;REC=-79,,F,ASCII;TEMP;MSG
!FILE SJMSG=SJMSG,OLDTEMP
!SHOWJOB JOB=@S;*SJMSG
!SETVAR COUNT FINFO("SJMSG",19)
!WHILE FINFO("SJMSG",19) <> 0
!  INPUT SJLINE < SJMSG
!  IF STR(SJLINE,1,2) = "#S" THEN
!    SETVAR SESS STR(SJLINE,1,7)
!    SETVAR THEDIR "/3000devs/DEVICES/"
!    SETVAR SDEV STR(SJLINE,19,4)
!    SETVAR THEFILE " "
!    SETVAR THEFILE "    " + "!SDEV"
!    SETVAR THEFILE REPL("!THEFILE"," ","0")
!    SETVAR WFILE "!THEDIR" + "!THEFILE"
!    SETVAR SDATE FINFO("!WFILE","CREATED")
!    ECHO SESSION !SESS SIGNED ON, ON !SDATE >>PFILE
!  ENDIF
!ENDWHILE
!SETVAR HPMSGFENCE 0
!PRINT PFILE


This script just prints the date the sessions signed on. You could of course
do other things with the information.


As a side note what happens if a file in the /3000devs/DEVICES/ area gets
corrupted?

The system aborts as soon as someone signs on and the system tries to purge
the file to create the new one.


Ed Stouder
Beechglen Development Inc.

ATOM RSS1 RSS2