On 2012-01-07 6:05, Wesley Craig wrote:
I don't see a good reason to include code that digs around in /proc
when getrusage() has the exact same data.  I think adding, e.g., I/O
to the telemetry calls would be peachy, either as a runtime option or
if someone wants to exercise their autoconf-foo, at build time as
appropriate to the platform in question.

When I wrote the getruage() code, I included only system & user CPU
time because the platform I was working on provided them -- because
POSIX requires them.  POSIX similarly requires that the other fields
be present, but they didn't happen to have any content when I wrote
that code, on the platform I was working on.  The present day version
of the platform in question (Linux) provides much more data, and most
non-Linux platforms have provided more than just CPU usage for many
years.


Thanks Oliver and Wes, for the clarification.

I think master, or 2.5+, is definitely something that would run on current day systems. I think it's fair enough to state that is Linux kernel 2.6+, while 2.6.18 is Red Hat Enterprise Linux 5 / CentOS 5, but not 2.4 for example.

If I understand things correctly, it is the Linux kernel that as of version 2.6.22 or so is providing all the statistics we'd want?

I guess what remains is to figure out what other (current?) platforms support, and if the code can be made so to be compatible across the board. I don't think we currently have a complete and exhaustive list of supported platforms (and versions), let alone points of contact in the community that can verify certain things on certain platforms for us. I can work on making this list happen, though.

Can we settle on what we have now, and target we figure things out working towards using getrusage() for the statistics wanted?

I agree with Wes that if getrusage() provides the data, and can be made to sustainably work on all platforms supported (of which we currently have no list), we should target using getrusage(), and avoid probing /proc/.

Thanks,

Kind regards,

Jeroen van Meeuwen

--
Systems Architect, Kolab Systems AG

e: vanmeeuwen at kolabsys.com
t: +44 144 340 9500
m: +44 74 2516 3817
w: http://www.kolabsys.com

pgp: 9342 BF08

Reply via email to