How to Troubleshoot Memory Issues in Linux

1

Lists the top N processes consuming the most memory.

ps aux --sort=-%mem | head -n <N>
2

Displays the total amount of free and used memory in the system.

free -h
3

Searches for 'out of memory' errors in the system log.

grep -i "out of memory" /var/log/syslog