• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 253
  • Last Modified:

Linux: Please interprete time results

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... 10.0.0.1
Connecting to example.com|10.0.0.1|: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

0
hankknight
Asked:
hankknight
2 Solutions
 
ldavis07Commented:
Can you be more clear on exactly what it is you are asking?
0
 
hankknightAuthor Commented:
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?
0
 
PapertripCommented:
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
0
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

 
TintinCommented:
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

0
 
ldavis07Commented:
Time

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

Memory

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

I/O

%I
    Number of file system inputs by the process.
%O
    Number of file system outputs by the process.
%r
    Number of socket messages received by the process.
%s
    Number of socket messages sent by the process.
%k
    Number of signals delivered to the process.
%C
    (Not in tcsh.) Name and command line arguments of the command being timed.
%x
    (Not in tcsh.) Exit status of the command.
0
 
ldavis07Commented:
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 :)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now