From ddee87fd679bc3eea3001427fd645b6099fe6a55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rcio=20Fernandes?= Date: Sun, 21 Jun 2026 15:14:25 +0000 Subject: [PATCH] modified: README.md --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index 0f5a887..73264a8 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,8 @@ - [System Monitoring Utilities](#system-monitoring-utilities) - [btop](#btop) - [memory usage by user](#memory-usage-by-user) + - [ps - examples](#ps---examples) + - [swap](#swap) - [Storage](#storage) - [Disk Space and Used](#disk-space-and-used) - [Physical Disks and Partition](#physical-disks-and-partition) @@ -273,6 +275,23 @@ apt update && apt install btop -y | awk '{mem[$1]+=$2} END {for (u in mem) printf "%-15s %.1f MB\n", u, mem[u]/1024}' ``` +### ps - examples + +List order my memory usage (MB) + +``` bash +ps -eo pid,ppid,user,pmem,pcpu,rss,vsz,cmd --sort=-rss | awk 'NR==1{print;next} {printf "%s %s %s %s %s %.1fMB %.1fMB %s\n", $1,$2,$3,$4,$5,$6/1024,$7/1024,$8}' + +``` + +#### swap + +Check swap usage + +``` bash +grep VmSwap /proc/*/status 2>/dev/null | sort -k2 -n +``` + ### Storage #### Disk Space and Used