Jump to content

Capture Size Of Data writen to the disk by specified process


oleg
 Share

Recommended Posts

Is it possible to capture a size of data written to the disk by a process or transferd thru network ?

See this topic Here or search the forums for progress


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

Is it possible to capture a size of data written to the disk by a process or transferd thru network ?

You looking for process info?

Try the WMI.

Sample stuff (search the forums here for Scriptomatic)

$objWMIService = ObjGet("winmgmts:\\localhost\root\CIMV2")
$colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_Process", "WQL", 0x10 + 0x20)
If IsObj($colItems) Then
  for $objItem in $colItems
 ;these are the variable I think you are looking for - do what you need to here
   #cs
   $objItem.Name
   $objItem.ProcessId
   $objItem.ReadOperationCount
   $objItem.WriteOperationCount; To disk
   $objItem.ReadTransferCount
   $objItem.WriteTransferCount; To network
   #ce
   MsgBox(0,"Task details", "Task name: " & @TAB & $objItem.Name & @CRLF &  _
   "Process ID: " & @TAB & $objItem.ProcessId & @CRLF &  _
   "Read operations (to disk): " & @TAB & $objItem.ReadOperationCount & @CRLF &  _
   "Write operations (to disk): " & @TAB & $objItem.WriteOperationCount & @CRLF &  _
   "Read operations (to network): " & @TAB & $objItem.ReadTransferCount & @CRLF &  _
   "Write operations (to network): " & @TAB & $objItem.WriteTransferCount, 30)
  next
EndIf

Good luck!

[edit]Added MsgBox to code so you can see see real information[/edit]

Edited by Confuzzled
Link to comment
Share on other sites

B) WMI thats what i thought :o Thanks will try

--------------------------------------------------------------------------

I have tried but the counter is always zero even in task manager

i see the same value :graduated:

Any ideas ?

Edited by oleg

There is a hex ( 31303030303030 ) reasons i love AutoIt !

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...