Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to check how many bytes my application wrote and read from Disk?

Tags:

winapi

delphi

I don't know if I didn't use the right words to search on web but I didn't find the solution to watch how much my application already read and wrote on disk.

Some one can help me with this ?

tks

[Resolved]

If some one need the function sign.

type
  _IO_COUNTERS = record
    ReadOperationCount : LONGLONG;
    WriteOperationCount : LONGLONG;
    OtherOperationCount : LONGLONG;
    ReadTransferCount : LONGLONG;
    WriteTransferCount : LONGLONG;
    OtherTransferCount : LONGLONG;
  end;
  TIoCounters = _IO_COUNTERS;

  function GetProcessIoCounters(hProcess: THandle; var lpIoCounters: TIoCounters): BOOL; stdcall external kernel32;
like image 256
Rodrigo Farias Rezino Avatar asked Jan 28 '11 21:01

Rodrigo Farias Rezino


1 Answers

if you want get this info programmatically you can use the GetProcessIoCounters function. Another alternative is using the WMI , see the Win32_Process class and check these properties (WriteOperationCount, WriteTransferCount, ReadTransferCount, ReadOperationCount).

like image 54
RRUZ Avatar answered Oct 04 '22 23:10

RRUZ