Skip to main content

Server Investigations

Low Disk Space

Running out of disk space can cause all sorts of havoc.

Get list of directories & files that are taking up the most space. This checks from the current dir, but replace the * with a specific dir to check it specifically.

du -hsax * | sort -rh | head -10 

 

Find Duplicate Processes

If you have a shell script that may pile up with too many duplicate processes running, you can find which scripts have duplicates running with this command:

ps aux | sort --key=11 | uniq -c -d --skip-fields=10 | sort -nr --key=1,1

 

SELinux

If you're using SELinux, the following command will list things getting blocked by SELinux to help you find potential misconfigurations:

grep -E 'setroubleshoot|preventing' /var/log/messages