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/cpuinfoMemory Monitoring
# Show memory usage
free -h
# Detailed memory information
cat /proc/meminfo
# Show processes by memory usage
ps aux --sort=-%mem | head -10Disk Usage
# Show disk space
df -h
# Show directory sizes
du -sh /*
# Show IO statistics
iostat -x 1Docker/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 -aLog 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/syslogProcess 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=runningNetwork
# 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-timersTips for Usage
- Resource Monitoring:
- Use
htopfor interactive monitoring - Use
docker statsfor container-specific resource usage - Combine with
watchcommand for continuous monitoring:watch docker stats
- Log Analysis:
- Use
grepwith logs to filter specific issues - Example:
docker logs <container_id> | grep -i error
- Performance Issues:
- Start with
htopto identify high CPU/memory usage - Use
docker statsto identify problematic containers - Check logs with
journalctl -fduring issues
- Disk Space:
- Regular check with
df -h - Use
docker system dffor container space usage - Clean up with
docker system prunewhen needed
Remember to always be careful with cleanup commands and verify before running potentially destructive operations.



