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

This product reached the end of support date on March 31, 2021.

How to monitor CPU Usage, IO and memory usage of specific processes running on LINUX system ?

sdande
Participant

Hello ,

My objective is to monitor my application processes which are running on LINUX system and collect CPU Usage, IO, Memory Usage, Process ID specific to those processes .

I have followed following process:

  1. Created new UNIX Monitor though Local method and added LINUX host where my application is running.
  2. Please note that My agent, collector and application which I am monitoring are on LINUX system and server is on Windows machine.
  3. Then I have created new Metric Group Plugin  through Manage Plugin UI.
  4. And added following one metric which will collect CPU Usage for my one of the application process and added this as measure inside UNIX monitor..
  5. After that I have build that plugin and deployed it.
  6. Then I have added this Metric inside UNIX Monitor which I have created as a measure.
  7. Then I have executed following command inside LINUX system which shows CPU Usage for all processes running on that system.
  8. But after running UNIX monitor, I am not able to see any value for that newly added measure. It shows NULL value against that measure..

Do I need to add this command "pidstat" inside LinuxPlatform.java file for UNIX plugin ?

Also do I need to write source code for our newly added metric ?

Is there any documentation how to generate new metric group, metric ID  in UNIX plugin ?

 

 

 

Thanks And Regards,

Swanand S. Dande

3 REPLIES 3

kyle_kowalski
Dynatrace Pro
Dynatrace Pro

Hi Swanand,

What are you really trying to get out of this? Dynatrace Application Monitoring collects host health for different processes by default (Monitoring -> Hosts) will show this information for 6.0+

 

 

Edit: sorry I just noticed you need the PID, the default host health measuring will not gather the PID

sdande
Participant

Hello Kyle,

I agree that Dynatrace Application Monitoring collects host health for different processes by default, but as per my understanding it collects overall CPU Usage not single process CPU usage.

I want to collect performance data(CPU Usage, IO Operations., Memory Usage, PID) for single process..

EX: there are several applications running on LINUX machine.. Apache, Tomacat, Web Application, JAVA

So take an example that I want to know how much CPU Usage, IO Operations., Memory Usage, PID by Apache server.

In my case, I want to collect data for my application server related processes.

During windows performance monitoring, I could collect data specific to process through measures specific attributes which is disable in UNIX monitoring.

Please refer following snapshot of measure details during windows performance monitoring

Here you can see that I could give values counterName, instance name which is my application process and onject name based on PerfMon.

Because of this I could collect CPU Usage of coreServer which is my application process.

Same thing I want to do in UNIX, but as I have seen measures specific attributes are disabled.

 

So I tried with creating new metric plugin which I have mentioned in my earlier discussion.

But for that I need to mention key value pairs.

So I want to know how to do that part ? 

Or is there any easiest way to achieve my objective, please let me know that then  ?

 

Thanks in advance !!!

 

Thanks And Regards,

Swanand S. Dande

kyle_kowalski
Dynatrace Pro
Dynatrace Pro

Hi Swanand,

Double check your Infrastructure dashboard as noted above. Below is a view from my system showing that we have a process instrumented on our server. Clicking into that we can see the PID by hovering over the i icon as well as a view of CPU and Heap. I will double check to see how to get that information from a monitor, andreas.grabner@dynatrace.com might be able to give you a clearer picture on some of this. I'll post a follow up based on my findings.

 

HTH,

Kyle