Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I tried out the new process I/O statistics in kernels after 2.6.20 and I got some meaningless data.
According to the meager docs I have found, you should be able to get I/O statistics per process (counts and bytes for reads and writes) with something as simple as
$ cat /proc/<pid>/io
Indeed some numbers come out, but the disk bytes read and written are coming up zero for processes having hundreds of disk I/O's done in the normal manner: open(), read(), etc.
I am using fedora 7 with kernel 2.6.21
Must I do something else, such as enable this feature in some obscure way?
Man page for proc has not been updated for /io data.
There's some documentation here in the patch that added it. From the documentation, if the i/O never touched the storage layer (it was satisfied by a cache hit), the count will not increment.
I happen to like comments in the patchsets, but I can see where it doesn't suit everybody.
A bit of a problem for those on binary distros - no access to the source tree, and the manpages are always behind (the maintainers are always asking for people to help with manpages).
LXR is an option, but how many people know to go looking there ???.
Thanks for the responses. Still no info about how to activate the IO counters, if such is needed. To repeat, I get zeros for disk IO counters. TTY IO (X-term window) does register some bytes.
Re: wanting outside help for man pages:
Programmers should update the documentation for anything they create or change. They are the ones with the first-hand knowledge. Waiting for someone else to do it is irresponsible, creates additional work, and introduces errors. This is the main reason Linux technical documentation is such a shambles.
Sorry for the preaching. I get upset when others make my life harder becuase they expect me to do their jobs, or climb over their obstacles.
Programmers who are "too important, too busy" to do documentation should find some other line of work.
As macemoneta said, how do you know you're actually doing any (physical) I/O ???.
Maybe do a sync - or set swappiness to zero for a while to minimize disk cache usage.
I get upset when others make my life harder becuase they expect me to do their jobs, or climb over their obstacles.
Programmers who are "too important, too busy" to do documentation should find some other line of work.
You are getting the benefit of the efforts of others - for *FREE*.
It is (generally) not their "line of work".
If you are unhappy , go hire a tech writer to do the documentation you demand.
Then donate it to the community.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.