From owner-freebsd-questions@FreeBSD.ORG Fri Nov 28 10:52:31 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1AE61065670 for ; Fri, 28 Nov 2008 10:52:31 +0000 (UTC) (envelope-from OttK@zzz.ee) Received: from zzz.ee (kalah.zzz.ee [194.204.30.253]) by mx1.freebsd.org (Postfix) with ESMTP id 69BAF8FC12 for ; Fri, 28 Nov 2008 10:52:30 +0000 (UTC) (envelope-from OttK@zzz.ee) Received: from zzz.ee (localhost.zzz.ee [127.0.0.1]) by zzz.ee (Postfix) with ESMTP id E300FFD0C1 for ; Fri, 28 Nov 2008 12:52:29 +0200 (EET) Received: by zzz.ee (Postfix, from userid 3019) id E16A6FD0BF; Fri, 28 Nov 2008 12:52:29 +0200 (EET) X-Spam-Checker-Version: SpamAssassin on spamassassin.zzz.ee X-Spam-Level: X-Spam-Guessed-Language: X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,BAYES_50 X-Spam-Checker-URL: http://info.zzz.ee Received: from [192.168.5.3] (adsl215.uninet.ee [194.204.62.215]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by zzz.ee (Postfix) with ESMTPS id 8813FFD0B8 for ; Fri, 28 Nov 2008 12:52:27 +0200 (EET) Message-ID: <492FCD6A.4050103@zzz.ee> Date: Fri, 28 Nov 2008 12:52:26 +0200 From: =?ISO-8859-1?Q?Ott_K=F6stner?= Organization: TIGMA AS User-Agent: Thunderbird 2.0.0.18 (X11/20081125) MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <49202F59.7050802@zzz.ee> <20081116144057.GA3864@icarus.home.lan> <492034B8.9020903@zzz.ee> <492F4086.7040403@FreeBSD.org> <492F95B9.8050506@zzz.ee> <492F9899.9030506@FreeBSD.org> <492FAF64.50507@zzz.ee> <492FB1C1.8070808@FreeBSD.org> <492FBD85.8030604@zzz.ee> <492FC589.2090001@FreeBSD.org> In-Reply-To: <492FC589.2090001@FreeBSD.org> Content-Type: multipart/mixed; boundary="------------080705010309020202010603" X-Virus-Scanned: ClamAV using ClamSMTP @zzz.ee X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: top incorrectly reporting process time X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Nov 2008 10:52:32 -0000 This is a multi-part message in MIME format. --------------080705010309020202010603 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Kris Kennaway wrote: > Ott Köstner wrote: > >> Here is the problem. top returns only 9:42 -- the time of the first >> thread. ps returns the sum of the thread times, which is correct. > > OK, I thought you were claiming the numbers were completely unrelated. > Yeah, top and ps are just reporting different things (runtime of one > thread vs total runtime of all threads). top may have a configuration > option about aggregating the thread runtimes, or it may require a > source code change. > > Kris > Now I understand -- there are actually 2 separate problems -- one with top code, which is the same on all systems and another porblem wihth ps on two amd64 machines I am running: First computer FreeBSD 7.1-PRERELEASE #2 (exact copy / paste) : # ps -ax|grep mysql; echo; ps -axH|grep mysql 981 con- IW 0:00.00 /bin/sh /usr/local/bin/mysqld_safe --defaults-extra-file=/var/db/mysql/my.c 1019 con- S 98:00.87 /usr/local/libexec/mysqld --defaults-extra-file=/var/db/mysql/my.cnf --base 12266 p0 S+ 0:00.00 grep mysql 981 con- IW 0:00.00 /bin/sh /usr/local/bin/mysqld_safe --defaults-extra-file=/var/db/mysql/my.c 1019 con- S 0:01.21 /usr/local/libexec/mysqld --defaults-extra-file=/var/db/mysql/my.cnf --base 1019 con- S 0:00.11 /usr/local/libexec/mysqld --defaults-extra-file=/var/db/mysql/my.cnf --base 1019 con- I 3:13.38 /usr/local/libexec/mysqld --defaults-extra-file=/var/db/mysql/my.cnf --base 1019 con- I 0:00.08 /usr/local/libexec/mysqld --defaults-extra-file=/var/db/mysql/my.cnf --base 1019 con- S 0:00.02 /usr/local/libexec/mysqld --defaults-extra-file=/var/db/mysql/my.cnf --base 12268 p0 R+ 0:00.00 grep mysql 3.xx minutes seems to be correct here, not 98. Second computer FreeBSD 7.1-PRERELEASE #3 (exact copy / paste): # ps -ax|grep mysql; echo; ps -axH|grep mysql 1015 con- I 0:00.01 /bin/sh /usr/local/bin/mysqld_safe --defaults-extra-file=/var/db/mysql/my.c 1079 con- S 582:49.60 [mysqld] 1015 con- I 0:00.01 /bin/sh /usr/local/bin/mysqld_safe --defaults-extra-file=/var/db/mysql/my.c 1079 con- S 2:00.40 [mysqld] 1079 con- I 0:00.00 [mysqld] 1079 con- I 0:01.32 [mysqld] 1079 con- I 0:47.04 [mysqld] 1079 con- I 0:03.56 [mysqld] 1079 con- S 0:26.43 [mysqld] 1079 con- S 3:13.97 [mysqld] 1079 con- S 4:12.72 [mysqld] 1079 con- S 0:03.72 [mysqld] 582 minutes is clearly wrong. Sincerely, O.K. -- Testi oma Interneti kiirust / Test Your Internet speed: http://speedtest.zzz.ee/ --------------080705010309020202010603--