Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755660AbYHFWVI (ORCPT ); Wed, 6 Aug 2008 18:21:08 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755287AbYHFWUX (ORCPT ); Wed, 6 Aug 2008 18:20:23 -0400 Received: from yw-out-2324.google.com ([74.125.46.31]:19409 "EHLO yw-out-2324.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755282AbYHFWUS (ORCPT ); Wed, 6 Aug 2008 18:20:18 -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=xM2EswejUGDyUQX5O5TOLMq7WBGY570A8IHnoEKYRdwJvxBRQcOCCAX7F5yNrzyQPe uWrqC2AJ1dUyoElIxiXm5+t27BCoQi5Jbh/uJtSOne0ixHkGDk/b7XnUXqiLfgAn3Y82 HkIK+4tNWZjseutS/Xs540lEgdsRZlI+IbnsU= Message-ID: Date: Wed, 6 Aug 2008 22:20:16 +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: <2c0942db0808061516r730496d6hbc75eb9c5b49923a@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline References: <2c0942db0808061449s48ba235cy1b5672c0952b8fdf@mail.gmail.com> <2c0942db0808061516r730496d6hbc75eb9c5b49923a@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 m76MLTIG013928 Content-Length: 1149 Lines: 4 >>>> 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 only>> returns the default and not the real HZ used.>> I believe the claim that it's out of date is out of date. manpages> 3.0.1 has an update to this, according to a message I saw on this list> a month or so ago.>> Regardless, the fields you're reading should all be showing USER_HZ> which is fixed at 100 per second regardless of the underlying kernel> HZ parameter.>> Try it. Ah ok, thanks a lot for info, will do. -- Best regards,Piotr Jaroszyński????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?