Hi, I am monitoring the working set memory of a process to detect a memory leak - this is working perfectly unless the process is not running in which case the monitor fires the alert.

I would like the monitor to detect the memory usage of teh process, not to detect if the process exists or not - how can I stop the alert from firing if the process does not exist ?

asked 25 Oct '17, 16:52

StevenJohns's gravatar image

StevenJohns
6121013
accept rate: 0%


Steve,

The Performance Monitor is configured to always check for a value of a counter. So yes the monitor will go into Alert state when it can't find the counter that it is monitoring.

So the trick is to only run the Performance Monitor when the process is running. You could create a Performance Monitor that only monitors your counter. Then create a Process Monitor to watch the process and if the process count falls below 1 then alert. So when the process is running the monitor is Okay. Then go back to the Performance Monitor and set it's Dependencies to the Process Monitor.

What will happen is the if the state of the Process Monitor is Okay then the Performance Monitor will run. If the state is not Okay then the Performance Monitor will not run.

Thanks
Quinn

Please make sure to mark your questions accepted when you have your answer by clicking the gray check mark to the left of the answer.

link

answered 25 Oct '17, 17:24

Quinn's gravatar image

Quinn ♦♦
14.1k3925
accept rate: 37%

Hi Quinn,

ok, I see what you are trying to say, however doing this just makes the process watcher fire events when the count = 0.

what I need is for no events to fire if the process is 0

is this possible?

Steve

link

answered 25 Oct '17, 18:01

StevenJohns's gravatar image

StevenJohns
6121013
accept rate: 0%

Steve,

There isn't option built into the the Performance Monitor that will be able to collect data only when the counter is there (process is running).

The other option would be for you use the Execute Script Monitor. You would need to write a script that would do the type of checking that you need. Your script would check for the process and then collect the performance data. If the process wasn't running then nothing would happen. Basically the monitor would always be in the Okay state but would collect data if the process is running.

Thanks
Quinn

Please make sure to mark your questions accepted when you have your answer by clicking the gray check mark to the left of the answer.

link

answered 26 Oct '17, 11:45

Quinn's gravatar image

Quinn ♦♦
14.1k3925
accept rate: 37%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×72
×11
×4

Asked: 25 Oct '17, 16:52

Seen: 916 times

Last updated: 26 Oct '17, 11:45