|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
||||
|
||||
|
Can someone explain output of "time"
I get the following from the command line:
Code:
whitestar sepodati 211 (~/html/txjobs) : time /usr/bin/php index.php > /dev/null 0.032u 0.024s 0:00.05 100.0% 1467+2611k 0+0io 0pf+0w I've read the man page on "time", but it didn't explain what all of those numbers are. Can someone explain them to me? Thanks. ---John Holmes... |
|
#2
|
|||
|
|||
|
Online man page:
http://unixhelp.ed.ac.uk/CGI/man-cgi?time Looks like this is what you're looking for: The default format string is %Uuser %Ssystem %Eelapsed %PCPU (%Xtext+%Ddata %Mmax)k %Iinputs+%Ooutputs (%Fmajor+%Rminor)pagefaults %Wswaps (or, for better readability): %U %S %E %P %K (%I%O) (%F%R) %W Where or the first set of numbers: %U Total number of CPU-seconds that the process spent in user mode (0.032u). %S Total number of CPU-seconds that the process spent in kernel mode (0.024s). %E Elapsed real time (in [hours:]minutes:seconds) (0:00.05). %P Percentage of the CPU that this job got, computed as (%U + %S) / %E (100.0%). and for the second set: %K Average total (data+stack+text) memory use of the process, in Kbytes (1467+2611k) %I Number of file system inputs by the process (0) %O Number of file system outputs by the process (0) %F Number of major page faults that occurred while the process was running. These are faults where the page has to be read in from disk (0) %R Number of minor, or recoverable, page faults. These are faults for pages that are not valid but which have not yet been claimed by other virtual pages. Thus the data in the page is still valid but the system tables must be updated (0) %W Number of times the process was swapped out of main memory (0) Sorry about the formatting if it's a bit hard to read, but the man page is quite a pain to read from as well. -Gary |
|
#3
|
||||
|
||||
|
Thank you for the explanation Gary.
Quote:
Does this mean that the program took up 4078 bytes of memory when it ran (1467 + 2611)? That would be useful to know for a PHP script. Thanks, ---John Holmes... |
|
#4
|
|||
|
|||
|
John,
Looks like the first number is the memory used for data, and the second for stack memory, which could be system calls or kernel memory. I'd say that that number is the total amount of system memory needed to execute the app. I guess it takes the amount of memory needed by the program, the amount of memory needed from the system level (kernel, device drivers, etc), and combines them. What I think I'm trying to say is that the first number is what's needed extra from the system memory in addition to the amount that's already taken up as overhead. Oh, and that output is in number of kilobytes, so it'd be a little over 4MB total. Hope I didn't confuse, it's a little odd. -Gary |
|
#5
|
||||
|
||||
|
Thanks again. I think I follow that.
![]() John |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > BSD Help > Can someone explain output of "time" |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|