feat(cli): add coder stat command (#8005)

This commit is contained in:
Cian Johnston
2023-06-20 11:16:57 +02:00
committed by GitHub
parent c3aef9363b
commit d6f8bd7847
26 changed files with 1803 additions and 72 deletions
+39
View File
@@ -0,0 +1,39 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# stat
Show resource usage for the current workspace.
## Usage
```console
coder stat [flags]
```
## Subcommands
| Name | Purpose |
| ----------------------------------- | -------------------------------- |
| [<code>cpu</code>](./stat_cpu.md) | Show CPU usage, in cores. |
| [<code>disk</code>](./stat_disk.md) | Show disk usage, in gigabytes. |
| [<code>mem</code>](./stat_mem.md) | Show memory usage, in gigabytes. |
## Options
### -c, --column
| | |
| ------- | -------------------------------------------------------------------------- |
| Type | <code>string-array</code> |
| Default | <code>host_cpu,host_memory,home_disk,container_cpu,container_memory</code> |
Columns to display in table output. Available columns: host cpu, host memory, home disk, container cpu, container memory.
### -o, --output
| | |
| ------- | ------------------- |
| Type | <code>string</code> |
| Default | <code>table</code> |
Output format. Available formats: table, json.
+38
View File
@@ -0,0 +1,38 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# stat cpu
Show CPU usage, in cores.
## Usage
```console
coder stat cpu [flags]
```
## Options
### --host
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Force host CPU measurement.
### -o, --output
| | |
| ------- | ------------------- |
| Type | <code>string</code> |
| Default | <code>text</code> |
Output format. Available formats: text, json.
### --prefix
| | |
| ---- | ------------------- |
| Type | <code>string</code> |
Unit prefix.
+31
View File
@@ -0,0 +1,31 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# stat disk
Show disk usage, in gigabytes.
## Usage
```console
coder stat disk [flags]
```
## Options
### -o, --output
| | |
| ------- | ------------------- |
| Type | <code>string</code> |
| Default | <code>text</code> |
Output format. Available formats: text, json.
### --path
| | |
| ------- | ------------------- |
| Type | <code>string</code> |
| Default | <code>/</code> |
Path for which to check disk usage.
+30
View File
@@ -0,0 +1,30 @@
<!-- DO NOT EDIT | GENERATED CONTENT -->
# stat mem
Show memory usage, in gigabytes.
## Usage
```console
coder stat mem [flags]
```
## Options
### --host
| | |
| ---- | ----------------- |
| Type | <code>bool</code> |
Force host memory measurement.
### -o, --output
| | |
| ------- | ------------------- |
| Type | <code>string</code> |
| Default | <code>text</code> |
Output format. Available formats: text, json.