top is a Unix/Linux/BSD program to show what processing are running. It can show the top users of CPU or memory.

learn more… | top users | synonyms

75
votes
2answers
31k views

What exactly do the colors in htop status bars mean?

By default, htop shows colored status bars for processors, memory, and swap. From left to right, the bars are colored green, blue, yellow, and red depending on some thresholds. What does it mean when ...
34
votes
5answers
11k views

How to understand the memory usage and load average in linux server

I am using a linux server which has 128GB of memory and 24 cores. I use top to see how much it is used. Its output is pasted at the end of the post. Here are two questions: (1) I see that each of the ...
19
votes
3answers
14k views

Linux - How can I see what's waiting for disk IO

I have a server that has a really high load. Nothing is jumping out at me in terms of CPU usage, and it's not swapping. I think it's cause some processes are waiting for disk IO, and I want to see ...
16
votes
1answer
7k views

Why does htop have three load averages?

On htop, it shows three load averages, one bold, one normal, one red. What do they signify?
14
votes
1answer
10k views

How to interpret output from Linux 'top' command?

Following a discussion made HERE about how PHP-FPM consuming memory, I just found a problem in reading the memory in top command. Here is a screenshot of my top just after restarting PHP-FPM. ...
13
votes
3answers
6k views

Show full process name in top

I'm running a rails stack on ubuntu. When I ps -AF, I get a descriptive process name set by the apache module like 00:00:43 Rails: /var/www... which is really helpful in diagnosing load issues. ...
12
votes
6answers
24k views

wa (Waiting for I/O) from top command is big

I have a forum with a lot of visitors, Some days the load increase to reach 40 without increase of the number vistors. As you can see from the below output, the waiting time is high (57%). how do I ...
12
votes
1answer
7k views

Memory Usage Numbers In top/htop

Can someone please explain this top output. Each PHP process is using 30% of the total memory or of the used memory? Furthermore how can it be that the combined used memory across all the PHP ...
11
votes
3answers
6k views

What does %st mean in top?

Here is an example from my top: Cpu(s): 6.0%us, 3.0%sy, 0.0%ni, 78.7%id, 0.0%wa, 0.0%hi, 0.3%si, 12.0%st I am trying to figure out the significance of the %st field. I read that it means ...
10
votes
2answers
3k views

How is memory usage reported in Linux?

Using ps, I can see the size, the vsize (same as top's VIRT?), and the rss (same as top's RES?). (One more I see in top is SHR.) Could someone summarize for me what these different fields mean?
10
votes
5answers
5k views

Confused by CPU values in Unix 'top' command

In the screenshot below, the overall CPU is being reported as 3% but the mysqld process is reported as using 57%. Is this 57% of the overall 3% and thus mysqld is only using about 1.5% of the CPU? ...
8
votes
3answers
12k views

How to have linux top command show memory summary in megabytes not kilobytes

Redhat EL5 I had my top configured the just the way I like showing the memory summary and swap summary in MB. I had to close my shell and then when I re-opened it, it is back showing in (default ?) ...
8
votes
1answer
164 views

Is there a tool that can top-ify an input stream?

I come across quite a few use cases where it would be very useful to take input from a (usually newline-delimited) stream and summarise it in a top-like fashion (see top, iotop, etc). A kind of ...
7
votes
3answers
15k views

Something eats all memory (I suspect memory leak on some app). How to detect what?

I have server which runs liquidsoap+icecast bundle and simple website (httpd+mysqld). Nothing special. Visitors around 2000+ per day, with around 50 being online simultaneously on average. Server has ...
6
votes
1answer
1k views

Why does top report a different cpu usage than CloudWatch?

top shows an average CPU usage during peak times of about 20% while CloudWatch monitoring shows an average CPU usage of 40%. What causes this discrepancy?
5
votes
2answers
542 views

Load Average above 20 for single core vps on debian

OS: Debian 6.0 RAM:3072 M, CPU:single core. top: top - 08:56:43 up 21 days, 12:37, 1 user, load average: 28.38, 22.48, 15.95 Tasks: 8 total, 1 running, 7 sleeping, 0 stopped, 0 zombie ...
5
votes
4answers
534 views

Memory Usage in LINUX

I have a debian system. It has 8GB memory. When I do top it shows 7.9 GB memory used and rest free. I add up the memory usage of all the programs running from top and they hardly sum up to around 50 ...
5
votes
1answer
300 views

why top gives cpu percents more than 100%

see below statistics by "top -u steve", something is wrong with top? PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 3490 steve 20 0 10444 312 248 R 114 0.0 23:33.22 ...
5
votes
1answer
280 views

Identify which process is responsible for heavy disk i/o under FreeBSD

I wonder how I can monitor which process takes out all my IO bandwith. The only command i know is gstat but it shows cumulative info. Is there any tools i can use to inspect the running processes for ...
5
votes
1answer
310 views

Mysterious swap usage on EC2

We're in the middle of a project to move our infrastructure from a co-lo situation into Amazon EC2 and we've noticed some weird memory characteristics of the processes in our setup. Without going into ...
4
votes
7answers
4k views

High CPU load but top processes in top all around 0%

We have a server with unusual high load and cpu util, but we can't figure out why. When we run top all the procs seem to be very low cpu. http://cl.ly/2d1g0K3q261r0R0K3e35 Is there a better way to ...
4
votes
5answers
420 views

Give me my KILL-power when something goes wrong

We've had it a few times now. Suddenly our production server won't respond because a process is in an infinite loop, or the MySQL server stops serving new requests because one query is blocking ...
4
votes
2answers
380 views

Linux top command. Memory usage

I am testing my web server with Jmeter. I launch 40 users test, then dump top command. What i see, is 40 (+1 host) apache processes. Each process uses appr. 7mb of RES memory. But 7*40 is 280 mb of ...
4
votes
1answer
243 views

Why do I see many mongod processes running?

I am running a single MongoDB database. No sharding. When I run htop, I see a lot of instances of mongod. Is that normal? Does every connection create a separate mongod process? Should I be concerned? ...
4
votes
2answers
1k views

How to get top command output to show rake arguments?

In the past, all of our servers have automatically shown command arguments passed to rake when we view them in top. For example: But on this particular server, we get this instead (picture is top ...
4
votes
2answers
2k views

how do you interpret output of top?

Some things in top's output are pretty straightforward, like memory and swap usage. But load average numbers are a bit of a mystery: what do these three numbers mean? Also, what exactly is a zombie ...
4
votes
4answers
3k views

How do I increase size of Terminal on Linux

I have a 48core linux box. I would like to monitor per core cpu usage. However when I use top and press 1 I get an error message "Sorry, terminal is not big enough" Is there anyway I can increase ...
4
votes
2answers
228 views

How to read `top`. Process list says processes have swap but overview says no swap is being used

I am using top to monitor my server. The swap row reads Swap: 1044220k total, 0k used, 1044220k free, 148544k cached I have hit O p to sort by swap. PID USER PR NI VIRT RES ...
3
votes
4answers
3k views

Monitoring linux processes

Is there an option for linux top command where i can filter processes by name? For example, I only want to monitor python processes (there are several of them), and I'd like to do something like top ...
3
votes
3answers
4k views

Why does 'top' indicate low memory usage, whilst 'free' indicates high memory usage?

Why does 'top' indicate low memory usage, whilst 'free' indicates high memory usage? Mem: 262144k total, 225708k used, 36436k free, 47948k buffers Swap: 262136k total, 40k used, ...
3
votes
2answers
1k views

Why does ec2 monitoring show 100% cpu and top only 20%?

I am running an python script on an ec2 instance that inserts rows in an database on another instance. In ec2's monitoring I saw a 100% cpu utilization, whereas top only shows 20% for the python ...
3
votes
5answers
992 views

Linux server performance profiling - how to see what caused high load

If a server is experiencing high load, I use top and similar tools to troubleshoot why. However, this is only effective if I can analyze while the server is experiencing the problem. What are some ...
3
votes
2answers
589 views

Where does top get its CPU usage data from?

I want to write some scripts that will measure the CPU use, but top's output, while pleasant for the user, isn't really feasible for processing in a script.
3
votes
2answers
7k views

is CPU actually occupied during iowait (%wa in top) on Linux / EC2?

On an 8-way Amazon EC2 instance (running Linux 2.6.21) with 8 EBS volumes and a lot of disk traffic, we see high %wa in top (30-40%), and high load average (8-9). My understanding is that processes ...
3
votes
1answer
312 views

Measuring load - %CPU in top is different than %us

When I run TOP on a remote server, I see a very small system utilization (3.8%us). However, for the actual process I am seeing 29.6% of the CPU. Since this server has 8 CPU cores, is the %CPU the ...
3
votes
2answers
2k views

top in batch mode, need CPU% for every core

I know that after running top, I can press '1' and get a list of the CPUs with their utilization percentages. I suspect I can do this in batch mode too with the -b option, but I don't know how, and I ...
3
votes
2answers
2k views

How can I tell which page is creating a high-CPU-load httpd process?

I have a LAMP server (CentOS-based MediaTemple (DV) Extreme with 2GB RAM) running a customized Wordpress+bbPress combination . At about 30k pageviews per day the server is starting to groan. It ...
3
votes
4answers
3k views

Linux memory usage

We've been having some Linux memory usage problems on some of our servers. free, top, ps, and vmstat are all showing 261M free out of 1G (~25%). However, adding up the amount of memory shown per ...
3
votes
1answer
2k views

tail: inotify cannot be used, reverting to polling: Too many open files

tail: inotify cannot be used, reverting to polling: Too many open files I'm running apache and tomcat servers on Ubuntu (AWS ec2). Whenever I try to tail the catalina.out of tomcat I get too many ...
3
votes
1answer
937 views

top process state column under FreeBSD

When running top interactively, I can see various words in the state column : nanslp, biord, select, uwait, lockf, pause, kqread, piperd, sbwait ... Some like nanslp or kqread are self ...
3
votes
1answer
353 views

How do you measure the memory footprint of a set of forked processes?

Say I've got a process using 200MB of memory, and it fork()s: python -c "import os; data='x'*200000000; os.fork(); raw_input()" Programs like 'top' will show each process using 200MB, with very ...
3
votes
2answers
3k views

How to sort top result on virtual memory on Redhat Linux?

There is an interactive key "M" to sort by memory, which seems to be sorting on resident memory. Is there a way to sort on virtual memory? I happen to be working on Redhat Linux, but the question is ...
3
votes
2answers
249 views

Load average at 1, even though I've stopped all services!

I have a virtual server running Debian 5 where any action is very slow (like password verification when logging in via SSH or doing su). I checked the load average, which is hovering around 1-2. Then ...
3
votes
1answer
1k views

How can I find the source of my high load issues on Ubuntu server?

We have an Ubuntu 10.4 VPS serving a Rails site which often shows pretty high load, but doesn't have high CPU or memory numbers. Reading a lot of other questions here on Server Fault suggests to me ...
3
votes
1answer
1k views

TOP cpu %ulitization exceeds number of procs X 100%

I have a VM with 2 virtual CPUs. When I run two multi-threaded java proceses the total CPU utilization in top exceeds 200%. In fact its closer to 800%. I thought that %CPU was the percentage ...
2
votes
4answers
390 views

my webserver with 16GB ram shows all RAM as used, but is it really, see the 'top' [duplicate]

I have some questions about my web server. Its a LAMP web server running centos 5.5 and php5, mysql5. The server gets hundreds (maybe thousand) of concurrent users during peak hours. I'm trying to ...
2
votes
5answers
752 views

%CPU for a process

Looking at the output of top on our server, one of my colleagues told me that the fact that some processes got less than 100 "%CPU" was because I was running too many processes. He added that based on ...
2
votes
3answers
197 views

How to enable non sudo user access to top with all processes?

I use Ubuntu Server 10.04. I have users that normally don't have access to sudo. When this user is using top command he sees only processes for the current user. I added a line to /etc/sudoers: user ...
2
votes
2answers
270 views

Linux process swap usage is greater than the overall system swap usage

I have a strange problem that when I run top command it shows that some processes are using around 1.5GB of swap space but then the overall usage of the system swap is way to less to something around ...
2
votes
2answers
1k views

Ubuntu server using too much memory

my server is at a very high memory usage constantly - to the point that it won't let me log in via ssh some times. I have to reboot the server before I can log in and when it's restarted the memory ...