Posted

on
August 29, 2026

Coolify Server Resource Monitoring Commands

CPU Usage Monitoring

# Real-time process viewer (interactive)
htop

# System activity reporter (CPU stats every 1 second for 5 samples)
sar -u 1 5

# Process list sorted by CPU usage
top -o %CPU

# Shows CPU stats updated every second
mpstat 1

# Virtual memory statistics
vmstat 1

# Check CPU info and frequency
grep MHz /proc/cpuinfo

Memory Monitoring

# Show memory usage
free -h

# Detailed memory information
cat /proc/meminfo

# Show processes by memory usage
ps aux --sort=-%mem | head -10

Disk Usage

# Show disk space
df -h

# Show directory sizes
du -sh /*

# Show IO statistics
iostat -x 1

Docker/Coolify Commands

Container Management

# List all containers
docker ps -a

# Container resource usage
docker stats

# Show container logs
docker logs -f <container_id>

# Container details
docker inspect <container_id>

# Check container events
docker events --filter 'type=container'

# Restart container
docker restart <container_id>

# Stop container
docker stop <container_id>

System Information

# Check Docker system info
docker system df

# Show Docker disk usage
docker system df -v

# Docker system prune (careful!)
docker system prune -a

Log Management

# Check system logs
journalctl -f

# Check specific service logs
journalctl -u docker.service

# Docker container logs
docker logs --tail 100 <container_id>

# System messages
tail -f /var/log/syslog

Process Management

# List all processes
ps aux

# Find specific process
pgrep -fl <process_name>

# Kill process
kill -9 <pid>

# Check running services
systemctl list-units --type=service --state=running

Network

# Check network connections
netstat -tulpn

# Network interface statistics
ifconfig -a

# Active network connections
ss -tunlp

# DNS resolution
dig <domain>

Cron Jobs and Tasks

# List cron jobs
ls -l /etc/cron.*
crontab -l

# Active tasks
atq

# System tasks
systemctl list-timers

Tips for Usage

  1. Resource Monitoring:
  • Use htop for interactive monitoring
  • Use docker stats for container-specific resource usage
  • Combine with watch command for continuous monitoring: watch docker stats
  1. Log Analysis:
  • Use grep with logs to filter specific issues
  • Example: docker logs <container_id> | grep -i error
  1. Performance Issues:
  • Start with htop to identify high CPU/memory usage
  • Use docker stats to identify problematic containers
  • Check logs with journalctl -f during issues
  1. Disk Space:
  • Regular check with df -h
  • Use docker system df for container space usage
  • Clean up with docker system prune when needed

Remember to always be careful with cleanup commands and verify before running potentially destructive operations.

Brendan O'Connell

Brendan is a longtime WordPress user and has built and managed hundreds of websites over the last decade.

Recent Posts

You're still here? Wow, dedication. Here are some of my latest ramblings.