If you have linux dedicated server, you might discover that its memory usage structure is a bit confusing. That is because linux handles the virtual memory and physical memory differently. In linux, the virtual memory is stored in a different partition it uses the RAM to store all the applications and their cache. The virtual memory sits practically untouched and is used as a last resort. This is designed to make the applications faster and smoother. You can check your linux memory status in several ways:
free command returns memory statistics for the total, free and used physical memory (RAM) in the system, and also shared memory, buffers, cached memory and swap space used by the Linux kernel.
Type: ‘free’ -[options]
You can also check the memory usage of running softwares (processes in linux). Every process is identified by a unique number: PID. To check the PID usage statistics, run the ps command.
Type “ps aux” to see all running processes, including the PIDs.
Using top is simple, simply type top at command shell, and constantly update stats page will be shown.