This preview shows page 1. Sign up to view the full content.
Unformatted text preview: r time and 40 of system time. It shows that B used a total of 100 milliseconds: 70 of user time and 30 of system time. 9.2.2 Reading the Process Timers
When executing a command from the Unix shell, the user can preﬁx the command with the word “time” to measure the execution time of the command. This command uses the values computed using the accounting scheme described above. For example, to time the execution time of program prog with command line arguments -n 17, the user can simply type the command:
unix> time prog -n 17 After the program has executed, the shell will print a line summarizing the run time statistics, for example,
2.230u 0.260s 0:06.52 38.1% 0+0k 0+0io 80pf+0w The ﬁrst three numbers shown in this line are times. The ﬁrst two show the seconds of user and system time. Observe how both of these show a 0 in the third decimal place. With a timer interval of 10 ms, all timings are multiples of hundredths of seconds. The third number is the total elapsed time, given in minutes and seconds. Observe that the system and user time sum...
View Full Document
- Spring '10
- The American