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
+1
View File
@@ -34,6 +34,7 @@ Coder v0.0.0-devel — A tool for provisioning self-hosted development environme
workspace
ssh Start a shell into a workspace
start Start a workspace
stat Show resource usage for the current workspace.
state Manually manage Terraform state to fix broken workspaces
stop Stop a workspace
templates Manage templates
+19
View File
@@ -0,0 +1,19 @@
Usage: coder stat [flags]
Show resource usage for the current workspace.
Subcommands
cpu Show CPU usage, in cores.
disk Show disk usage, in gigabytes.
mem Show memory usage, in gigabytes.
Options
-c, --column string-array (default: host_cpu,host_memory,home_disk,container_cpu,container_memory)
Columns to display in table output. Available columns: host cpu, host
memory, home disk, container cpu, container memory.
-o, --output string (default: table)
Output format. Available formats: table, json.
---
Run `coder --help` for a list of global options.
+16
View File
@@ -0,0 +1,16 @@
Usage: coder stat cpu [flags]
Show CPU usage, in cores.
Options
--host bool
Force host CPU measurement.
-o, --output string (default: text)
Output format. Available formats: text, json.
--prefix string
Unit prefix.
---
Run `coder --help` for a list of global options.
+13
View File
@@ -0,0 +1,13 @@
Usage: coder stat disk [flags]
Show disk usage, in gigabytes.
Options
-o, --output string (default: text)
Output format. Available formats: text, json.
--path string (default: /)
Path for which to check disk usage.
---
Run `coder --help` for a list of global options.
+13
View File
@@ -0,0 +1,13 @@
Usage: coder stat mem [flags]
Show memory usage, in gigabytes.
Options
--host bool
Force host memory measurement.
-o, --output string (default: text)
Output format. Available formats: text, json.
---
Run `coder --help` for a list of global options.