Linux: Please interprete time results

Posted on 2011-10-19
Medium Priority
Last Modified: 2012-05-12
I see lots of numbers and I don't know what they mean.  How long did it take this page to load?
%time wget http://example.com/
--2011-10-19 14:32:31--  http://example.com/
Resolving example.com...
Connecting to example.com||:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `index.html'

    [ <=>                                   ] 28,426      --.-K/s   in 0s      

2011-10-19 14:32:33 (630 MB/s) - `index.html' saved [28426]

0.000u 0.002s 0:01.62 0.0%      0+0k 0+0io 0pf+0w

Open in new window

Question by:hankknight

Expert Comment

ID: 36995126
Can you be more clear on exactly what it is you are asking?
LVL 16

Author Comment

ID: 36995189
I used the time command to time something.  It returned this:
0.000u 0.002s 0:01.62 0.0%      0+0k 0+0io 0pf+0w

What do those numbers mean?
How long did the event actually take?
LVL 21

Accepted Solution

Papertrip earned 1200 total points
ID: 36995227
Haven't seem a time output formatted quite like that before, which shell are you using?

0.000u -- CPU time in seconds used by process while in user mode
0.002s -- CPU time spent in kernel mode
0:01.62 -- real time spent in seconds

These other ones I'm not sure about, depends on which shell you are using or if it's some external time app for instance.
0.0% -- not sure
0+0k -- not sure, possibly process size in memory, possibly number of signals sent to process
0+0io -- most likely i/o wait
0pf -- most likely number of page faults
+0w -- probably number of context-switches that occurred
Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

LVL 48

Assisted Solution

Tintin earned 800 total points
ID: 36995237
The wget command took 1.62 seconds to complete.

0.000u is the CPU time spent on "user" requests
0.002s is the CPU time spent on "system" requests


Expert Comment

ID: 36995242

    Elapsed real time (in [hours:]minutes:seconds).
    (Not in tcsh.) Elapsed real time (in seconds).
    Total number of CPU-seconds that the process spent in kernel mode.
    Total number of CPU-seconds that the process spent in user mode.
    Percentage of the CPU that this job got, computed as (%U + %S) / %E.


    Maximum resident set size of the process during its lifetime, in Kbytes.
    (Not in tcsh.) Average resident set size of the process, in Kbytes.
    Average total (data+stack+text) memory use of the process, in Kbytes.
    Average size of the process's unshared data area, in Kbytes.
    (Not in tcsh.) Average size of the process's unshared stack space, in Kbytes.
    Average size of the process's shared text space, in Kbytes.
    (Not in tcsh.) System's page size, in bytes. This is a per-system constant, but varies between systems.
    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.
    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.
    Number of times the process was swapped out of main memory.
    Number of times the process was context-switched involuntarily (because the time slice expired).
    Number of waits: times that the program was context-switched voluntarily, for instance while waiting for an I/O operation to complete.


    Number of file system inputs by the process.
    Number of file system outputs by the process.
    Number of socket messages received by the process.
    Number of socket messages sent by the process.
    Number of signals delivered to the process.
    (Not in tcsh.) Name and command line arguments of the command being timed.
    (Not in tcsh.) Exit status of the command.

Expert Comment

ID: 36995248
The time command runs the specified program command with the given arguments. When command finishes, time writes a message to standard output giving timing statistics about this program run. These statistics consist of (i) the elapsed real time between invocation and termination, (ii) the user CPU time (the sum of the tms_utime and tms_cutime values in a struct tms as returned by times(2)), and (iii) the system CPU time (the sum of the tms_stime and tms_cstime values in a struct tms as returned by times(2)).  

Hope that helps :)

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month14 days, 15 hours left to enroll

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question