We currently have a few processes running with the same image name: w3wp.exe.
One of them has a memory leak, so until the dev guys plug that we're wanting to run a scheduled task to kill the process before the RAM runs out on the server.
I've been using:
taskkill /F /FI "MEMUSAGE gt 5000000" /IM "w3wp.exe"
That kills the process whenever memory usage is > 5GB. I've been running this as a scheduled task every 5 minutes.
This works, but it also kills the other instances of w3wp.exe. They're all running under NTAUTHORITY.
My question is, is there a way of isolating a single process from where multiple processes are running under the same image name?
Does anyone know of a better way to do this?