≡ Menu

Linux Check Memory Usage

How do I check used and free RAM memory usage under Linux operating systems using command line and GUI tools?

Linux comes with different set of commands to check memory usage. The free command displays the total amount of free and used physical and swap memory in the system, as well as the buffers used by the kernel. The vmstat command reports information about processes, memory, paging, block IO, traps, and cpu activity. Finally, you can use the top, and/or atop/htop commands which provides a dynamic real-time view of a running system. top and friends can display system summary information as well as a list of tasks currently being managed by the Linux kernel.


The /proc/meminfo file stores statistics about memory usage on the Linux based system. The same file is used by free and other utilities to report the amount of free and used memory (both physical and swap) on the system as well as the shared memory and buffers used by the kernel.


Use the cat command or grep command to see /proc/meminfo file:
$ cat /proc/meminfo
$ less /proc/meminfo
$ more /proc/meminfo
$ egrep --color 'Mem|Cache|Swap' /proc/meminfo

Sample outputs:

MemTotal:        8120568 kB
MemFree:         2298932 kB
Cached:          1907240 kB
SwapCached:            0 kB
SwapTotal:      15859708 kB
SwapFree:       15859708 kB

free command

To display free memory size in MB (megabytes):
$ free -m
Sample outputs:

             total       used       free     shared    buffers     cached
Mem:           750        625        125          0         35        335
-/+ buffers/cache:        254        496
Swap:          956          0        956

Displays a line containing the totals memory in MB:
$ free -t -m

       total       used       free     shared    buffers     cached
Mem:           750        625        125          0         35        335
-/+ buffers/cache:        253        496
Swap:          956          0        956
Total:        1707        625       1082

So how much free ram I have?

Type the following command:
$ free -m
Sample outputs:

Understanding Free Command Output

Understanding Free Command Output

In this above output, my server has used 2825 MB ram, and 9083 MB is available for other users and programs.

A list of free command options

  -b,-k,-m,-g show output in bytes, KB, MB, or GB
  -l show detailed low and high memory statistics
  -o use old format (no -/+buffers/cache line)
  -t display total for RAM + swap
  -s update every [delay] seconds
  -c update [count] times

vmstat command

Type the vmstat command at shell prompt:
$ vmstat
Sample outputs:

procs -----------memory---------- ---swap-- -----io---- --system-- ----cpu----
r  b   swpd   free   buff  cache   si   so    bi    bo   in    cs us sy id wa
1  0      0 131620  35432 341496    0    0    42    82  737  1364 15  3 81  1

top command

Type top command at the shell prompt:
$ top
Sample outputs:

Fig.01: top command displaying used memory

Fig.01: top command displaying used memory

To exit from top command type q key.

atop command

The program atop is an interactive monitor to view the load on a Linux system. This program can display the amount of used and free memory. It is similar to top command but comes with additional advanced options. By default, the atop command is not installed on most Linux distributions.
$ atop
Sample outputs:

Fig.02: Linux Check Amount Of Memory With atop Command

Fig.02: Linux Check Amount Of Memory With atop Command

htop command

The program htop is an interactive process viewer. It is similar to top, but allows to scroll the list vertically and horizontally to see all processes and their full command lines.
By default, the htop command is not installed on most Linux distributions.
$ htop
Sample outputs:

Fig.03: Linux Check Amount Of Physical Memory With htop Command

Fig.03: Linux Check Amount Of Physical Memory With htop Command

GNOME Desktop: GUI tool to see memory usage

The "Gnome System Monitor" application enables you to display basic system information and monitor system processes, usage of system resources, and file systems. You can also use System Monitor to modify the behavior of your system. You can start System Monitor by visiting System menu > Choose Administration > System Monitor option. Or type the following command at the shell prompt:


Sample outputs:

Fig.04: Linux See Memory Usage With GUI System Monitor Tool

Fig.04: Linux See Memory Usage With GUI System Monitor Tool

Check out related media

(Video 01: Top five commands to see used and free memory under Linux)

A note about the performance

  1. RAM - An occupation percentage of 90% is considered as critical.
  2. SWAP - An occupation percentage of 80% is considered as critical.
  3. To solve performance related problems, add more RAM and increase the swap space (or move swap space to another disk controller).

Read man pages of free, vmstat, top, atop, and htop commands for more information.

{ 76 comments… add one }

  • suresh September 12, 2007, 8:12 am

    Hi ,

    I need a unix command to get the total memory usage percentage.so that i can call this command from java.The output of the command should only be the percentage of memory utilization.


  • Matt November 30, 2007, 4:01 pm


    ps aux | awk ‘{sum +=$4}; END {print sum}’


  • Michael December 6, 2007, 4:00 pm

    Using the command free, vmstat, top all shows it uses almost 100% of the memory. But if I use the system monitor, it will show only less than 10%.

    I am using CentOS 5. can anyone explain why the free, vmstat, top all displaying wrong information? Thanks.

    $ free -m
    total used free shared buffers cached
    Mem: 3792 3638 154 0 128 3231
    -/+ buffers/cache: 277 3515
    Swap: 1983 0 1983
    $ vmstat
    procs ———–memory———- —swap– —–io—- –system– —–cpu——
    r b swpd free buff cache si so bi bo in cs us sy id wa st
    0 0 108 158380 131948 3309388 0 0 106 75 203 180 0 0 98 1 0

    • Selan October 6, 2011, 1:12 am

      Cached memory is a kind of free memory.

  • Atahan February 1, 2008, 7:30 am

    Actualy memory is not used by application, but it is used for disk caching.
    If memory is not fully utilized by kernel than it is wasted, by keeping data in cache when an application needs data again it can be provided faster.
    If you want to see the memory from the perspective of application you should look at +- buffers/cache line, the free column of this line shows you the memory that can be used for applications.

    In the case below my application using 2GB of memory.

    # free -m
    total used free shared buffers cached
    Mem: 7973 7323 650 0 128 5152
    -/+ buffers/cache: 2042 5931
    Swap: 8189 40 8149

    • Ganesh March 9, 2011, 8:56 pm

      Thank you.

  • Ohm May 20, 2008, 4:15 am

    Hi ,

    I take care 2000 PCs that using Redhat 7.3. I’m finding the command to create script file to check RAMBus of the PCs. Could you please help to recommend the appropriate one ?



  • pudhiyavan June 19, 2008, 6:49 pm

    is there any way/script to find out physcial memory usage exclusive of buffer/cache usage??

  • don August 6, 2008, 9:28 am

    very good

  • Shaukat Ali Gill November 9, 2008, 1:58 pm

    You can also check memroy by using command “cat /proc/meminfo” it will give you detail info.

  • Duncan December 5, 2008, 8:23 pm

    the memory information is also stored in /proc/meminfo… so just in case you don’t have any tools installed… cat /proc/meminfo

    • mouli August 25, 2011, 5:27 am

      i am expecting a command to see memory information. you said cat /proc/meminfo ,it is for seeing the configuration file right… is there any possibility to get the details of memory directly..

  • amm January 10, 2009, 1:03 pm

    hi all

    I use sun servers and solaris os and memory load has been increased to 90%

    I need to know which command can i use to check on its memory and how i know the abnormal increase

  • kshard January 22, 2009, 1:06 pm

    hi all

    I am trying to get the output of the command top in java using a processbuilder. But its not giving any output. Though a command such as ‘ps -all’ is giving the required output. Can anyone help please. Its urgent…


  • team fortress January 23, 2009, 10:05 pm

    How can I find the memory used by each php script on the server?

  • kishore February 21, 2009, 10:55 am

    hi this is kishore

    with single command can we get information of version of linux , ram,and memory status informationa. And as well as with single command the total system information
    can i know the comman of linux


  • Oink! March 30, 2009, 7:51 am

    [kishore] You need to write a script which excutes various commands and output as a single command.

  • Psycho Tux April 30, 2009, 9:01 am

    ps aux | awk ‘{sum +=$4}; END {print sum}’. It works.
    Thanks Matt…
    Is there any way to do the same for SWAP also.

  • Ajay Kumar Bysani June 15, 2009, 6:36 am

    How can get the average memory usage of a perl script that I am running on a linux machine? Can anybody help?

  • T Sudhakarraj August 13, 2009, 4:22 am

    Hi kishore

    Use this coomand to get all the required information

    lsb_release -a && free -m

  • Paul Plowman September 3, 2009, 4:54 pm

    Believe that we have a memory leak on RHEL 4.5 with Java & Apache running.

    ps -eo pid,ppid,rss,size,vsize,sz,pmem,comm | awk '{ rss += $3; size += $4; vsize += $5; sz += $6; pmem += $7} ; END { print "rss = "rss" size = "size" vsize = "vsize" sz = "sz" pmem = "pmem }' ; free -m
    rss = 4590060 size = 7302928 vsize = 11360544 pmem = 26.7
    total used free shared buffers cached
    Mem: 16028 15979 48 0 0 24
    -/+ buffers/cache: 15954 73
    Swap: 32767 4571 28196

    Does anyone have a command, code, or program to identify where the memory is being utilized?
    After a reboot the server is using 24.6% of memory or free shows 4869 MiB.


  • T Sudhakarraj September 4, 2009, 7:13 am

    Hi Paul,

    ps -auxf | sort -nr -k 4 | head -10

    The above mentioned command will display top 10 memory usage in % by each process

    • jetole November 21, 2010, 3:28 pm

      T Sudhakarraj, This is a great answer in order to see the top 10 application based on the percent usage but I thought I could help improve it a little. As you probably know, most hard core/old school bash programmers often object to using more commands then you need to get the output you want. When you are performing this command, it’s important to realize that the percentage shown is a reflection of the RSS size of that application and it does not consider RAM allocated by shared objects / dynamically linked libraries (I hate using that term since most people associate it with Windows DLL files but dynamically linked library, while the proper term in Windows is also the generic term to refer to these types of libraries / objects on any OS).

      Because the percentage of RAM shown in ps for any output that uses the %mem / pmem format specifier is in direct correlation with host much data that application has in RSS relative to how much physical ram the host has, you can sort the ouput in ps yourself by using the `–sort rss` option. The final command would look like:

      ps -A --sort -rss -o comm,pmem | head -n 11

      The output would look like:

      COMMAND         %MEM
      kvm              5.6
      thunderbird-bin  3.0
      java             2.4

      This will give you the 10 processes using the most ram ( I only showed 3 in my example) as well as the ps header describing each field. If you want to remove the header then you can add the option “–no-headers” (without the qyuotes) to ps. If you remove the headers in ps, you will probably want to change the head command to use 10 instead of 11 since the extra line is for the headers Also this example only shows the “short” command name or basically it only shows the command but non of the arguments. It also doesn’t show the actual amount of RSS being used. If you want to show the “long” command or basically the command name with all the arguments, replace “comm” with “cmd” in the ps options. If you want to display the actual amount of RSS being used by each app in the top 10 list, replace “comm,pmem” with “comm,pmem,rss” and it will now have three columns for command, percent of memory and kilobytes of RSS used instead of just command and percent of memory.

      Also, unfortunately ps doesn’t have the option to convert kilobytes to megabytes. This can still be displayed but it requires a bit more of a complex answer. In order to display the RSS usage in megabytes instead of kilobytes we run through a loop and do the math ourselves on each line.

      while read command percent rss; do if [[ "${command}" != "COMMAND" ]]; then rss="$(bc <<< "scale=2;${rss}/1024")"; fi; printf "%-26s%-8s%s\n" "${command}" "${percent}" "${rss}"; done < <(ps -A --sort -rss -o comm,pmem,rss | head -n 11)

      The example below calculates the megabytes used by each applications RSS rounded to nearest 100th of a whole number. You can change this to show more or less places after the decimal by changing "scale=2" to whatever number you like.

      Hope this helps some people.

      P.S.: I saw that the term RSS was used by someone before me but I don't see anywhere on this thread where anyone has defined it. RSS as it relates to RAM (on any OS as far as I know) is the portion of memory that a process is using that is held in RAM. Every process has RSS and RSS does not include any items in RAM which have been swapped to disk or are otherwise anywhere else then in the physical RAM. This means that the size of each programs RSS is the amount of data that program itself is storing in physical RAM.

      • NoNeedForAName April 15, 2012, 6:52 pm

        Hope this helps some people.

        Yes, yes it does. Bloody Apache. Thanks jetole.

  • azaz mustafa June 10, 2010, 10:39 am

    Actualy memory is not used by application | swap file memory is 1534196 and uses 0
    so pleas solution


  • dipul June 11, 2010, 9:43 am

    how we can know status of the RAM through the JAVA Programming?


  • Mohammed August 5, 2010, 11:30 am

    Hi All,
    We use a hospital Information system application. From 10:30 AM the performance becomes really slow and the application freezes. Not sure if it is due too many sessions open or number of client connections or cpu/memory issue.
    We have the application installed on all client machines. The application server running on RHEL 5.2 version on IBM Balde work stations with 2 node cluster. App server is connected to Oracle 11g Db server.
    Currently, we restart the the application server every 2 days after working hours and see that the performance back to normal. But if we do not restart the servers, the performance is bad again.
    Please let me know what all things I need to check here so to know what is causing the performance issue.


    • Techie Talks September 28, 2010, 4:56 am

      Try to kill unused running commands/applications.

  • Krunal September 17, 2010, 6:39 pm

    I want to get the cat output in memory buffer. Can anybody please let me know how it is possible.

  • BK September 22, 2010, 4:32 am

    Can you pleas tell me how can I check Guaranteed Ram and Burstable Ram from shell prompt?

    Thanks alot

  • Techie Talks September 28, 2010, 4:53 am

    cyberciti has been my partner since we had linux servers in the office, thank you and hope you will continue this site and more power to the webmaster and all its staff.

    • NoNeedForAName April 15, 2012, 6:53 pm

      Seconded. Cyberciti is better than



  • bharath vn October 25, 2010, 11:54 am

    Hey guys,

    i see my sites apache uses more memory around 4G, after restarting it release 3G.

    The actual problem is Apache keeps increasing its memory usage.

    Do you guys know how to overcome this issue.

    Thank You

  • maclean November 5, 2010, 7:07 am

    Linux memory management is more flexible than windows

  • muthukumar November 16, 2010, 8:21 am

    Hi guys,

    how to setup the IP address in running production server

    thanks in advance

  • mahes November 30, 2010, 10:44 am

    hi guys.
    The top 10 application are using 0% mem for ME …but top says..

    Mem: 4145948k total, 2776936k used, 1369012k free, 146512k buffers
    Swap: 1558296k total, 4k used, 1558292k free, 2467592k cached

    out of 4G ram 2.6 is already used..WIll the kernel allocate if a process require more than the free memory. Wat process is actually using the used one .??

    kindly help me with this.

    n 11id:/localdisk/lattice/lattice_36041# ps -A –sort -rss -o comm,pmem | head
    ntpd 0.0
    named 0.0
    vim 0.0
    bash 0.0
    sshd 0.0
    sshd 0.0
    sshd 0.0
    sshd 0.0
    bash 0.0
    sshd 0.0

    • jetole November 30, 2010, 3:29 pm

      I see your using the command I mentioned above but with one less item in the head command output but that’s alright ;)

      You can show the same data, without limiting the input but also displaying the RSS usage (and the pid) for each process by running:

      ps -A –sort -rss -o pid,comm,pmem,rss

      The far right column will show you the RSS usage in kilobytes. The order is descending so the application with the highest allocated RSS (using the most) is at the top of the list. The application with the lowest allocated RSS (using the least) is at the bottom of the list. Remember that RSS is only referring to the memory you application is using that is actually in RAM and does not include anything swapped to disk so this is in fact the amount of RAM your application is using.

      Something important though that you may not have realized is that Linux tends to use almost all available memory whenever it can by default. Linux will leave an percent free (I don’t know how to check what the percent is but it doesn’t matter) and then it will allocate the rest to buffers and cache. The general idea is this, buffers is the smaller segment it allocates for I/O usage of processes that are running. This mostly refers to items that programs need to write to a disk but that data is often cached in memory and then written. This causes programs not to have to wait for I/O to complete and the kernel is then able to write the data to disk as quickly as it’s capable of doing but at the same time without having to have a program and hence the user wait for the information to be written to disk. The buffers are also used for IPC or inter process communication. The cache is mostly used for reading files off disk. The algorithm is uses, while complex, basically stores a combination of files that are popular and recent in cache memory. This speeds up disk read times a lot too. You will notice that the cache is almost always significantly larger then the buffers. You can view both of these using free to see total, used and free memory. You can use free -m for megabytes and free -g for gigabytes.

      This RAM, more quickly with cache then buffers, can be very quickly (on both) be released and therefor given to any process asking for RAM. This means that, although this RAM is used and it is used in way that speeds up your system, if any task needs the RAM, it will instantly be given to that process. One example would be if I start VLC movie player and VLC needs and therefor requests 50MB to run, then the kernel will free 50MB from cache and buffers and allocate it to VLC. This is why there is also a line when you run free which says “-/+ buffers/cache”. This line which shows numbers under used and free, isn’t the RAM you literally have used and literally have free because of ram allocated to cache and buffers, however it is the line you should refer to when you want to see how much free RAM you have because RAM allocated to buffers and cache will be instantly released and given to a process whenever it needs it.

      When you view your free memory inside top, it shows you the literally used RAM and literally free RAM meaning cache and buffers are added to used and subtracted from free and their is nothing wrong with this but the RAM inside cache and buffers is still available to you when you need it. As I mentioned, the best way to really see how much used and free RAM you have is to look at the “-/+ buffers/cache” line inside free. That line is there for a reason.

      Hope this helps.

      • jetole November 30, 2010, 3:36 pm

        Ah I forgot that the forum breaks double hyphens by default (poor mans attempt to stop SQL injections maybe?). The actual command I have up top is

        ps -A --sort -rss -o pid,comm,pmem,rss

        Notice the double hyphens in front of sort.

    • Ashok December 9, 2010, 5:08 pm
      # Developed by Ashok Kumar
      # 1:50 PM Monday, February 04, 2008
      TOT=`cat /proc/meminfo | grep MemTotal: | awk '{print $2}'`
      USED=`cat /proc/meminfo | grep Active: | awk '{print $2}'`
      FREE=$[$TOT - $USED ]
      echo > $LOG
      if [ "$USED" -gt "0" ]; then
         USEDPERC=$[$USED * 100 / $TOT]
         echo "Used Percentage      : $USEDPERC %"
         TOTMB=$[$TOT / 1024 ]
         USEDMB=$[$USED / 1024 ]
         FREEMB=$[$TOTMB - $USEDMB ]
         #echo "Used Percentage : $USEDPERC"
         if [ "$USEDPERC" -gt "80" ]; then
           echo "------------------------------------------------------------------" >> $LOG
           echo `hostname`   >> $LOG
           echo "------------------------------------------------------------------" >> $LOG
           echo "Total Memory (MB)    : $TOTMB" >> $LOG
           echo "Used Memory (MB)     : $USEDMB" >> $LOG
           echo "Free Memory (MB)     : $FREEMB" >> $LOG
           echo "Used Percentage      : $USEDPERC %"  >> $LOG
           echo "------------------------------------------------------------------" >> $LOG
           if [ "$USEDPERC" -gt "95" ]; then
      if [ "$FREEMB" -eq "0" ]; then
         echo "------------------------------------------------------------------" >> $LOG
         echo "    No free memory available in " `hostname`    >>$LOG
         echo "------------------------------------------------------------------" >> $LOG
      • Ashwin March 23, 2011, 1:15 am

        Thanks Ashok

  • mahes December 1, 2010, 6:10 am

    Hope this helps.”

    Thanks a lot boss , great explanation . is of great help to me as i am able to free up my mem , used by so many ssh process :)

  • riyan December 3, 2010, 4:49 am

    Hi, Great Article. is there any way to find the memory usage history of SUSE Linux server?

  • jetole December 3, 2010, 11:20 am


    Yes and no. Generally speaking, Linux the kernel doesn’t do any real auditing / logging of memory usage but then again it shouldn’t either since Linux really is only a kernel so you will need to install another tool to deal with this. The most common / popular / recommended tool for this would be sysstat / sar and on quite a few distros (Debian, Ubuntu, CentOS), sysstat is the literal name of the package you want to install. Once installed, it will start logging the data but their really is no way for it to record data from before it was installed so basically, if you don’t have a audting / logging application like sysstat already installed then you can’t really view the past history until after it is.

  • Vaseem January 7, 2011, 4:44 am

    you can try from the terminal
    cat /proc/meminfo
    cat /proc/cpuinfo
    This will give you information regarding the memory and CPU

    • mouli August 25, 2011, 5:32 am

      they both are shows the configuration information…
      and the command to see the cpu information is ”lscpu”

      • Sandeep March 9, 2013, 10:19 am

        Exactly! You simply figured out this…

  • Itzekocke April 12, 2011, 11:28 am


    that all helped a lot – even if the information is more than 5 years old!


  • peter May 1, 2011, 4:12 pm

    fantastic article! thanks very much for your thourough and clear explaination, great job!

  • pat July 31, 2011, 12:04 am

    Hi Im new to linux and have an older acer 340t travel mate i went into BIOS but didnt see how much memory i have..How to i get into where i can type commands to fine out how much memory It has and what would the command be. Thank you so much for your help

    • Tryme July 31, 2011, 11:19 pm

      Open a command-line terminal (select Applications > Accessories > Terminal), and then type:

      free -m
  • Timothy Asir August 10, 2011, 9:11 am

    MemUsed = MemTotal – MemFree – Buffers – Cached

    We can take the values from /proc/meminfo and calculate this;
    and can verify with gnome-system-monitor output.

  • Aziz Zoaib September 28, 2011, 5:19 am

    How to check CPU and memory utilization of previous days ?

    any commands ?

  • Timothy Asir September 30, 2011, 9:49 am

    Then, you have to use RRD.
    1) create an RRD (database) for CPU and memory utilization using rrdtool. You can also write a script to do that using perl or python. In perl you can use (RRDs::create).

    2) Update the RRD with cpu and memory details periodically (on every 5-mints or hour)

    3) Use rrdtool xport / rrdtool graph command to get details of a specific period (hour/day/week/month/year)

    • jetole September 30, 2011, 11:20 am


      That’s rather crude. You don’t need to program anything to get these stats nor do you need to write RRD scripts. One method that has been used by many system administrators for a long time is through sysstat though this is all console based. If you prefer a web based GUI with RRD graphs then cacti is already programmed to monitor all of this for you. There are also probably several dozen other ways to do this so you probably shouldn’t use terms like “Then, you have to use RRD”. Because you only know one way to do it doesn’t mean it’s the only way and you shouldn’t be dismissive.

      P.S.: You’re explanation seems to be lacking lacking a lot and the first thing I notice is how often you update the RRD is based on how often you have configured and RRD to be updated. An RRD database designed to be updated every 5 minutes would be pretty much useless if you update it every hour based on the way RRD is designed to implement this data. A better approach is to log this data (at least) twice as often you want it to be available, for example, if you want a daily bar graph of cpu usage with 48 points of input from data collected every 1/2 hour then log the data at least every 15 minutes. When you are you want to view this data then you dynamically create the RRD based on the the specifications you supply at the time and this way you are not bound to one poorly designed RRD component which you may have implemented ‘a long time ago” and now you are forced to use it even though you need statistics at an entirely different rate then what you had originally planned “way back when”

      • jetole September 30, 2011, 11:21 am

        P.P.S.: I forgot to mention Munin which is another web based RRD based performance monitoring application.

  • jetole September 30, 2011, 11:31 am

    One more P.S.: I use sysstat, cacti, munin and more to monitor the server farm I am responsible for. They all provide the same details in a general sense but in a detailed sense they are all different from one another in a way that one doesn’t entirely replace the other and I feel it’s best to implement whatever provides you with the details you need in a useful and efficient manner and if this means you have to use more then one tool for different ways to comprehend the data then there is nothing wrong with that. This isn’t Windows where you have to worry about product cost, contract lock in’s and vendor abuse so install 10 products if you need it and if you decide to install 20 just to see which ones ultimately give you the info that you need then there is nothing stopping you (at least not for most Linux tools. I can’t speak for all of them).

  • sureshatt October 10, 2011, 6:49 am

    thanks dude, nice tutorial

  • Ravinder Kumar October 13, 2011, 1:52 pm

    Hi ,

    I have problem in one linux application server where 3 instaces is running of java, each instaces is alocated 1 gb memory but my server is using my 21 gb memory , i am surprised for this.

    Can anyone help me , i checked with many command but nothing found….

    Thanx in advance….

  • Jussi November 27, 2011, 11:03 am

    You folks might be interested in systemgraph named data collector/rrdtool/web cgi framework, that produces easily many kind of stats for system resource usage; see http://www.decagon.de/sw/systemgraph/

  • escorte December 23, 2011, 8:42 am

    Any ideea why on a CentOS 5.7 Final linux box, 64 bit version, my system only recognized 3261 MB RAM instead of 4 GB installed? When it boots and also in BIOS all 4 GB ram are shown, but under linux I only see 3,2 GB. Thanks!

    • nixCraft December 23, 2011, 9:48 am

      Are you sure you got 64 bit CentOS Linux? 64 bit can address 4Gib and more ram without any problem.

  • Nirav February 15, 2012, 2:49 pm

    How can I find only memory utilization [not in percentage] and only I/O utilization [not in percentage].

  • Jason February 17, 2012, 2:14 pm

    I recently discovered “htop”. This is a really nice tool to see your resources being used via your terminal and even offers point and click functionality!

    On Redhat-based systems simply type:
    # yum install -y htop

    Then from the command-line run:
    # htop

  • jetole April 15, 2012, 7:26 pm


    free (-k -m or -g for showing in kilo, mega or gigabytes) for memory usage
    iostat for disk io. Should be part of the systat package

  • vivek July 2, 2012, 10:38 am

    Hello all,

    Please let me know when i run command free -m on any linux box with 8GB assign ram it show me 7873 MB please let me know is linux kernel reserved any memory or where is 319 mb memory is use.

  • Chirag August 14, 2012, 6:54 am

    Thanks. Awesome guide

  • sanjay March 5, 2013, 7:02 am

    hi sir
    Iam using linux os in friendlyARM
    I am having 64 MB of ram so it is using 64 MB but i want to limit it, it
    means i want 100 kb memory for future usage so restrict 64 MB ram to
    (64MB-100KB) (shortly: don’t use last 100 KB ram)
    command to overcome with program consuming too much RAM
    how it can be done ….can any one suggest me

  • linux admin April 3, 2013, 5:34 pm

    Anyone know how to find out what type of ram the server uses and how many sticks by command with Linux 6?

    For example my server has 4 gigs of ram, I am trying to find out if it has 4 1gb sticks or two 2gb sticks.

    Also I am trying to find what kind of ram, for example if it’s ddr3 1600


    • Stan October 27, 2015, 3:00 pm

      dmidecode -t 17

      Handle 0x0021, DMI type 17, 34 bytes
      Memory Device
      Array Handle: 0x0009
      Error Information Handle: Not Provided
      Total Width: 72 bits
      Data Width: 64 bits
      Size: 8192 MB
      Form Factor: DIMM
      Set: 21
      Locator: DIMM 24
      Bank Locator: Node 1 Bank 24
      Type: DDR3
      Type Detail: Registered (Buffered)
      Speed: 1600 MHz
      Manufacturer: Samsung
      Serial Number: 36378A02
      Asset Tag: Unknown
      Part Number: M393B1K70DH0-CK0
      Rank: 2
      Configured Clock Speed: 1600 MHz

  • jetole April 4, 2013, 4:09 pm

    lshw. comes standard on many systems including debian, ubuntu. etc. Last time I looked at rhel, cent, etc you need to add a third party repo.

  • Jose Tapia April 13, 2013, 6:53 am

    Great article, saving on bookmars :D

  • Silver Moon June 12, 2013, 1:12 pm

    Thanks for the great tutorial.
    Really helpful in monitoring the resource usage on my server.

  • Chowdary August 6, 2013, 3:32 pm

    Hey All,

    How do I get the memory usage details in last 5 hours ? or let’s say Last few hours?

    Please suggest.


  • ravi sankar April 7, 2015, 4:54 am

    hi ALL,

    Am installing java,nosql,oep,weblogic i want to find how much useage taken by cpu for each tool and RAM and HDD for each tool


    ravi sankar.G

  • Jarrod April 27, 2015, 5:05 am

    Nice post, top and free commands are easily my favorite ways to quickly check memory usage!

  • Jegan July 9, 2015, 7:53 am

    Hi Team,
    Can you assist me to find earlier particular time(may be 2-3 hours before) what process caused more CPU/memory in linux servers ? Thanks in Advance

    With Regards,

Leave a Comment

   Tagged with: , , , , , , , , , , , , , , , , , ,