ps aux | grep python # list processes
top / htop # live CPU and memory per process
free -h # memory (read the 'available' column)
vmstat 1 # CPU, memory, swap, I/O every second
iostat -x 1 # disk utilization and latency
df -h ; du -sh * # disk space by file system / directory
lsof -i :8080 # which process uses a port
ss -ltnp # listening sockets and their processes
strace -p <pid> # trace system calls of a process
kill -15 <pid> ; kill -9 <pid> # SIGTERM first, SIGKILL as last resort
nice -n 10 cmd ; renice 5 -p <pid> # change scheduling priority
dmesg | tail # kernel messages (OOM kills, hardware errors)Loading…