Wanted: A method for keeping track - (nf)

rpw3 at fortune.UUCP rpw3 at fortune.UUCP
Wed May 16 09:11:21 AEST 1984


#R:resonex:-11100:fortune:26900057:000:1556
fortune!rpw3    May 15 14:12:00 1984

+--------------------
| Does anyone know of a good way or system available on UNIX 
| for keeping track of runs of experiments.  I want to run a 
| series of shell scripts with different options and keep track 
| of what I ran and the results of the runs. 
| 		Nancy Blachman
+--------------------

If you're not trying to get too fancy, maybe these ideas will help:

1. If you have some version of Berkeley software (4.1bsd will do), try
   the "script(1)" command. Then execute each run with the "time"
   command. The results will be logged in your script file.

2. With V.7 or USG UNIXs, you need to build a shell script that takes
   commands as arguments, logs the command, runs it with "time", and
   logs that. The following skeleton is offered as a hint:

	$ cat times
	TIMESLOG=${TIMESLOG-times.log}
	date >>$TIMESLOG
	echo "$@" >>$TIMESLOG
	time "$@" 2>>$TIMESLOG
	echo ------------ >>$TIMESLOG
	$

	$ times ls times
	times
	$ times ls -l times
	-rwxr-xr-x 1 rpw3         97 May 15 13:59 times
	$ cat times.log
	Tue May 15 14:01:25 PDT 1984
	ls times
		1.0 real         0.0 user         0.1 sys  
	------------
	Tue May 15 14:02:07 PDT 1984
	ls -l times
		1.0 real         0.0 user         0.1 sys  
	------------
	$

By putting more attention to the formatting of the output produced by "times",
you can make the results easier to analyze (say, with an "awk" script).

Rob Warnock

UUCP:	{ihnp4,ucbvax!amd70,hpda,harpo,sri-unix,allegra}!fortune!rpw3
DDD:	(415)595-8444
USPS:	Fortune Systems Corp, 101 Twin Dolphin Drive, Redwood City, CA 94065



More information about the Comp.unix mailing list