0

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.

June
  • 974
  • 5
  • 20
  • 34

1 Answers1

0

1) In Windows Performance Monitor 1.1) Data Collector Sets >> Create a new user defined Data Collector Set (Choose option Created Manually (Advanced))

enter image description here

1.2) What type of data do you want to include ? >> Performance Counter Alert

1.3) Add a performance counter from the list (in this case, process >> private bytes >> choose a currently running process called xxxx)

enter image description here

1.4) Click ok to create such performance monitor

When the condition of this performance counter has met, it will write an event log entry in my case event log id 2031.

1.5) Attach Task to this event, in my case, I choose to run a program when event id 2031 is logged

enter image description here

The following article has helped me :

Perfmon counters to check memory leak

Community
  • 1
  • 1
June
  • 974
  • 5
  • 20
  • 34