Let's analyze some running processes
dstat -nvl 5
vmstat 5
iostat 5
nproc
lscpu
ps fuxS
htop -u $USER
top -u $USER
w -f
lsof -p $PID
ls -l /proc/$PID/fd
cat /proc/$PID/fdinfo/$FD
strace -p $PID
watch 'COMMAND ...'
- Be careful of buffering
- Make sure to flush! (
fflush(stdout)
,print(..., flush=True)
) python -u
(PYTHONUNBUFFERED=1
)
ulimit -c unlimited
ls /tmp/core.*