Skip to content

Instantly share code, notes, and snippets.

@geekbass
Created December 27, 2018 18:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save geekbass/152799b27baf5b3f52628f914cee907a to your computer and use it in GitHub Desktop.
Save geekbass/152799b27baf5b3f52628f914cee907a to your computer and use it in GitHub Desktop.
Reserved Resources
curl -skSL \
-H "Authorization: token=$(dcos config show core.dcos_acs_token)" \
-H "Content-Type: application/json" \
"$(dcos config show core.dcos_url)/mesos/slaves" | \
jq -er '[.slaves[] | select(.active==true) | {id: .id, hostname: .hostname, active: .active, reserved_resources_full: (.reserved_resources_full)}]' | \
jq -er '[.[] | select(.reserved_resources_full | length > 0)]' | \
tee reservations.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment