home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cimshop!helios!vchow
- From: vchow@helios.UUCP (Victor Chow)
- Newsgroups: vmsnet.alpha
- Subject: Re: cpu time measurement on VMS
- Message-ID: <10247@cimshop.UUCP>
- Date: 21 Jan 93 22:57:01 GMT
- References: <1993Jan20.164619.8700@eecs.nwu.edu> <C164Hn.223@dscomsa.desy.de>
- Sender: root@cimshop.UUCP
- Organization: Consilium Inc, Mountain View, CA
- Lines: 59
-
- In article <C164Hn.223@dscomsa.desy.de> you write:
- |> In article <1993Jan20.164619.8700@eecs.nwu.edu>, shil@eecs.nwu.edu
- |> (Lei Shi) writes:
- |>
- |> |>
- |> |>Hi:
- |> |> ... My question is how I can measure the total CPU used by the
- |> |> execution of the program ... in VMS ...
- |> |> Your Sincerely,
- |> |>
- |> |> Lei Shi
- |>
- |> The are various alternatives. The simplest way is to run your program as
- |> a batch job. ... Otherwise, you can use
- |> the $ SHOW PROC /ACC for an interactive session but that cannot (as far as
- |> I am aware) be zeroed before execution of a program. Finally, if this is not
- |> sufficient you should investigate the run time library timer routine
- |> LIB$SHOW_TIMER, LIB$STAT_TIMER ... (try $ HELP RTL LIB$ *TIMER*.
- |>
-
- Lei Shi,
-
- Using LIB$ or SYS$ calls allow you to get accurate accounting information about
- a process the way you want. The disadvantage is that you have to modify your
- source code to do so (and provided that you still have the source code).
-
- Submitting an image to a batch job and get the accounting information from the
- log file should get what you need. However your LOGIN.COM and the system
- SYLOGIN.COM should be relatively short and do not run resource hogging command
- s or images (relative to your actual image). Otherwise the accouting info of
- the batch job does not accurately reflect the resources used by your image
- only. Remember that a VMS batch job includes not only the images/commands you
- want run, but also other commands or images (such as LOGIN.COM and SYLOGIN.COM,
- etc) that are executed as part of the batch job.
-
- Another simple alternative that requires no modification to your code and LOGIN/SYLOGIN.COM is to do the following steps:
-
- 1. create a file, say, your_image.COM like this:
- $ run your_image.EXE or (@ your_dcl.COM)
- $ logout/full
-
- 2. then at the DCL prompt, enter
- SPAWN @your_image.COM
-
- The SPAWN starts a child process which starts with "zeroed" accounting info to
- run your image and the "logout/full" command. The "Accounting information"
- that logout/full prints should be very close to what "your_image" needs (plus
- the overhead needed by the SPAWN(?), @your_image.COM, and "logout/full",etc).
- (I assume your program takes a lot more resources to run than a simple SPAWN
- command.)
-
- As long as you are not trying to precisely measure a tiny image that uses very
- little resource and that you don't need to get the process' accounting info at
- different parts of your image, this simple method should be adequate.
-
- Good luck! 8-)
-
- Victor
-
-