cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Can we automatic Cpu sampling start time when Cpu spike ?

Hi

Can we automatic Cpu sampling start time when Cpu spike?

Thank you


15 REPLIES 15

Yes, you have to create incident and as action set CPU Sampling plugin. As measure you have to setup cpu time measure with proper threshold. Than you will have automatic cpu sampling’s

Sebastian


Hi Sebastian,

You have how to create incident and as action set CPU Sampling and setup cpu time measure.

Thank


Hello, First Open System profile:

Go to Incidents and create new incident rule:

Put name of your incident and on Conditions tab click add:

Click create measure on and on host performance find Total CPU Time. Setup there your own measure name, warning and severe thresholds. Severe thresold will be de one which will fire your incident:

(values are only example, put there what you need). Click Add => Close => Ok and you will go to Incident window with measure picked:

Than go to Actions => Advanced Configuration. You will be able to pick action plugin which will be fired with incident:

Set duration of sampling according to your needs (I don't recommend to long times on production environments). If you want to store those samplings until manual delete (dynatrace is overwriting old data after storage is full), you can check lock sesion. Click Add => Create and now this rule will work for all hosts in your environment. If you want to filter it to only one you can try different options. Please check Appmon documentation for more information about Incident rules.

Sebastian


Hi sebastian k. , Could you tell me about to download " CPU Sampling plugin", am not found it in

"https://community.dynatrace.com/community/display/DL/FastPacks+and+Plugins"

Thank you,


It's embedded in appmon 🙂


Hi sebastian k.,

Super thank Bro.


Hi sebastian k.,

I have a question. If the system executes the CPU sampling while the CPU usage
is very high, will that make the situation worse e.g. our users might
experience the slower response time?

Thank you.


CPU sampling may produce some overhead, this is why it’s not recommended to make long samplings in such stuation on prod. I think overhead should be up to couple of percent but in some situations it can be an issue.

Sebastian


Hi sebastian k.,

I’m afraid that knowing the method names isn’t enough. In our environment, many (WAR) packages use the same method/class name. And some methods, as shown in your screenshot, are Java’s foundation methods which almost every package use. Unless Dynatrace has a feature to help us on tracing back to the troubled package in this CPU sampling screen, it would be really hard for us to know where the problem is.


Cpu sampling is working per proces not per whole cpu so you will know methods from particular WAR.

Sebastian


Hi sebastian k.,

Thankyou for response. If we don't know methods, you have idea for fine WAR?


I'm not sure if I understand you correctly, but CPU sampling will tell you which methods are top CPU consumers on particular process.

Sebastian


Hi sebastian k.,

Thankyou for response. I can see Thread dump(State Blocked) will to help for fine WAR?


Thread dumps can also be helpful to analyze what is hapening with application. But generally thread dumps by me are used when I see that cpu i fine but on purepaths there is huge elapse time while starting new thread. This can tells us that there is too much waited threads or thread pool is too small. In such case thread dump is helpful. If you have cpu spike, cpu sampling is best what you can get. Please tell me more about problems you have, maybe I will be able to suggest some solution.


Hi sebastian k.,

Super thank Bro, for response. 🙂