This topic provides instructions for installing and using the CF Diego Operator Toolkit (cfdot) Command Line Interface (CLI) tool to interact with Diego cells in your Pivotal Cloud Foundry (PCF) 1.10 deployment.
This CLI tool communicates directly with the Bulletin Board System (BBS) API to provide information about the Diego cells in your deployment. The cfdot CLI outputs a stream of JSON values that you can process with jq
, bash
, and other line-based UNIX tools.
Use the cfdot CLI tool to investigate the following issues:
1. SSH into the Diego cell:
$ bosh ssh DIEGO_JOB/INDEX
Replace the following items with values from your deployment:
For example, $ bosh ssh diego_cell/0
.
diego_brain
or diego_cell
setup
script:
$ source /var/vcap/jobs/cfdot/bin/setupThe
setup
script does the following:
cfdot
binary on the PATH
jq
binary on the PATH
3. Run cfdot --help
for the most current list of supported commands. The available commands include the following:
actual-lrp-groups -
List actual LRP groupsactual-lrp-groups-for-guid -
List actual LRP groups for a process GUIDcreate-desired-lrp -
Create a desired LRPdelete-desired-lrp -
Delete a desired LRPdelete-task -
Delete a Taskdesired-lrp -
Show the specified desired LRPdesired-lrp-scheduling-infos -
List desired LRP scheduling infosdesired-lrps -
List desired LRPsdomains -
List domainsretire-actual-lrp -
Retire actual LRP by index and process GUIDset-domain -
Set domaintask -
Display taskupdate-desired-lrp -
Update a desired LRP
4. Enter one of the cfdot commands above. cfdot will print out all the information the BBS has about the tasks, LRPs, or groups you specified. You can pipe the output to jq
or another line-based UNIX tool to tailor your results or make them easier to read.
$ cfdot desired-lrp | jq .
The following command displays the information about a particular app by its GUID:
$ cfdot desired-lrp GUID | jq .The following command counts the total number of desired application instances:
$ cfdot desired-lrp-scheduling-infos | jq '.instances' | jq -s 'add'The following command shows the instance counts of all apps by state:
$ cfdot actual-lrp-groups | jq '.instance, .evacuating | values' | jq -s -r 'group_by(.state)[] | .[0].state + ": " + (length | tostring)