From: be-news06@lina.inka.de (Bernd Eckenfels)
To: linux-kernel@vger.kernel.org
Subject: Re: How to find the CPU usage of a process
Date: Sat, 18 Feb 2006 20:27:23 +0100 [thread overview]
Message-ID: <E1FAXjn-0001V7-00@calista.inka.de> (raw)
In-Reply-To: <a36005b50602181055n454c446aoed83ea21baaf1a67@mail.gmail.com>
Ulrich Drepper <drepper@gmail.com> wrote:
> That's after the fact. Programs which want to get the information
> while running can use the CPU clocks:
>
> struct timespec ts;
> if (clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &ts) != 0)
> fatal("cannot get CPU time");
> /* result is in TS */
But thats only for yourself, right?
Gruss
Bernd
next prev parent reply other threads:[~2006-02-18 19:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-18 17:42 Irfan Habib
2006-02-18 18:44 ` Bernd Eckenfels
2006-02-18 18:55 ` Ulrich Drepper
2006-02-18 19:27 ` Bernd Eckenfels [this message]
2006-02-18 20:15 ` Ulrich Drepper
2006-02-18 17:42 Irfan Habib
2006-02-19 19:06 ` Chris Wedgwood
2006-02-20 0:42 ` Irfan Habib
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=E1FAXjn-0001V7-00@calista.inka.de \
--to=be-news06@lina.inka.de \
--cc=linux-kernel@vger.kernel.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®