Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

We had a huge spike in traffic with lots of these errors:

Feb 17 10:44:13 111488 kernel: [8275767.506198] Out of memory: Kill process 20577 (apache2) score 52 or sacrifice child
Feb 17 11:02:06 111488 kernel: [8276839.559141] Out of memory: Kill process 20719 (mysqld) score 75 or sacrifice child

As you can see, it's not just one process but both apache2 and mysqld, so I've increased the RAM on the server. How can I check that this is available to these processes?

share|improve this question

marked as duplicate by Bruno Pereira Feb 17 '14 at 13:13

This question was marked as an exact duplicate of an existing question.

up vote 0 down vote accepted

You are looking for the [top] command

top - 15:20:30 up  6:57,  5 users,  load average: 0.64, 0.44, 0.33
Tasks: 265 total,   1 running, 263 sleeping,   0 stopped,   1 zombie
%Cpu(s):  7.8 us,  2.4 sy,  0.0 ni, 88.9 id,  0.9 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem:   8167848 total,  6642360 used,  1525488 free,  1026876 buffers
KiB Swap:  1998844 total,        0 used,  1998844 free,  2138148 cached

  PID USER      PR  NI  VIRT  RES  SHR S  %CPU %MEM    TIME+  COMMAND                                                                                 
 2986 enlighte  20   0  584m  42m  26m S  14.3  0.5   0:44.27 yakuake                                                                                 
 1305 root      20   0  448m  68m  39m S   5.0  0.9   3:33.98 Xorg                                                                                    
 7701 enlighte  20   0  424m  17m  10m S   4.0  0.2   0:00.12 kio_thumbnail

or [htop] command,

htop result

Source: BinaryTides

share|improve this answer
Brilliant. That's perfect. – babbaggeii Feb 17 '14 at 13:10

To get an overview of the memory use of your system, use the command free. For memory calculations per process, cf. How can I display the memory usage of each process.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.