Questions tagged [top]
top is a Unix/Linux/BSD program to show what processing are running. It can show the top users of CPU or memory.
303
questions
598
votes
4
answers
345k
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 ...
176
votes
7
answers
356k
views
What does Virtual memory size in top mean?
I am running top to monitor my server performance and 2 of my java processes show virtual memory of up to 800MB-1GB. Is that a bad thing?
What does virtual memory mean?
And oh btw, I have swap of ...
149
votes
6
answers
167k
views
Show full process name in top
I'm running a Rails stack on Ubuntu.
When I call 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.
...
77
votes
1
answer
54k
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?
60
votes
5
answers
43k
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 ...
49
votes
4
answers
88k
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 ...
36
votes
8
answers
149k
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 ...
36
votes
2
answers
23k
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 ...
34
votes
5
answers
32k
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 steal ...
30
votes
2
answers
76k
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. ...
28
votes
1
answer
48k
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 ...
21
votes
6
answers
63k
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 ?) ...
21
votes
2
answers
23k
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?
21
votes
6
answers
126k
views
Find out what high CPU usage apache process is actually doing?
Currently having a few issues with our server where, intermittently, we seem to get apache processes which just run and run, taking up 100% CPU.
When running top, we see the following:
PID USER ...
17
votes
4
answers
86k
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 ...
17
votes
2
answers
20k
views
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.
17
votes
4
answers
11k
views
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?
17
votes
5
answers
3k
views
10 GB of RAM unaccounted for by top
Here's my free and smem output:
danslimmon@bad-server:~$ free -m
total used free shared buffers cached
Mem: 30147 29928 218 6 ...
13
votes
4
answers
29k
views
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?
13
votes
1
answer
14k
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?
12
votes
7
answers
16k
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 ...
12
votes
1
answer
29k
views
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 ...
12
votes
1
answer
12k
views
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 ...
11
votes
5
answers
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?
...
10
votes
2
answers
14k
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 ...
10
votes
3
answers
12k
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 ...
9
votes
5
answers
11k
views
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?
9
votes
3
answers
21k
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 ...
9
votes
1
answer
793
views
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 ...
8
votes
1
answer
3k
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 ...
8
votes
4
answers
17k
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 ...
7
votes
1
answer
5k
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?
...
7
votes
3
answers
4k
views
top is only showing current user processes
Recently got a dedicated server running CentOS 6.7, we have ran updates and noticed that top is only showing processes for the current user.
[myuser@server2 ~]$ top -b -n1
top - 20:19:20 up 1 day, ...
7
votes
2
answers
4k
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 ...
7
votes
2
answers
12k
views
How do I change the output line length from the "top" linux command running in batch mode
The following command is useful to capture the current processes that are taking up the most CPU and store to a file:
top -c -b -n 1 > top.log
The -c flag is particularly useful because it gives ...
7
votes
1
answer
193
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 on-...
6
votes
3
answers
30k
views
TIME+ column in top command is inaccurate
I just ran the top command to observe the following process
chown -r me:me allMyMusic
And it's been running for about 5 minutes, however the TIME+ column in the top command has reported it as ...
6
votes
3
answers
9k
views
Memory Usage by Bytes Top 10
I need a way to see how many bytes to top ten processes are using not percentage.
I am using centos
6
votes
1
answer
2k
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 ...
6
votes
4
answers
30k
views
free shows more memory used than top process total
UPDATE:
This was being caused due to a known issue with nss-softkn. See this article:
https://www.splyt.com/blog/2014-05-16-optimizing-aws-nss-softoken
When I run free -m from my centos 6.5 box I am ...
6
votes
2
answers
3k
views
How does docker stats output relate to top output?
I've got a process running in a Docker container on Linux, with a 2GByte memory limit. (The container is started with docker run --memory=2g.)
Here is what top says about it after it's been running ...
5
votes
3
answers
6k
views
High CPU usage without useful information from top command
Over the past 2 days I started having problems with a server which has a few users on it. The server is an OpenVZ VPS. Normally when I experience high CPU usage, I always use top command to find out ...
5
votes
4
answers
1k
views
Memory Usage in LINUX [duplicate]
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
1
answer
11k
views
MongoDB virtual memory usage
I'm testing MongoDB for archives data. We have a collection with 160M rows.
MongoDB instance takes 76.2 Gb virtual memory on a 12 Gb physical memory box ;-)
The swap in null.
I read that virtual ...
5
votes
3
answers
7k
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, ...
5
votes
3
answers
11k
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 ...
5
votes
2
answers
8k
views
top command - cpu from processes do not add up
I understand the various types of cpu usage reported by the top command (6.5%us, 17.2%sy, 0.0%ni, etc...), but why does the total %CPU for each process not add up to any of the Cpu(s) values? For ...
5
votes
2
answers
7k
views
How do get apache display url request in Top and PS?
Is there a way to get apache to display the url that it is handling in top and ps? This would help us nail down performance issues much more faster.
Thanks.
5
votes
2
answers
3k
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 ...
5
votes
1
answer
7k
views
Sum of memory of few processes in top is greater than 100%
I'm trying to calculate the amount of memory used by AMP in an LAMP stack machine.
top -bn1 | grep -E '(mysql|httpd|php)' | awk '{mem += $(NF-2)} END {print mem}'
But the sum generated using the ...