Linux top threads Recipe
- Run
topin the background with a 30 second interval:nohup sh -c "top -c -w -b -H -d 30 | grep -A 10 'top - ' >> diag_topH_$(hostname)_$(date +%Y%m%d_%H%M%S).txt" & - Reproduce the problem.
- To stop collection, kill the
topprocess. For example:pkill -TERM -f "top -c -w -b -H -d" - Upload
diag_*andnohup.out
For background, see Linux top.