I am trying to use Windows Server 2008 performance counter to monitor one of the long running process.
I am able to setup a DataCollector >> \Process\Private Bytes to collect the performance data (memory usage). I was wondering whether I can setup a threshold in the performance counter and use it to trigger one my local program. In case the long running program consumes too much memory from the server, it will trigger a windows script to shut it down.
I realize this is lame way of dealing with memory leaking problem, but it is the only feasible solution for now.