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

Process I/O statistics #64

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

Process I/O statistics #64

giampaolo opened this issue May 23, 2014 · 13 comments

Comments

@giampaolo
Copy link
Owner

From [email protected] on September 17, 2009 08:34:14

Added procedures for getting a statistics of process IO. These procedures
based on procedures which already exist in project. Implemented only for Linux.

Modifyed files: _pslinux.py, _psutil.py

Note: info for procedures needs to be checked. I haven't enough english for
writing so complicated texts. Sorry :)

Attachment: akanashin.patch

Original issue: http://code.google.com/p/psutil/issues/detail?id=64

@giampaolo
Copy link
Owner Author

From [email protected] on September 17, 2009 01:19:34

Thanks.
Setting milestone to 0.2.0 for now.

Summary: Process I/O statistics
Labels: -Type-Defect Type-Enhancement Milestone-0.2.0 Progress-0in4

@giampaolo
Copy link
Owner Author

From [email protected] on March 01, 2010 07:56:12

Labels: -Milestone-0.2.0

@giampaolo
Copy link
Owner Author

From g.rodola on September 24, 2010 16:40:43

Status: PostPoned

@giampaolo
Copy link
Owner Author

From g.rodola on November 19, 2010 14:21:27

Re-opening as I'd like to see this implemented in 0.2.1.
On Windows this can be easily done with GetProcessIoCounters: 
http://msdn.microsoft.com/en-us/library/ms684125(v=VS.85).aspx ...which also includes the number of bytes read and written.

Still have no idea about BSD and OSX though.

Status: ReOpened
Labels: Milestone-0.2.1

@giampaolo
Copy link
Owner Author

From g.rodola on December 28, 2010 23:01:02

Implemented on Linux in r880 .
This is exposed as a "get_io_counters" method and return a namedtuple including 
the number of bytes read/written and the number of read/write calls performed by the process:

>>> psutil.Process(os.getpid()).get_io_counters()
io(read_count=6935640, write_count=1045044, read_bytes=0, write_bytes=1052672)

Status: Accepted
Labels: -Progress-0in4 Progress-1in4

@giampaolo
Copy link
Owner Author

From g.rodola on December 29, 2010 11:01:43

Implemented on Windows as r881 .

Labels: -Progress-1in4 Progress-2in4

@giampaolo
Copy link
Owner Author

From g.rodola on December 29, 2010 11:15:45

Implemented for FreeBSD in r882 .
There's apparently no way to determine bytes count on FreeBSD, hence I returned -1 for them:

>>> p.get_io_counters()
io(read_count=0, write_count=5, read_bytes=-1, write_bytes=-1)

Status: Started
Labels: -Progress-2in4 Progress-3in4

@giampaolo
Copy link
Owner Author

From g.rodola on January 13, 2011 02:45:37

Cc: guichaz

@giampaolo
Copy link
Owner Author

From g.rodola on February 17, 2011 07:37:49

If we exclude getrusage(): http://www.manpagez.com/man/2/getrusage/ ...which 
provides IO statistics only for the current process and/or its children it seems we can't retrieve any per-process IO statistic on OSX.

@giampaolo
Copy link
Owner Author

From g.rodola on March 05, 2011 05:28:22

Status: FixedInSVN

@giampaolo
Copy link
Owner Author

From g.rodola on March 20, 2011 14:55:36

Status: Fixed

@giampaolo
Copy link
Owner Author

From [email protected] on October 14, 2011 08:22:15

I haven't been able to find any way to do this via a C API.  I have found that 
we might be able to get this information via dtrace but I'm not sure that's a route we want to take.  Thoughts?

@giampaolo
Copy link
Owner Author

From g.rodola on March 02, 2013 03:50:41

Updated csets after the SVN -> Mercurial migration: r880 == revision 09c67ca37366 r881 == revision 64c1642d3e1f r882 == revision 2e38c0ac2c69

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