HP3000-L Archives

October 2002, Week 5

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:
Tom Emerson <[log in to unmask]>
Reply To:
Tom Emerson <[log in to unmask]>
Date:
Thu, 31 Oct 2002 12:58:58 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (45 lines)
On Thursday 31 October 2002 11:21, Michael Berkowitz wrote:
> Tim Atwood writes
>> Anyone have a brilliant idea how to get a high-water mark of the number of
>> sessions on at any one time? Say during a one month period?
[...]
> ---------------------------------------------------
> As part of our user logon security system (home grown), we capture the
> value of the variable HPSESCOUNT at session logon time.  This shows the
> number of users currently logged on.  Simply capture this into the data
> base of your choice.

Along those lines, you could set up a job that runs "all the time" with a
simple while-forever loop:

setvar hiwater HPSESSCOUNT
while true
   setvar x hpsesscount
   if (x > hiwater)
      setvar hiwater x
   endif
   pause <some interval>
endwhile

capturing "hpsesscount" into the variable "x" avoids the situation where
sessions drop off between "if hpsesscount > hiwater" and "setvar hiwater
hpsesscount", thus giving you a false hiwater reading.  HOWEVER, due to the
fact you don't have infinitely small granularity because of the pause, this
is kind of a moot point :)

Then again, the other problem you have is in getting this "hiwatermark"
information out of the job... ("while true" takes soo long to execute -- I
guess you'd have to get an uncrippled HP-UX processor to finish it in some
reasonable amount of time ... :)

But, the "wow, I coulda had a V-8" solution is to scan your log file(s) --
every time you get a "session start" record (102? 103? can't remember), bump
up the counter and check against your "hiwater mark"; every time a session
termination record comes up you decrement the variable.  [system
crash/restart records obviously reset the "current count" to zero...]  Of
course, if your current count goes negative, start checking for cracker
activity...

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2