Hi,
There is a bug in an application that should be remediated but for now, this is what I'm going to do:
Problem:
Instances (processes) with the same name are produced (for example, worker.exe)
The users create these instances to do their job and then leave the app but the instance is not killed by the app and remains running, doesn't free up the memory while there is no CPU usage. Therefore, you can see many worker.exe processes with 0% CPU usage and hundreds of megabytes of RAM used by each of them which leads to high memory utilization on the server.
What I need:
I'd like to write a script to monitor these processes and kill them if they're not using CPU and have been present for, let's say 15 minutes, to make a workaround temporarily. I hope I've made myself clear here. BTW, O.S. is Windows server 2016 and 2019.
Regards,
M. Ganji