From 929589ddfa90ee55928fe0830d225f030cba7344 Mon Sep 17 00:00:00 2001 From: sharkymark Date: Tue, 4 Apr 2023 15:50:27 -0500 Subject: [PATCH] docs: fixed incorrect agent metadata docs (#7005) * docs: fixed incorrect agent metadata docs * docs: prettier; fixed incorrect agent metadata docs --- docs/templates/agent-metadata.md | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/docs/templates/agent-metadata.md b/docs/templates/agent-metadata.md index 5c253f7e90..bbefecfa33 100644 --- a/docs/templates/agent-metadata.md +++ b/docs/templates/agent-metadata.md @@ -28,7 +28,7 @@ resource "coder_agent" "main" { # calculates CPU usage by summing the "us", "sy" and "id" columns of # vmstat. script = <> + EOT interval = 1 timeout = 1 } @@ -68,6 +66,16 @@ resource "coder_agent" "main" { ## Utilities +[top](https://linux.die.net/man/1/top) is available in most Linux +distributions and provides virtual memory, CPU and IO statistics. Running `top` +produces output that looks like: + +``` +%Cpu(s): 65.8 us, 4.4 sy, 0.0 ni, 29.3 id, 0.3 wa, 0.0 hi, 0.2 si, 0.0 st +MiB Mem : 16009.0 total, 493.7 free, 4624.8 used, 10890.5 buff/cache +MiB Swap: 0.0 total, 0.0 free, 0.0 used. 11021.3 avail Mem +``` + [vmstat](https://linux.die.net/man/8/vmstat) is available in most Linux distributions and provides virtual memory, CPU and IO statistics. Running `vmstat` produces output that looks like: