Page 1 of 1

restart process if it reaches over x amount of memory

Posted: Sun Nov 03, 2024 11:03 pm
by bfmradio
Hi

Is it possible to have RT restart a process if it starts to take a certain amount of resources cpu/memory?


Thank you

Re: restart process if it reaches over x amount of memory

Posted: Mon Nov 04, 2024 1:53 pm
by Oleg
What process are you speaking of?

Re: restart process if it reaches over x amount of memory

Posted: Mon Nov 04, 2024 5:33 pm
by felipe
powershell script

Code: Select all

$mem = Get-CimInstance -ClassName Win32_OperatingSystem
$usedPercentage = [math]::Round((($mem.TotalVisibleMemorySize - $mem.FreePhysicalMemory) / $mem.TotalVisibleMemorySize) * 100, 2)
"$usedPercentage%"

Re: restart process if it reaches over x amount of memory

Posted: Wed Nov 13, 2024 10:28 pm
by bfmradio
Oleg wrote: Mon Nov 04, 2024 1:53 pm What process are you speaking of?
One of computers have memory leak. Exporer.exe gets to 1,5-2 gb and the broadcast software starts to choke.

I need this to be restarted when it reaches say 100mg