[comp.unix.wizards] "time" command in csh

pardo@june.cs.washington.edu (David Keppel) (05/21/88)

[ Advance apology if recent topic, I can't keep up with the volume here ]

I'm trying to undestand the meaning of the "time" builtin command in
csh(1).  I've looked at Ultrix 2.0, 4.3 BSD and USENIX man pages, all
to no avail.

If anybody can please tell me, even to a first approximation, what the
various numbers mean, I'd appreciate the information.

Also, I vaguely remember that somebody in this group (perhaps 2 years
ago) made up a man page just for the "time" builtin.  If anybody has a
copy of that lying around, it would be *real* useful.

Please e-mail if practical; if sufficient interest I will summarize.

	;-D on  ( But your *vice* president *is* a crook )  Pardo

		pardo@june.cs.washington.edu
		..!ucbvax!uw-beaver!uw-june!pardo

andrew@frip.gwd.tek.com (Andrew Klossner) (05/24/88)

	"If anybody can please tell me, even to a first approximation,
	what the various numbers mean, I'd appreciate the information."

Here's what it means under UTek, the Tektronix Berkeley-derived system.
I don't know whether we changed it from vanilla Berkeley.

	0.0u 0.0s 0:00 100% 0+0k 0+0io 0pf+0w
					   ^ number of swaps
				       ^ major page faults
				   ^ blocks written
				 ^ blocks read
			      ^ data segment resident set size (in kilobytes)
			    ^ text segment resident set size (in kilobytes)
			 ^ average percentage of CPU cycles used
		     ^ elapsed time
	       ^ system time
	  ^ user time

  -=- Andrew Klossner   (decvax!tektronix!tekecs!andrew)       [UUCP]
                        (andrew%tekecs.tek.com@relay.cs.net)   [ARPA]

maujd@warwick.UUCP (Geoff Rimmer) (06/02/88)

What I would suggest for the user who just wants simple information
from the time command is to put the following line in .cshrc

	set time = (10 "Time taken is %E")

This means that if a process takes more than 10 CPU seconds, you get
the message 

	Time taken is xx:yy

-- This indicates that it took xx mins yy secs of "real" time to
execute the command.)  Other %? things are available - see csh.1 for
more info!

	------------------------------------------------------------
	Geoff Rimmer, Computer Science, Warwick University, UK.
	maujd@uk.ac.warwick.opal
	------------------------------------------------------------