Stark & Wayne
  • by Chris Weibel

Ever wonder which applications are running on a particular Diego cell?

There is a nifty article on the Pivotal Knowledge Base which goes through how to find this info in PCF 1.7. This points us to getting the list of application process guids for the cell by curling rep. The user Muni Chada in the comments of the article points out how to use the certificates for rep to make the https call.

Combining these two you can get the list of applications:

cd /var/vcap/jobs/rep/config/certs; \
curl -k -s https://localhost:1801/state --cert server.crt \
--key server.key | python -m json.tool |grep process_guid | \
cut -d ':' -f2|cut -c 3-38| \
xargs -I '<guid>' cf curl '/v2/apps/<guid>'| \
grep '"name"'|cut -d ':' -f2|sort -u

Which outputs something similar to:


The command above has a few dependencies:


Here are a few helpful articles to figure out what is running in CF:

Find more great articles with similar tags cloudfoundry author-cweibel CF_cli Diego