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
4
votes
1 answer
How to get /proc/[pid]/cmdline to contain command arguments?
I am running into an issue where some of my Ubuntu/Debian servers do not show the arguments passed to rake in either top or ps. I have tracked this problem down to a variation in output given by /proc/[pid]/cmdline. This is the file that seems to…

wbharding
- 431
- 1
- 4
- 8
4
votes
2 answers
0% CPU in top for all processes, but load average > 1
On two different servers (with Ubuntu 12.04LTS AMD64) I have seen the following behaviour:
op - 10:50:05 up 305 days, 21:17, 1 user, load average: 1.94, 2.52, 2.97
Tasks: 141 total, 2 running, 139 sleeping, 0 stopped, 0 zombie
Cpu(s):…

fadedbee
- 2,068
- 5
- 24
- 36
4
votes
1 answer
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 explanatory, others are not.
Tried Mr man pages :
STATE is…
user130370
4
votes
2 answers
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 SHR S %CPU %MEM TIME+ SWAP COMMAND
703 mysql…

dm03514
- 201
- 1
- 3
- 12
4
votes
2 answers
Diagnosing high CPU waiting
I have a monitoring server that is running icinga/collectd/graphite with about 50 hosts. I have noticed high load/slugging performance on the box. If you take a look at top, you'll see:
Cpu(s): 0.6%us, 0.2%sy, 0.0%ni, 7.6%id, 23.4%wa, 0.0%hi,…

Will
- 826
- 2
- 9
- 19
4
votes
2 answers
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 memory. But top shows that there are 508mb total…

zim32
- 141
- 1
- 4
4
votes
2 answers
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 I stopped all services (apache, mysql, postfix,…

Aron
- 189
- 7
4
votes
1 answer
Which PHP script is overloading my VPS?
Is there a way to get the PHP script filename that is currently hammering my VPS?
For example, when I view "top", I see:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
7622 itil 17 0 61388 11m 6004 R 45.8 2.3 0:00.13…

psx
- 235
- 3
- 14
4
votes
4 answers
Linux high memory usage (top total mismatch)
I havea poor mans vps - 256MB dedicated RAM. I have installed LAMP. No website is currently UP on the server yet.
The memory usage is still 225MB (only 31 MB free).
I have measured using top and another method. Top says around 225mb used, but if I…
JP19
4
votes
5 answers
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 good tools for finding root cause of high server…

mark
- 41
- 2
4
votes
5 answers
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 everything...
We SSH to the server and use ps aux or…

Konerak
- 435
- 2
- 18
3
votes
1 answer
Colulmn width of "top" entries
The username column in the output of top command shows a + for the names that are longer than the column width. How can I increase that?
I don't see any option for that.

mahmood
- 1,022
- 7
- 20
- 33
3
votes
1 answer
Why are cpu usage percentage different between top and iostat?
On a heavily loaded database server, I am getting vastly different output from top and iostat for cpu usage. Why might the value be different?
top:
%Cpu(s): 84.7 us, 11.8 sy, 0.3 ni, 2.4 id, 0.6 wa, 0.0 hi, 0.2 si, 0.1 st
iostat
avg-cpu: …

AgDude
- 181
- 7
3
votes
1 answer
What could be causing load spikes on this EC2 instance?
I have an Amazon EC2 instance (c1.medium, ami-ed46a784) that experiences short spikes in load average every 32 hours or so. The average load is normally around 0.15 but rises to 3+ for about 15 minutes during these spikes. During this time there is…

Garret Heaton
- 4,325
- 3
- 18
- 10
3
votes
4 answers
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 process in top shows that we should be using very…

JamesArmes
- 205
- 3
- 9