How to time a process?
Kevin Owen
kevino at hpcc01.HP.COM
Thu Mar 14 11:48:27 AEST 1991
It's about time...
I am looking for a way to measure real, user and sys time for a given Unix
process. The "time" command appears to do what I want except it writes it's
output to stderr. I need the results either on stdout or in a file. I cannot
redirect stderr because the procees I am timing also writes to stderr and I
cannot merge the two outputs.
Should I write a C program using times() or is there a way to get /bin/time
to send it's output other than to stderr? Some sample code on the use of
times() (or similar function) would be very helpful as I am somewhat of a
novice when it comes to using Unix system calls.
Any help would be appreciated.
Thanks...
_______________________________________________________________________________
_ , __ Kevin Owen @ Hewlett-Packard
' ) / / ') Sunnyvale, California
/-< _ , __o ____ / / , , , _ ____ Phone : (408) 720-3845
/ ) </_\/ <__/ / < (__/ (_(_/_</_/ / <_ UN*X Mail ...hplabs!hpcc01!kevino
_______________________________________________________________________________
More information about the Comp.unix.programmer
mailing list