From d4ca81c2ae70cb2ea836e0014401e79e498a78ab Mon Sep 17 00:00:00 2001 From: Malin Freeborn Date: Tue, 30 Apr 2024 16:44:38 +0200 Subject: [PATCH] note monitoring basics --- system/monitoring.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 system/monitoring.md diff --git a/system/monitoring.md b/system/monitoring.md new file mode 100644 index 0000000..b43be36 --- /dev/null +++ b/system/monitoring.md @@ -0,0 +1,24 @@ +--- +title: "Monitoring" +tags: [ "Documentation", "System", "CPU", "Memory" ] +--- + +Print the average CPU load over 1 minute, 5 minutes, and 15 minutes: + +```bash +watch -d cat /proc/loadavg +stress="$(cat /proc/loadavg | awk '{print "Usage:" $2"%"}')" +``` + +Show memory usage in Gibitytes. + +```bash +free -g +``` +Show low and high gigibtye usage on a *l*ine, and repeat the measurement every 5 seconds: + +```bash +REP=5 +free --lohi -g -s $REP | lolcat +``` +