note monitoring basics

This commit is contained in:
Malin Freeborn 2024-04-30 16:44:38 +02:00
parent ae1e0ad726
commit d4ca81c2ae
Signed by: andonome
GPG Key ID: 52295D2377F4D70F

24
system/monitoring.md Normal file
View File

@ -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
```