linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Akbar Ali <kaberjobs@yahoo.com>
To: Adam Dyga <adeon@tlen.pl>,
	linux-c-programming <linux-c-programming@vger.kernel.org>
Subject: Re: CPU/disk usage
Date: Sat, 21 May 2005 10:12:19 -0700 (PDT)	[thread overview]
Message-ID: <20050521171219.18783.qmail@web50807.mail.yahoo.com> (raw)
In-Reply-To: 6667

Why not just take a quick look at the top source code
?
btw, if you find out tell me, cause i'm intersted in
that data as well..

--- Adam Dyga <adeon@tlen.pl> wrote:
> 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
> -
> To unsubscribe from this list: send the line
> "unsubscribe linux-c-programming" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at 
> http://vger.kernel.org/majordomo-info.html
> 


		
Discover Yahoo! 
Get on-the-go sports scores, stock quotes, news and more. Check it out! 
http://discover.yahoo.com/mobile.html

             reply	other threads:[~2005-05-21 17:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-21 17:12 Akbar Ali [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-05-21 14:09 CPU/disk usage Adam Dyga
2005-05-21 20:27 ` Glynn Clements

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=20050521171219.18783.qmail@web50807.mail.yahoo.com \
    --to=kaberjobs@yahoo.com \
    --cc=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).