Process Watcher
#!/bin/bash
while true; do
ps aux --sort=-%cpu | awk 'NR>1 && $3>80 {printf "HIGH CPU: %s (PID %s) %.1f%%\n", $11, $2, $3}' | head -5
sleep 30
doneintermediateMonitoringUpdated 2024-12-15
- process
- monitor
- cpu
- memory
- alert
Monitor processes for high CPU/memory usage.
#!/bin/bash
while true; do
ps aux --sort=-%cpu | awk 'NR>1 && $3>80 {printf "HIGH CPU: %s (PID %s) %.1f%%\n", $11, $2, $3}' | head -5
sleep 30
doneWe use cookies for essential site function and — with your consent — anonymous analytics. See our Cookie Policy.