Meaning of csh "time" output?

Jerry Peek jerryp at cmx.npac.syr.edu
Tue Apr 19 01:37:32 AEST 1988


In article <309 at rhesus.primate.wisc.edu> bin at rhesus.primate.wisc.edu (Brain in Neutral) writes:
> 
> The csh "time" command produces lines of the form:
> 
> 	0.1u 0.4s 0:01 41% 18+17k 0+11io 21pf+8w

There's a way (undocumented on a lot of systems) to change this output to
any format you like.  I have a file called "settime" that makes a more readable
output.  Here's a demo (note that the output has different numbers, but that's
not the fault of the "settime" file):

	% date
	Mon Apr 18 10:48:56 EDT 1988
	% set time=0
	% date
	Mon Apr 18 10:49:06 EDT 1988
	0.0u 0.0s 0:00 50% 8+0k 1+0io 0pf+0w
	% source ~/.lib/settime
	% date
	Mon Apr 18 10:49:25 EDT 1988
	  user=0.0 sec, system=0.0 sec, elapsed=0:00 min, cpu use=9%, 0 swaps,
	  2 disk reads, 1 disk writes.  Data+stack+text pages: 24 avg., 3 max.

Here's what's in the "settime" file.  Sorry, but I couldn't see putting it
into a shell archive.

--Jerry Peek, Northeast Parallel Architectures Center, Syracuse, NY
  jerryp at amax.npac.syr.edu
  (315)423-1722

-----------  cut here and save in file named "settime" -----------
# file that sets C-shell "time" variable in my own format.
# shows time of all processes and built-in commands.
# Usage: 	% source ~/.lib/settime
set time = (0 "  user=%U sec, system=%S sec, elapsed=%E min, cpu use=%P, %W swaps,\
  %I disk reads, %O disk writes.  Data+stack+text pages: %K avg., %M max.")



More information about the Comp.unix.questions mailing list