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

夙愿已清 提交于 2021-02-07 06:50:15

问题


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;

回答1:


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).



来源:https://stackoverflow.com/questions/4833256/how-to-check-how-many-bytes-my-application-wrote-and-read-from-disk

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!