Exemplos de Uso
$
echo "=== MEMÓRIA ATUAL ==="
free -h
$
echo "=== TOP CONSUMIDORES ==="
ps aux --sort=-%mem | head -15
$
echo "=== SWAP EM USO ==="
swapon --show
$
echo "=== OOM KILLER ==="
grep "Out of memory" /var/log/messages 2>/dev/null | tail -5
dmesg | grep -i "oom" | tail -5
$
echo "=== CACHE PHP-FPM ==="
ps aux | grep php-fpm | grep -v grep | wc -l
echo "workers PHP-FPM ativos"
$
echo "=== RECOMENDAÇÃO ==="
TOTAL=$(free -m | awk "/Mem:/{print $2}")
echo "RAM total: ${TOTAL}MB"
echo "max_children recomendado: $(( TOTAL / 50 ))"