How to know if an app is responsible for high CPU in a Diego Cell and how to find it
search cancel

How to know if an app is responsible for high CPU in a Diego Cell and how to find it

book

Article ID: 297467

calendar_today

Updated On:

Products

VMware Tanzu Application Service for VMs

Issue/Introduction

The purpose of this article is to determine whether an app is responsible for the Diego Cell's high CPU and how to find it.

One of the reasons behind a Diego Cell having high CPU can be that an app is making intense usage of that resource. Finding which app is doing so is the first step for troubleshooting this issue.

Resolution

We base this procedure on the fact that you have already identified the Diego Cell suffering from high CPU, perhaps by looking at the Status page in Ops Manager, the output of bosh instances --vitals or through Health Watch, so the next steps would be:
 
  • SSH into the Diego cell with high CPU.
  • As a root, execute top, and copy the process pid consuming CPU.
  • execute cat /proc/<PID>/environ

In that output you should be able to find the values for the fields "application_name","space_name", and "organization_name".

With that, you have all the necessary information to locate the app in the platform, which is the org, space, and app names.

In some earlier versions, the org info is not shown in that output. Follow the steps below to get the the org name:
 
  • Locate and copy the value for the space_id field. 
  • Open a terminal that contains the cf cli command
  • execute cf curl /v2/spaces/<space_id> to obtain the space information. Locate and copy the org url (organization_url). 
  • execute cf curl organization_url to get the organization information. There you can find the org name. Locate and copy it.
You now have all the info you need to locate the app in the platform.