Tuesday, April 12, 2011

How much RAM does my Ubuntu / Fedora Linux desktop PC have?

Here is one of the most frequently asked questions from my mailbag:
Hey I need to know how much ram memory I have in my Ubuntu Linux computer. Under Windows XP I can find out memory by visiting Start > Control Panels > System in control panel. So how do I find out RAM information under Linux PC?
The best way to find out RAM information is open a terminal and type the following command:
$ free -m
OR
$ free -mt
Output:
total       used       free     shared    buffers     cached
Mem:          2008       1837        170          0         50        963
-/+ buffers/cache:        822       1185
Swap:         1027          0       1027
free command print the total amount of free and used physical and swap memory in the system, as well as the buffers used by the Linux kernel. You can pass following options
  • -b switch displays the amount of memory in bytes
  • -k switch (set by default) displays it in kilobytes
  • -m switch displays it in megabytes.
  • -t switch displays a line containing the totals.
  • -o switch disables the display of a "buffer adjusted" line. If the -o option is not specified, free subtracts buffer memory from the used memory and adds it to the free memory reported.
  • -s switch activates continuous polling delay seconds apart. You may actually specify any floating point number for delay, usleep(3) is used for microsecond resolution delay times.

GUI tool - gnome-system-monitor

The gnome-system-monitor provides an overall view of the resource usage on your system, including memory and CPU allocation. Start gnome-system-monitor from Menus or just type:
$ gnome-system-monitor &
overall view of the resource usage  on  your Linux  system,  including memory and CPU allocation.

 

Another Good system monitor - Conky

Conky is a system monitor for X originally based on the torsmo code but kickass :). Run apt-get command to install conky:
$ sudo apt-get install conky
Conky can display just about anything, either on your root desktop or in it’s own window. Conky has many built-in objects, as well as the ability to execute programs and scripts, then display the output from stdout.
To start conky copy default config file and type conky at shell prompt:
$ zcat /usr/share/doc/conky/examples/conkyrc.sample.gz > .conkyrc
$ conky &

OR
$ conky -a left_top &
A system monitor for X originally based on the torsmo code
Read man page of conky for more customization options.

phpSysInfo - PHP script that displays information such as RAM, CPU et all

You can obtained pretty much same information over Internet using webbased php tool called phpSysInfo.
PHP script that displays information such as RAM, CPU
(click to enlarge)
I'd love to hear if anyone has used additional cool GUI tool like conky for this kind of system analysis/monitoring.

0 komentar:

Post a Comment