ed44f50091
* cli: add json and t flags to quota status command * cli: add entry to changelog * Update command/quota_status.go Co-authored-by: James Rasell <jrasell@users.noreply.github.com> --------- Co-authored-by: James Rasell <jrasell@users.noreply.github.com>
81 lines
1.8 KiB
Plaintext
81 lines
1.8 KiB
Plaintext
---
|
|
layout: docs
|
|
page_title: 'Commands: quota status'
|
|
description: >
|
|
The quota status command is used to view the status of a particular quota
|
|
specification.
|
|
---
|
|
|
|
# Command: quota status
|
|
|
|
The `quota status` command is used to view the status of a particular quota
|
|
specification.
|
|
|
|
~> Quota commands are new in Nomad 0.7 and are only available with Nomad
|
|
Enterprise.
|
|
|
|
## Usage
|
|
|
|
```plaintext
|
|
nomad quota status [options] <quota_name>
|
|
```
|
|
|
|
If ACLs are enabled, this command requires a token with the `quota:read`
|
|
capability and access to any namespaces that the quota is applied to.
|
|
|
|
## General Options
|
|
|
|
@include 'general_options.mdx'
|
|
|
|
## Inspect Options
|
|
|
|
- `-json`: Output the quota specifications in a JSON format.
|
|
|
|
- `-t`: Format and display the quota using a Go template.
|
|
|
|
## Examples
|
|
|
|
View the status of a quota specification:
|
|
|
|
```shell-session
|
|
$ nomad quota status default-quota
|
|
Name = default-quota
|
|
Description = Limit the shared default namespace
|
|
Limits = 1
|
|
|
|
Quota Limits
|
|
Region CPU Usage Memory Usage Network Usage
|
|
global 500 / 2500 256 / 2000 30 / 50
|
|
|
|
```
|
|
|
|
The `-json` flag can be used to get the quota status in json format:
|
|
|
|
```shell-session
|
|
$ nomad quota inspect -json default-quota
|
|
{
|
|
"CreateIndex": 8,
|
|
"Description": "Limit the shared default namespace",
|
|
"Limits": [
|
|
{
|
|
"Hash": "NLOoV2WBU8ieJIrYXXx8NRb5C2xU61pVVWRDLEIMxlU=",
|
|
"Region": "global",
|
|
"RegionLimit": {
|
|
"CPU": 2500,
|
|
"DiskMB": 0,
|
|
"MemoryMB": 2000,
|
|
"Networks": null
|
|
}
|
|
}
|
|
],
|
|
"ModifyIndex": 56,
|
|
"Name": "default-quota"
|
|
}
|
|
```
|
|
|
|
Or use the `-t` flag to format and display the quota status using a Go template:
|
|
|
|
```shell-session
|
|
$ nomad quota inspect -t {{ .Description }} default-quota
|
|
Limit the shared default namespace
|
|
``` |