ps command is a great tool to get a relevant information for each process in the Linux system. The ps command is yet another tool among many which reads and interprets data located in the virtual directory /proc/. If you need to read raw process stats data head over /proc directory and locate directory named after process ID ( PID ) of the process you are looking for. Below as a sample output of the ps command:
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root      1354  1.7  0.4 221272 37184 tty1     Ss+  07:18   5:55 /usr/bin/Xorg 
lubos   8803  0.0  0.0 116536  3260 pts/3    Ss+  09:54   0:00 /bin/bash
lubos   8885  0.0  0.0 116668  3480 pts/4    Ss+  09:59   0:00 /bin/bash
lubos   9294  0.0  0.0 116536  3320 pts/5    Ss   10:01   0:00 /bin/bash
root     11633  0.0  0.0 200656  3616 pts/5    S    11:18   0:00 su
root     11642  0.0  0.0 116644  3452 pts/5    S+   11:18   0:00 bash

The most obvious values here are USER, PID, etc. However, there are two additional columns which need more explanation:

VSZ - Virtual Set Size

The Virtual Set Size is a memory size assigned to a process ( program ) during the initial execution. The Virtual Set Size memory is simply a number of how much memory a process has available for its execution.

RSS - Resident Set Size

As oppose to VSZ ( Virtual Set Size ), RSS is a memory currently used by a process. This is a actual number in kilobytes of how much RAM the current process is using.
ARE YOU LOOKING FOR A LINUX JOB?
Submit your RESUME, create a JOB ALERT or subscribe to RSS feed on LinuxCareers.com.
LINUX CAREER NEWSLETTER
Subscribe to NEWSLETTER and receive latest news, jobs, career advice and tutorials.
DO YOU NEED ADDITIONAL HELP?
Get extra help by visiting our LINUX FORUM or simply use comments below.

You may also be interested in: