home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / unix / aix / 11430 < prev    next >
Encoding:
Text File  |  1992-11-09  |  1.9 KB  |  45 lines

  1. Newsgroups: comp.unix.aix
  2. Path: sparky!uunet!utcsri!skule.ecf!epas!nyama!torag!robohack!hybrid!jrh!jrh
  3. From: jrh@jrh.uucp (James R. Hamilton)
  4. Subject: Re: How to redirect outputs from the command "time" into a file?
  5. Message-ID: <1992Nov07.150640.190296@jrh.uucp>
  6. Organization: private system, Toronto, Ontario
  7. References: <1992Nov5.023656.1850@cs.tulane.edu>
  8. Date: Sat, 07 Nov 1992 15:06:40 GMT
  9. Lines: 34
  10.  
  11. In article <1992Nov5.023656.1850@cs.tulane.edu> mt0lamg@convex1.tcs.tulane.edu (Louis X. Lee) writes:
  12. >
  13. >Hello, everyone:
  14. >
  15. >My first question is about saving outputs from the timing command
  16. >"time" into a file. I tried "time a.out > a.time", but it did not
  17. >work. How to capture the outputs into a file? ( I am running
  18. >AIX3.2 on RS/6000 model 550).
  19.  
  20.     Both the csh and ksh provide time command builtins that, to my knowledge,
  21.     can't be redirected.  However, the following will do what you want by
  22.     forcing the time command to run instead of the time shell builtin:
  23.  
  24.          /bin/time cmd >cmd.out 2>time.out
  25.  
  26. >
  27. >My second related question is about the meanings of the outputs
  28. >from the command "time". I guess "real time" is real time, but what
  29. >is "user time"? What is "system time"? InfoExplorer does not
  30. >provide me with a satisfactory answer.
  31. >
  32.     Real time is the elapse, wall clock time, that the program took to 
  33.     complete.  User time is the amount of time that the program was 
  34.     actually executing (as opposed to waiting on a time slice, or I/O
  35.     etc.) in the user address space rather than the kernel.  The sys
  36.     time is the amount of time spent executing kernel code on behalf
  37.     of the program (I/O requests are a typical example).
  38.  
  39.                      --jrh
  40. -- 
  41.  
  42. James R. Hamilton                              inet: jrh@jrh.gts.org
  43. telephone: +1 416 493 4162                     uunet: ...!uunet!jrh!jrh
  44. Toronto, Canada                                work: jrh@torolab6.vnet.ibm.com
  45.