Node Manager API to query resource allocation
When you run a job with resources like nvidia.com/gpu
, you can query a
Node Manager node's resource allocation using the RESTful API. Note that the resource name
should be in the URL encoded format.
In this example,
nvidia.com%2Fgpu
is the name of the
resource.node:port/ws/v1/node/resources/nvidia.com%2Fgpu
Use the following command to get the JSON format resource
allocation:
curl localhost:8042/ws/v1/node/resources/nvidia.com%2Fgpu | jq .