MemWatch
Memory monitor: view usage, find top consumers, watch trends, inspect per-process memory, check swap, and alert on thresholds.
Commands
| Command |
Description |
memwatch status |
Current memory usage with visual bar and breakdown |
memwatch top [n] |
Top N memory-consuming processes (default: 10) |
memwatch watch |
Snapshot memory every 2s for 10 iterations |
memwatch process <pid> |
Memory details for a specific PID (VmRSS, VmSize, PSS, etc.) |
memwatch swap |
Swap usage details with top swap consumers |
memwatch alert <threshold> |
Check if memory usage exceeds threshold % |
memwatch detailed |
Full /proc/meminfo dump |
memwatch compare |
Compare memory now vs 30 seconds later (delta) |
memwatch version |
Show version |
Examples
memwatch status # → usage %, visual bar, total/avail/cached
memwatch top 5 # → top 5 RAM consumers (PID, %MEM, RSS, CMD)
memwatch watch # → 10 snapshots, 2s apart
memwatch process 1234 # → VmSize, VmRSS, VmSwap, PSS, threads
memwatch swap # → swap devices, usage, top swap consumers
memwatch alert 80 # → 🚨 if usage > 80%, ✅ if under
memwatch detailed # → full /proc/meminfo
memwatch compare # → two snapshots 30s apart with delta
Requirements
free, ps (standard)
/proc/meminfo, /proc/[pid]/status (Linux)
1---2name: memwatch3description: Monitor RAM usage in real time and alert on high memory consumption thresholds. Use when tracking memory, identifying RAM hogs, setting alert thresholds.4---5
6# MemWatch
7
8Memory monitor: view usage, find top consumers, watch trends, inspect per-process memory, check swap, and alert on thresholds.
9
10## Commands
11
12| Command | Description |
13|---------|-------------|
14| `memwatch status` | Current memory usage with visual bar and breakdown |
15| `memwatch top [n]` | Top N memory-consuming processes (default: 10) |
16| `memwatch watch` | Snapshot memory every 2s for 10 iterations |
17| `memwatch process <pid>` | Memory details for a specific PID (VmRSS, VmSize, PSS, etc.) |
18| `memwatch swap` | Swap usage details with top swap consumers |
19| `memwatch alert <threshold>` | Check if memory usage exceeds threshold % |
20| `memwatch detailed` | Full `/proc/meminfo` dump |
21| `memwatch compare` | Compare memory now vs 30 seconds later (delta) |
22| `memwatch version` | Show version |
23
24## Examples
25
26```bash
27memwatch status # → usage %, visual bar, total/avail/cached
28memwatch top 5 # → top 5 RAM consumers (PID, %MEM, RSS, CMD)
29memwatch watch # → 10 snapshots, 2s apart
30memwatch process 1234 # → VmSize, VmRSS, VmSwap, PSS, threads
31memwatch swap # → swap devices, usage, top swap consumers
32memwatch alert 80 # → 🚨 if usage > 80%, ✅ if under
33memwatch detailed # → full /proc/meminfo
34memwatch compare # → two snapshots 30s apart with delta
35```
36
37## Requirements
38
39- `free`, `ps` (standard)
40- `/proc/meminfo`, `/proc/[pid]/status` (Linux)