Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754436AbYHFWH4 (ORCPT ); Wed, 6 Aug 2008 18:07:56 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752508AbYHFWHs (ORCPT ); Wed, 6 Aug 2008 18:07:48 -0400 Received: from py-out-1112.google.com ([64.233.166.181]:6108 "EHLO py-out-1112.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752108AbYHFWHr (ORCPT ); Wed, 6 Aug 2008 18:07:47 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=kfZ0l1x3xJyGD76KDHahorDIIcPKeKGZ86jxT1UEh4JUCkgh1xT/FKuiB4bCV3zhpf EpPxRGBzqDm15DpfW0Kcf/ayRvVu8IlCd2+meWLCm7XnWjkWxvOpxAT+jPqMBFrnbag6 Aqg+sbvF1MPeYJmdyU/+MezqgveyiN0QPOIlE= Message-ID: Date: Wed, 6 Aug 2008 22:07:46 +0000 From: "=?UTF-8?Q?Piotr_Jaroszy=C5=84ski?=" To: "Ray Lee" Subject: Re: HZ from userspace Cc: linux-kernel@vger.kernel.org In-Reply-To: <2c0942db0808061449s48ba235cy1b5672c0952b8fdf@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline References: <2c0942db0808061449s48ba235cy1b5672c0952b8fdf@mail.gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by alpha.home.local id m76M80IG013851 Content-Length: 760 Lines: 3 >> I want to be able to convert starttime from /proc/#/stat to absolute>> time and it seems that I need HZ to do that as it is measured in>> jiffies. How can I get HZ? I have seen some discussion about this but>> haven't found a definite answer. procps is using some hacks do it and>> I would prefer to avoid them.>> I only need a solution for modern kernels, say 2.6.20+ if that matters.>> `man sysconf`, in particular you want sysconf(_SC_CLK_TCK). manpage says it's obsolete and i read in some discussion that it onlyreturns the default and not the real HZ used. -- Best Regards,Piotr Jaroszyński????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?