Date: Wed, 8 Aug 2001 12:43:41 +0200 From: Bernd Rinn <Bernd.Rinn@uni-konstanz.de> To: freebsd-ports@FreeBSD.ORG Subject: CPU time inconsistencies Message-ID: <20010808124341.A3351@planck.physik.uni-konstanz.de>
next in thread | raw e-mail | index | archive | help
Hi, I noticed an inconsistency in CPU time report on FreeBSD machines: The rusage values obtained from wait4 by the parrent differs from the value obtained from 'ps aux'. The program I used to test checks its own CPU time with clock() and tries to use 10000s. This is consistent with what the rusage struct of wait4() of the parent reports. But when I look at the 'time' field of 'ps aux' (I use a system call at the end of the test program to get a 'ps' snapshot), I get a higher value (10277s). In other cases I got a lower value when using 'ps'. Is there a way to determine more precisely the CPU time (including all terminated children) of a running process from outside that process than what is obtained from 'ps'? Regards, Bernd P.S.: Please cc to Bernd.Rinn@uni-konstanz.de. -- Bernd Rinn Fakultät für Physik Universität Konstanz Tel. 07531/88-3812, e-mail: Bernd.Rinn@uni-konstanz.de PGP-Fingerprint: 1F AC 31 64 FF EF A9 67 6E 0D 4C 26 0B E7 ED 5C To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010808124341.A3351>