identify high memory usage
Simple snippets to identify general memory usage.
Show top 10 memory consuming processes
ps xuaw --sort -rss | head
Display general memory summary
free -m
Display detailed memory breakdown
cat /proc/meminfo
high CPU usage
Snippets useful for investigating high CPU usage
Top 10 CPU consuming processes
ps -eo pcpu,pid,user,args | sort -k 1 -r | head -10
Identify device encountering IO wait (x is optional and will display more details)
iostat -x 5
Identify processes encountering IO wait (and usually causing the IO)
ps -eo pid,stat,args,wchan | grep ' D'
And of course the awesome tool of 'sar' that is provided within the 'sysstat' package.
low disk space
Simple snippets useful for troubleshooting low disk space.
Using 'du' against a directory and single filesystem and sorting i
du -hxc --max-depth=1 / | sort -n
Find command that displays the 10 largest files within the defined directory
find /tmp -mount -type f -ls | sort -k 7 -r -n | head -10