top is a Unix/Linux/BSD program to show what processing are running. It can show the top users of CPU or memory.
Questions tagged [top]
302 questions
17
votes
2 answers
Which Linux package contains the 'top' command?
Many of the common utilities in Linux either come packaged in util-linux from Linux Foundation or coreutils from GNU. The man page for top doesn't specify anything.
I am using CentOS.

euphoria83
- 810
- 2
- 7
- 11
17
votes
4 answers
How to exclude some users from Linux Top screen?
In top screen, by default it shows all users' processes. How to exclude some users(for example, root and nobody) from the top real-time screen?

garconcn
- 2,388
- 8
- 35
- 46
17
votes
4 answers
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 8GB RAM. As the time goes by, amount of free…

jayarjo
- 337
- 1
- 3
- 12
13
votes
4 answers
Is it possible to filter top to show specific processes?
I'm run top and I want to always see java/tomcat/redis/mysql/mongo, is that possible?

Blankman
- 2,891
- 10
- 39
- 68
12
votes
1 answer
what percentage of iowait is considered to be high?
when iowait is considered to be high ?
iostat -x
avg-cpu: %user %nice %system %iowait %steal %idle
2,89 0,01 5,45 49,83 0,00 41,83
Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s avgrq-sz avgqu-sz …

Gabriel Sousa
- 317
- 2
- 4
- 10
12
votes
1 answer
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?
user99751
12
votes
1 answer
Problems with cron script and TERM definition using top command
I have a problem executing a cron process to check current CPU use in my server.
My script start with:
top -c -n 1 -u www-data > /tmp/kill-cpu
I can execute without problem in console, but in cron I get
top: failed tty get
If I use the -b option…

Lito
- 265
- 2
- 3
- 11
12
votes
7 answers
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 look for what is causing this?

Ben
- 555
- 2
- 5
- 7
11
votes
5 answers
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?
top screenshot…

Teflon Ted
- 510
- 2
- 7
- 18
10
votes
2 answers
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 process. What is missing from top? Network overhead?

RickyA
- 300
- 1
- 4
- 12
10
votes
3 answers
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 cannot find it in the manual.
I need to read it…

Nathan
- 258
- 2
- 4
- 10
9
votes
3 answers
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 not specific to this distribution.

timeon
- 193
- 1
- 1
- 5
9
votes
1 answer
Finding which process is reading from disk constantly on FreeBSD
EDIT: This ended up being a scrub process. Run zpool status -v and read the scan status for your pool clearly.
I have a TrueNAS server running FreeBSD and this morning at 12 AM the disks started to be read from constantly. I thought this was some…

Bilbo Baggins
- 193
- 5
9
votes
5 answers
How do I list processes in htop by just their name, without the full path?
Is there a way to have the list of processes in htop only display as the name of the command, rather than the full pathname w/ flags?

Yewge
- 193
- 1
- 1
- 6
8
votes
1 answer
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 little SHRd memory, so it appears as if the processes…

Dustin Boswell
- 213
- 2
- 4