Last active
August 24, 2017 10:40
-
-
Save teddyking/b03ef88f454ad31a1527da1e81930f12 to your computer and use it in GitHub Desktop.
A collection of commands that are useful when debugging linux systems
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# list processes in D or Z state, along with kernel function where the processes are sleeping | |
ps axo pid,ppid,comm,state,eip,esp,wchan | grep 'D\|Z' | |
# dump all D state processes incl. kernel stack traces to /var/log/messages | |
echo w > /proc/sysrq-trigger | |
# check process start time | |
ps -eo pid,comm,lstart,etime,time,args | |
# view syslog without noise | |
cat /var/log/syslog | grep -Ev 'audit|Lease|CMD|CRON|DHCP|dhclient|anacron' | less | |
# see how much memory a process is using | |
grep VmRSS /proc/PID/status |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment