Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!hplabs!hpcc05!hpcc01!kevino From: kevino@hpcc01.HP.COM (Kevin Owen) Newsgroups: comp.unix.programmer Subject: How to time a process? Message-ID: <2550001@hpcc01.HP.COM> Date: 14 Mar 91 01:48:27 GMT Organization: HP Corp Computing & Services Lines: 23 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 / )