mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Piotr Jaroszyński" <p.jaroszynski@gmail.com>
To: "Ray Lee" <ray-lk@madrabbit.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: HZ from userspace
Date: Wed, 6 Aug 2008 22:20:16 +0000	[thread overview]
Message-ID: <d77765540808061520g72de2f40p57ec1f80d0b3d7a0@mail.gmail.com> (raw)
In-Reply-To: <2c0942db0808061516r730496d6hbc75eb9c5b49923a@mail.gmail.com>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=UTF-8, Size: 1149 bytes --]

>>>> 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Ç+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

  parent reply	other threads:[~2008-08-06 22:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-06 20:48 Piotr Jaroszyński
2008-08-06 21:49 ` Ray Lee
2008-08-06 22:07   ` Piotr Jaroszyński
2008-08-06 22:16     ` Ray Lee
2008-08-06 22:20       ` Ray Lee
2008-08-06 22:20       ` Piotr Jaroszyński [this message]
2008-08-06 22:19     ` Sven Wegener

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d77765540808061520g72de2f40p57ec1f80d0b3d7a0@mail.gmail.com \
    --to=p.jaroszynski@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ray-lk@madrabbit.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®