Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
giampaolo opened this issue May 23, 2014 · 3 comments

Comments

@giampaolo
Copy link
Owner

From mahantes...@gmail.com on September 19, 2012 10:22:44

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: http://code.google.com/p/psutil/issues/detail?id=327

@giampaolo
Copy link
Owner Author

From g.rodola on September 19, 2012 16:55:43

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.

@giampaolo
Copy link
Owner Author

From g.rodola on December 12, 2012 04:34:07

Closing this out for lack of response.
AFAICT there should be no issue here though.

Status: CantReproduce

@giampaolo
Copy link
Owner Author

From g.rodola on March 02, 2013 04:13:03

Updated csets after the SVN -> Mercurial migration: r266 == revision 
f910f2f333cc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant