peter-hst / psutil

Automatically exported from code.google.com/p/psutil
Other
0 stars 0 forks source link

On RHEL 6.2 get_io_counters returns 0 read bytes and writebytes always, read count is 5234 #327

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.on RHEL use ps util to moniter a process which writes/reads a file
2.get_io_counters check values
3.

What is the expected output?
read_count=X,write_count=Y,read_bytes=Z,write_bytes=B
if X >0, Z should be greater than 0

What do you see instead?
read_count=5672,read_bytes=0,write_bytes=0,write_count=0

What version of psutil are you using? What Python version?

psutil-0.6.1-py2.6-linux-x86_64, 
Python 2.6.6 (r266:84292, Sep 12 2011, 14:03:14)
[GCC 4.4.5 20110214 (Red Hat 4.4.5-6)] on linux2

On what operating system? Is it 32bit or 64bit version?

Red Hat Enterprise Linux Server release 6.2, 64Bit

Please provide any additional information below.

Original issue reported on code.google.com by mahantes...@gmail.com on 19 Sep 2012 at 8:22

GoogleCodeExporter commented 8 years ago
Are you talking about process IO counters or system IO counters?

> read_count=X,write_count=Y,read_bytes=Z,write_bytes=B
> if X > 0, Z should be greater than 0

That's not necessarily true. A process might be performing read() calls not 
returning any data.
Moreover, the 0 value you see comes directly from the OS, hence even if it's 
not correct (which I doubt) psutil can't do anything about that.

Please try to run the following code:

import psutil
for p in psutil.process_iter():
    try:
        print p.get_io_counters()
    except psutil.Error:
        pass

If read_count of *any* of the enlisted processes is != 0 then it means psutil 
is correctly fetching that information.

Original comment by g.rodola on 19 Sep 2012 at 11:55

GoogleCodeExporter commented 8 years ago
Closing this out for lack of response.
AFAICT there should be no issue here though.

Original comment by g.rodola on 12 Dec 2012 at 12:34

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Updated csets after the SVN -> Mercurial migration:
r266 == revision f910f2f333cc

Original comment by g.rodola on 2 Mar 2013 at 12:13