[comp.os.vms] cost program

fsimmons@umn-d-ub.D.UMN.EDU (Frank Simmons) (04/18/88)

 I am looking for a program to compute the cost of a job under VMS.  Something
 that one can slide into the DCL stream as a DCL command. i.e.


      $ fort myprog
      $ link my prog
      $ run myprog
      $ cost

 Anyone know of such a beast?

 Frank Simmons

carl@CITHEX.CALTECH.EDU (Carl J Lydick) (04/25/88)

 >  I am looking for a program to compute the cost of a job under VMS.  Something
 >  that one can slide into the DCL stream as a DCL command. i.e.
 > 
 > 
 >       $ fort myprog
 >       $ link my prog
 >       $ run myprog
 >       $ cost
 > 
 >  Anyone know of such a beast?

The cost of the job (and even the algorithm as well as the parameters for
computing it) will vary from system to system, so I doubt you'll find any
program out there that does exactly what you want.  However, it should be
easy for you to write a DCL procedure to do it, given that you can find
out how your site charges for various resources.  The guts of such a procedure
will be a command of the form:
	$ SHOW PROCESS/ACCOUNTING/OUTPUT=temp_file_name
This will produce a file whose contents look something like:

<CRLF>24-APR-1988 23:54:51.65                      User: CARL        
<CRLF>Accounting information:
 Buffered I/O count:        65  Peak working set size:        286
 Direct I/O count:           5  Peak virtual size:           2165
 Page faults:              276  Mounted volumes:                0
 Images activated:           1
 Elapsed CPU time:      0 00:00:00.83<CRLF> Connect time:          0 00:00:07.44

Where <CRLF> stands for a carriage-return, line-feed sequence imbedded in
the record.  You can then use the DCL OPEN, READ, and CLOSE commands and
the DCL lexical functions to grab whatever accounting information is used
at your site to figure cost, and plug the results into the local formula.

Or you could create a TPU script to do the same thing.  Or you could write
a program in some other language to do it.
-------