On Thu, 8 Nov 2007 00:23:51 +0200 "Aleksey V. Kunitskiy" <[EMAIL PROTECTED]> wrote:
> On Wednesday 07 November 2007, James wrote: > > All, > > > > I'm writing a piece of code that requires I gather the following > > statistics every second: > > > > - CPU Usage (as a percentage) > > - NIC I/O > > - Hard Drive I/O > > > > I later have to correlate these stats as a function of time. > > > > I'm not really sure where I should be looking to gather these > > statistics. I know about /proc/stat, but that's only CPU related > > (and I don't think /proc/sys will give me a CPU usage percentage > > anyways). I'm not sure if there exist other proc files that will > > give me the values for NIC and hard drive I/O (such as number of > > transactions per second). > > > > Thoughts? > > First thought that comes in my mind is to have a look at source code > of such programms as: > - gkrellm > - top/htop > - iptraf > I think you can find there all information you need > > > Additionally (some small but great progs): sys-process/procps, app-admin/procinfo, app-admin/sysstat, net-analyzer/iftop -- Best regards, Daniel -- [EMAIL PROTECTED] mailing list