[root@server23 ~]# time w 12:28:04 up 8 days, 23:22, 1 user, load average: 0.00, 0.02, 0.00 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT root pts/0 rrcs-24-97-153-8 12:09 0.00s 0.08s 0.00s w
real 0m0.003s user 0m0.001s sys 0m0.001s
Rather simple, so I want some more output. So I use the -v switch.
[root@server23 ~]# /usr/bin/time -v w 12:28:32 up 8 days, 23:22, 1 user, load average: 0.00, 0.02, 0.00 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT root pts/0 rrcs-24-97-153-8 12:09 0.00s 0.08s 0.00s /usr/bin/time -v w Command being timed: "w" User time (seconds): 0.00 System time (seconds): 0.00 Percent of CPU this job got: 100% Elapsed (wall clock) time (h:mm:ss or m:ss): 0:00.00 Average shared text size (kbytes): 0 Average unshared data size (kbytes): 0 Average stack size (kbytes): 0 Average total size (kbytes): 0 Maximum resident set size (kbytes): 0 Average resident set size (kbytes): 0 Major (requiring I/O) page faults: 0 Minor (reclaiming a frame) page faults: 269 Voluntary context switches: 1 Involuntary context switches: 0 Swaps: 0 File system inputs: 0 File system outputs: 0 Socket messages sent: 0 Socket messages received: 0 Signals delivered: 0 Page size (bytes): 4096 Exit status: 0
Now I'm confused. Every time I use -v, the user/system time shows up as 0.00 no matter what.
I guess. I don't understand why -v would be less precise than without -v
25 Feb, 2010, David Haley wrote in the 4th comment:
Votes: 0
I would try running it on a program that takes longer. The time manpage says:
Quote
When the running time of a command is very nearly zero, some values (e.g., the percentage of CPU used) may be reported as either zero (which is wrong) or a question mark.
Also, setting -v changes the format string, so maybe it uses a different precision or something, dunno.
Rather simple, so I want some more output. So I use the -v switch.
Now I'm confused. Every time I use -v, the user/system time shows up as 0.00 no matter what.
Any ideas why?