Here's a link to Windows documentation: http://msdn.microsoft.com/en-us/library/ms683218(VS.85).aspx.
Basically I would like to get similar data, but on Linux. If not all is possible, then at least some parts.
Here's a link to Windows documentation: http://msdn.microsoft.com/en-us/library/ms683218(VS.85).aspx.
Basically I would like to get similar data, but on Linux. If not all is possible, then at least some parts.
Look at the pseudo-files under /proc/<PID>/
. Maybe you can find what you need there.
Look at man 5 proc
, or failing that the kernel documentation. However, I don't see much that looks promising. Sorry.
Have a look at /proc/
PID/io
- it's the current I/O accounting information of the process with PID.
If you enable CONFIG_TASK_IO_ACCOUNTING, you will have the information available in /proc/<pid>/io. This is available since kernel 2.6.20, but not normally enabled by default (However, in Ubuntu 8.04 it seems like it is enabled).
You can read about the various data items in Documentation/filesystems/proc.txt in the kernel source tree. Especially section 2.14 should be of interest.
Perhaps you want getrusage()? Not all fields are maintained under linux however. Perhaps enabling the CONFIG_TASK_IO_ACCOUNTING
will cause them to be maintained?