Jump to content

Recommended Posts

Posted

Hello,

 

even though i been here before i was a long time Away, so please forgive me if the question i ask ist easy to answer, but i searched the web, i searched this forum, yet i found nothing, that could help me sove my Problem... Or better,  i can not figger out, how it would work.

So here is the Problem :

I am looking for a way to read at certrain time the Disk usage.

Not the size or percentage of the used Disk Space but the Disk Usage

image.png.4ea8342de2c440d421169d05d7b45cf1.png

I found many ways to survey the CPU but not the Disk.

My goal is it to get any Disk that has a permant usage of 50 % or more.

Can you please help me?

Thanks in advance!

 

Posted

Hello. Maybe adapting this you could get some similar result.

Local $objWMIService = ObjGet("winmgmts:\\localhost\root\CIMV2")
Local $ocolProcesses = $objWMIService.ExecQuery("SELECT * FROM Win32_PerfRawData_PerfProc_Process WHERE NAME <> '_Total'", Default, 0x30)



For $oProcess In $ocolProcesses
    ConsoleWrite(">" & $oProcess.Name & @CRLF)
    ConsoleWrite($oProcess.IOReadBytesPerSec & @CRLF)
    ConsoleWrite($oProcess.IOReadOperationsPerSec & @CRLF)
    ConsoleWrite($oProcess.IOWriteBytesPerSec & @CRLF)
    ConsoleWrite($oProcess.IOWriteOperationsPerSec & @CRLF)
    ConsoleWrite($oProcess.IOOtherBytesPerSec & @CRLF)
    ConsoleWrite($oProcess.IOOtherOperationsPerSec & @CRLF)
    ConsoleWrite($oProcess.PageFaultsPersec & @CRLF)
    ConsoleWrite(@CRLF)
Next

Saludos

Posted
16 hours ago, Danyfirex said:

Hello. Maybe adapting this you could get some similar result.

Local $objWMIService = ObjGet("winmgmts:\\localhost\root\CIMV2")
Local $ocolProcesses = $objWMIService.ExecQuery("SELECT * FROM Win32_PerfRawData_PerfProc_Process WHERE NAME <> '_Total'", Default, 0x30)



For $oProcess In $ocolProcesses
    ConsoleWrite(">" & $oProcess.Name & @CRLF)
    ConsoleWrite($oProcess.IOReadBytesPerSec & @CRLF)
    ConsoleWrite($oProcess.IOReadOperationsPerSec & @CRLF)
    ConsoleWrite($oProcess.IOWriteBytesPerSec & @CRLF)
    ConsoleWrite($oProcess.IOWriteOperationsPerSec & @CRLF)
    ConsoleWrite($oProcess.IOOtherBytesPerSec & @CRLF)
    ConsoleWrite($oProcess.IOOtherOperationsPerSec & @CRLF)
    ConsoleWrite($oProcess.PageFaultsPersec & @CRLF)
    ConsoleWrite(@CRLF)
Next

Saludos

Good Morning and thanks for your Answer,

yet I am afraid, that is not what i am looking for. Or I don't get the Idea. I nead to get disk Usage, this does give me the Usage of the Disk of all Process, which is great, but doesn't solve my Problem of the actual State of the Disk. Or am I looking at it the wrong way?

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
  • Recently Browsing   0 members

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