home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / vmsnet / alpha / 149 < prev    next >
Encoding:
Internet Message Format  |  1993-01-25  |  3.6 KB

  1. Path: sparky!uunet!spool.mu.edu!yale.edu!newsserver.jvnc.net!netnews.upenn.edu!msuinfo!rudolf.nscl.msu.edu!fox
  2. From: fox@rudolf.nscl.msu.edu (Ron Fox)
  3. Newsgroups: vmsnet.alpha
  4. Subject: Re: (re-posted) cpu time measurement on VMS.
  5. Message-ID: <1k0rskINNg0h@msuinfo.cl.msu.edu>
  6. Date: 25 Jan 93 14:01:56 GMT
  7. References: <10266@cimshop.UUCP>
  8. Reply-To: fox@rudolf.nscl.msu.edu (Ron Fox)
  9. Organization: National Superconducting Cyclotron Lab.
  10. Lines: 83
  11. NNTP-Posting-Host: rudolf.nscl.msu.edu
  12.  
  13.  
  14. --
  15. In article <10266@cimshop.UUCP>, vchow@helios.UUCP (Victor Chow) writes:
  16. >Path: msuinfo!srvr1.engin.umich.edu!uunet!cimshop!helios!vchow
  17. >
  18. >In article <C164Hn.223@dscomsa.desy.de> you write:
  19. >|> In article <1993Jan20.164619.8700@eecs.nwu.edu>, shil@eecs.nwu.edu 
  20. >|>   (Lei Shi) writes:
  21. >|> 
  22. >|> |>
  23. >|> |>Hi: 
  24. >|> |>  ... My question is how I can measure the total CPU used by the 
  25. >|> |> execution of the program ... in VMS ...
  26. >|> |>                    Your Sincerely,
  27. >|> |>
  28. >|> |>                    Lei Shi
  29. >|> 
  30. >|> The are various alternatives. The simplest way is to run your program as 
  31. >|> a batch job.   ...   Otherwise, you can use
  32. >|> the $ SHOW PROC /ACC for an interactive session but that cannot (as far as
  33. >|> I am aware) be zeroed before execution of a program. Finally, if this is not
  34. >|> sufficient you should investigate the run time library timer routine
  35. >|> LIB$SHOW_TIMER, LIB$STAT_TIMER ... (try $ HELP RTL LIB$ *TIMER*.
  36. >|> 
  37. >
  38. >Lei Shi,
  39. >
  40. >Using LIB$ or SYS$ calls allow you to get accurate accounting information about
  41. >a process the way you want.  The disadvantage is that you have to modify your
  42. >source code to do so (and provided that you still have the source code).
  43. >
  44. >Submitting an image to a batch job and get the accounting information from the 
  45. >log file should get what you need.  However your LOGIN.COM and the system
  46. >SYLOGIN.COM should be relatively short and do not run resource hogging command
  47. >s or images (relative to your actual image).  Otherwise the accouting info of
  48. >the batch job does not accurately reflect the resources used by your image
  49. >only. Remember that a VMS batch job includes not only the images/commands you
  50. >want run, but also other commands or images (such as LOGIN.COM and SYLOGIN.COM,
  51. >etc) that are executed as part of the batch job.
  52. >
  53. >Another simple alternative that requires no modification to your code and LOGIN/SYLOGIN.COM is to do the following steps:
  54. >
  55. >1. create a file, say, your_image.COM like this:
  56. >    $ run your_image.EXE        or (@ your_dcl.COM)
  57. >    $ logout/full
  58. >
  59. >2. then at the DCL prompt, enter
  60. >    SPAWN @your_image.COM
  61. >
  62. >The SPAWN starts a child process which starts with "zeroed" accounting info to 
  63. >run your image and the "logout/full" command.  The "Accounting information" 
  64. >that logout/full prints should be very close to what "your_image" needs (plus 
  65. >the overhead needed by the SPAWN(?), @your_image.COM, and "logout/full",etc).  
  66. >(I assume your program takes a lot more resources to run than a simple SPAWN
  67. >command.) 
  68. >
  69. >As long as you are not trying to precisely measure a tiny image that uses very 
  70. >little resource and that you don't need to get the process' accounting info at 
  71. >different parts of your image, this simple method should be adequate. 
  72. >
  73. >Good luck!  8-)
  74. >
  75. >Victor
  76. >
  77. >
  78. >
  79. >
  80. >
  81. >
  82. >
  83.  Non invasive timings can be gotten via:
  84.  
  85. SHOW PROCESS/ACCOUTING
  86. RUN YOUR_IMAGE
  87. SHOW PROCESS/ACCOUTING
  88.  
  89. and doing some simple subtractions. 
  90.     RF.
  91. Ron Fox                     | FOX@MSUNSCL.BITNET      | Where the name 
  92. NSCL                        | FOX@RUDOLF.NSCL.MSU.EDU | goes on before
  93. Michigan State University   | MSUHEP::RUDOLF::FOX     | the quality
  94. East Lansing, MI 48824-1321 |                         | goes in.
  95. USA
  96.