Gentoo Archives: gentoo-user

From: Daniel Iliev <daniel.iliev@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Getting system stats
Date: Wed, 07 Nov 2007 23:52:56
Message-Id: 47324e5a.08b6660a.13a9.ffffa596@mx.google.com
In Reply to: Re: [gentoo-user] Getting system stats by "Aleksey V. Kunitskiy"
1 On Thu, 8 Nov 2007 00:23:51 +0200
2 "Aleksey V. Kunitskiy" <alexey.kv@×××××.com> wrote:
3
4 > On Wednesday 07 November 2007, James wrote:
5 > > All,
6 > >
7 > > I'm writing a piece of code that requires I gather the following
8 > > statistics every second:
9 > >
10 > > - CPU Usage (as a percentage)
11 > > - NIC I/O
12 > > - Hard Drive I/O
13 > >
14 > > I later have to correlate these stats as a function of time.
15 > >
16 > > I'm not really sure where I should be looking to gather these
17 > > statistics. I know about /proc/stat, but that's only CPU related
18 > > (and I don't think /proc/sys will give me a CPU usage percentage
19 > > anyways). I'm not sure if there exist other proc files that will
20 > > give me the values for NIC and hard drive I/O (such as number of
21 > > transactions per second).
22 > >
23 > > Thoughts?
24 >
25 > First thought that comes in my mind is to have a look at source code
26 > of such programms as:
27 > - gkrellm
28 > - top/htop
29 > - iptraf
30 > I think you can find there all information you need
31 >
32 >
33 >
34
35
36 Additionally (some small but great progs): sys-process/procps,
37 app-admin/procinfo, app-admin/sysstat, net-analyzer/iftop
38
39 --
40 Best regards,
41 Daniel
42 --
43 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] Getting system stats Mikko Ruuska <mikko.ruuska@×××××××××.com>