🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by Victor Chow Fri, 22 Jan 1993 17:29
(re-posted) cpu time measurement on VMS.
#30
Author: Victor Chow
Date: Fri, 22 Jan 1993 17:29
58 lines
2930 bytes
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
Re: (re-posted) cpu time measurement on VMS.
#45
Author: Ron Fox
Date: Mon, 25 Jan 1993 14:01
83 lines
3785 bytes
--
In article <10266@cimshop.UUCP>, vchow@helios.UUCP (Victor Chow) writes:
>Path: msuinfo!srvr1.engin.umich.edu!uunet!cimshop!helios!vchow
>
>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
>
>
>
>
>
>
>
 Non invasive timings can be gotten via:

SHOW PROCESS/ACCOUTING
RUN YOUR_IMAGE
SHOW PROCESS/ACCOUTING

and doing some simple subtractions. 
	RF.
Ron Fox                     | FOX@MSUNSCL.BITNET      | Where the name 
NSCL                        | FOX@RUDOLF.NSCL.MSU.EDU | goes on before
Michigan State University   | MSUHEP::RUDOLF::FOX     | the quality
East Lansing, MI 48824-1321 |                         | goes in.
USA
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads