User licence - capacity planning

Al Mejia - Sr. Systems Analyst Programmer (ext. 2163) Al.Mejia@Cerritos.edu
Thu, 22 Jan 1998 13:51:22 -0800 (PST)


Our system administrator wrote a little DCL file to track license usage.
It creates a text file (cognos_users.dat) with date/time stamp and
number of concurrent PH proesses.  We would run it via DecScheduler
every 15 minutes.  It's only 31 lines so I've included it at the
end of this message.

=
Al Mejia             |  Voice: (562) 860-2451 ext 2163
Cerritos College     |    Fax: (562) 467-5005
11110 Alondra Blvd   | E-Mail: AMEJIA@CERRITOS.EDU
Norwalk, CA 90650    |    WWW: http://www.cerritos.edu/~amejia/

>Environment is Alpha OpenVMS V6.2, PH 7.10F3.
>We're doing a capacity planning exercise.
>
>Does anyone know of a way to track licence usage (Quiz, Quick, QTP) ?
>
>I'd hate to get to the middle of our peak season and find that we've run out,
>but I don't know of any other way to track usage.
>______________________________________________________________________
>Chris Sharman			Chris.Sharman@CCAgroup.co.uk
>CCA Stationery Ltd, Eastway, Fulwood, Preston, Lancashire, PR2 9WS.



$! keep track of the number of cognos users in cognos_users.dat
$
$ hour = f$integer(f$cvtime(,,"hour"))
$ if hour .lt. 8 then exit
$ if hour .gt. 21 then exit
$ ctx = ""
$ temp = f$context("process", ctx, "nodename", "*", "eql")
$ temp = f$context("process", ctx, "username", "system", "neq")
$ count = 0
$loop:
$ pid = f$pid(ctx)
$ if pid .eqs. "" then goto fini
$ parent = f$getjpi(pid, "master_pid")
$ parent_image = ""
$ if parent .nes. pid then -
  parent_image = f$edit(f$getjpi(parent, "imagname"),"lowercase")
$! if the parent is running powerhouse, don't count this process
$ if f$locate("cognos", parent_image) .ne. f$length(parent_image) then -
  goto loop
$ image = f$edit(f$getjpi(pid, "imagname"),"lowercase")
$ if f$locate("cognos", image) .ne. f$length(image)
$ then 
$  count = count + 1
$ endif
$ goto loop
$fini:
$ rec = f$fao("!AS !4UL", f$cvtime(), count)
$ open /append/share data cognos_users.dat
$ write data rec
$ close data
$ exit