From: Adam Dyga <adeon@tlen.pl>
To: linux-c-programming <linux-c-programming@vger.kernel.org>
Subject: CPU/disk usage
Date: Sat, 21 May 2005 16:09:59 +0200 [thread overview]
Message-ID: <428F4137.40001@tlen.pl> (raw)
Hello,
What's the best way to:
1. Get the percent cpu usage (as in top)
2. Get disk activity (eg. number of bytes read/written from/to disk
during some period of time).
Ad1) I know I could find the cpu usage in top sources, but unfortunately
I don't have enough time
to do it currently - maybe some of you did this already.
There is sysinfo() system call that returns average loads during the
last 1, 5, and 15
minutes but average load, AFAIK, is a average number of tasks waiting
for cpu, so it's not
exactly what I want.
Cheers
AD
next reply other threads:[~2005-05-21 14:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-21 14:09 Adam Dyga [this message]
2005-05-21 20:27 ` CPU/disk usage Glynn Clements
-- strict thread matches above, loose matches on Subject: below --
2005-05-21 17:12 Akbar Ali
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=428F4137.40001@tlen.pl \
--to=adeon@tlen.pl \
--cc=linux-c-programming@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.