Top is a UNIX program that shows system usage in real time.

learn more… | top users | synonyms

39
votes
3answers
37k views

Why is the CPU usage reported by top in Linux over 100%?

I've seen the CPU usage go over 100%. How is this possible? Is it because I have four CPU cores, so 100% isn't really the max? Also, when a program does this, what else can I do in top besides using ...
32
votes
2answers
14k views

Linux: Is there something similar to “top” for I/O?

My disk often is utilized, but top (and htop, a custom replacement) show nothing suspicious. Is there a way to sort processes by I/O (more specific: disk) utilization? EDIT Found out using iotop ...
25
votes
1answer
47k views

Why is the “top” command showing a CPU usage of 799%?

I am running a process in a 4 core Ubuntu server. However, top command shows that the CPU usage is 799% all the time. How can this be possible? I know for multi core CPUs, more than 100% CPU usage ...
24
votes
7answers
32k views

Linux “Top” command for Windows Powershell?

I am looking for a PowerShell cmdlet that can provide similar functionality to the Linux Top app. Something that refreshes at some given interval and displays the process list with CPU % util. I have ...
22
votes
2answers
31k views

Understanding top command in unix

When I run top -c command on my UNIX box I get the output below: top - 03:09:34 up 5 days, 6:14, 1 user, load average: 0.00, 0.00, 0.00 Tasks: 175 total, 1 running, 174 sleeping, 0 stopped, ...
16
votes
2answers
6k views

Why does the memory usage in “top” not add up?

I have noticed that sometimes when I run top, the memory usage of each process in the process table does not seem to add up to the total. For example, in the dump below, top says that I am using 16 ...
13
votes
2answers
47k views

TOP command memory usage

Under SuSE, (Mem: 31908592k total, 31421504k used,) how do i know which process or program using my memory?
13
votes
1answer
6k views

Full list of top-like tool family for perfomance monitoring in linux: iftop iotop htop atop more? [closed]

Top-like utilities are extremely handful in my work and I want to make sure I am not missing any of them. Please extend the following list of performance monitoring (top-like) family of linux tools: ...
12
votes
1answer
9k views

Is there `top` for disk usage [duplicate]

How to track disk usage (write/read and other cool stuff) in realtime with fashion of top in the only right system in shell? It would be cool if it could monitor specific directory.
11
votes
3answers
9k views

top command in cygwin?

I am starting to use Cygwin(64) on my Windows 8 laptop, however, the top command is not recognized. I have read online that I need to get the procps package, but it is not available on the 'Cygwin ...
11
votes
3answers
13k views

Filtering top command output

I'm running a Mac and want to filter the output of the top command for a particular process such that only the PID, COMMAND and %CPU columns are displayed. After getting the PID of the process, I run:...
9
votes
4answers
7k views

Zombie process using 100% CPU

A zombie process, which should not be using any resources (RAM and CPU), is hogging up an entire core on my 8-core 64-bit Ubuntu 11.10 Desktop installation. This is the output of ps -el|grep Z: F S ...
9
votes
1answer
16k views

top says IOWAIT is high, how to I find the culprit processes

I know I should not do it but I run some Ubuntu system from an USB flash drive, in persistent mode, and it is painfully slow. "top" tells me it is not because of CPU, it is because of IO, ie high %wa....
7
votes
2answers
15k views

“Cannot allocate memory” while no process seems to be using up memory

I am not competent on server issues, any help is much appreciated. When try to start a python/django shell on a linux box, I am getting OSError: [Errno 12] Cannot allocate memory. free -m seems to ...
7
votes
5answers
7k views

individual cpu % in 'top' output

Usually to view individual cpu % we press '1' in the interactive mode of top. However I am not able to figure out the logic to get the same output in batch mode i.e, top -n1b I am redirecting this ...
6
votes
2answers
540 views

What is the colorized version of the Linux “top” program?

I didn't know "top" had a nicer colorized version like this. What is the command? Does anyone recognize this?
6
votes
3answers
5k views

Is there a way to show windows processes in Cygwin constantly

I would like to monitor processes from a cygwin shell, using top or a variant. The reason for this is its realtime reporting and constant updates. However under cygwin, top will not report on windows ...
6
votes
1answer
2k views

What is a “zombie” task in top?

As the question implies, what is a zombie task/process in top?
6
votes
2answers
3k views

Where does top command get all the data for CPU Utilization?

When I run the top command, the third line is; Cpu(s): 0.3%us, 0.3%sy, 0.0%ni, 99.2%id, 0.1%wa, 0.0%hi, 0.0%si, 0.1%st From where does top command get this data? Does it get from /proc?, if ...
6
votes
1answer
629 views

How to identify what is causing sys% in top?

top on one of hex cores with hyper threading shows the following Cpu0 : 2.3%us, 58.8%sy, 0.0%ni, 38.2%id, 0.7%wa, 0.0%hi, 0.0%si, 0.0%st Cpu1 : 4.7%us, 62.1%sy, 0.0%ni, 31.2%id, 0.7%wa, 0....
5
votes
3answers
2k views

Where does the command “top” get its information from in linux?

Which files does the linux command "top" read from in order to build its table of data? Specifically, I'd like to be able to find the data for the "command" column based off of a PID.
5
votes
2answers
7k views

Is it possible to 'hide' a process from the listing of `ps` or `top` on Linux

First, I presume that if this is possible it would need to be done as root (or as a user who shares root's UID of 0). How can a process be launched so that it does not show up in a ps aux or ps ef or ...
5
votes
4answers
11k views

Writing a CPU/RAM usage log over a period of time to file on CentOS

I'm looking for an application or line of code that would let me observe a process, save the info in a number of variables, then put the gathered info on a file. I've been trying with variations of ...
5
votes
2answers
3k views

Specify top's screen width in batch mode

I am logging the output of: top -b -n1 -c so I can keep track of which processes are using how much memory and CPU each minute. When top shows the full command line (-c), the command line text gets ...
5
votes
2answers
2k views

If “top” indicates CPU is spending 10% on %wa (iowait), does that mean the CPU is idle?

I am referring to the Linux top command. If it indicates 10.4% was spent on wa, does that mean 10.4% CPU was available for other processes? top - 09:40:45 up 178 days, 34 min, 1 user, load average:...
5
votes
1answer
2k views

How does top calculate the memory figures on Linux?

I'm a bit confused on how the memory figures add up in top. If I've understood correctly, the amount of "really" used memory is total - free - buffers - cached. In the example below that would be ...
5
votes
2answers
3k views

cpu load measure with hyperthreading on linux

How can I get the true usage of a multicore hyperthreading enabled cpu? For example lets consider a 2 core CPU, expressing 4 virtual cores. A single threaded workload would now show up as 100% in ...
5
votes
1answer
360 views

Sorted tree view in htop or alternative?

I am running a Debian flavor of Linux, and I use htop to keep track of memory usage, since it is more detailed than top. I can't seem to get it to sort by memory and display process trees at the same ...
4
votes
2answers
5k views

Difference between nice value and priority in the top output

top, by default, lists both columns. I am curious as to what is the difference. I checked out the man pages and cannot figure it out: Priority: h: PR -- Priority The priority of the task. ...
4
votes
1answer
3k views

How to kill an invisible process?

I have a program that crashed, its GUI is frozen, and I would like to kill it. However there is no trace of it among the current processes. I tried both top and ps -A, but I got nothing. The ...
4
votes
1answer
4k views

Cpu usage in the output of top

I am looking at the output of top. top - 16:11:19 up 31 days, 2:37, 10 users, load average: 17.01, 16.99, 17.00 Tasks: 470 total, 18 running, 452 sleeping, 0 stopped, 0 zombie ...
3
votes
2answers
1k views

Where has all my memory gone?

I have a linux server that keeps using up all its memory and I can't see what is using it. Running top gives the following response: Tasks: 103 total, 1 running, 102 sleeping, 0 stopped, 0 ...
3
votes
1answer
986 views

Print top output only once on Mac OS X

On Linux, the top command has a "batch mode": top -b -n 1 to print the output a set number of times. On Mac, it seems that the top command does not have batch mode (certainly the -b option does not ...
3
votes
1answer
155 views

What top-like utility is this?

I've seen this utility in a lot of tmux screenshots. What is it? (source)
3
votes
2answers
1k views

Where is my CPU usage going?

My Ubuntu 10.04 Lucid virtual machine is saying it's at 100% CPU usage... but all I'm running is Thunderbird. According to top, CPU usage should be ~25.9%... How do I interpret this conflicting output ...
3
votes
2answers
807 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 ...
3
votes
1answer
1k views

How to redirect values from top command to a file in Mac OSX

All, I want to extract values from top for plotting purposes. I'm currently using the following command top -l 0 -s 1 -pid 12345 -stats rsize | awk 'NR%13==0' When I run this , I get the ...
3
votes
1answer
1k views

Why is the kernel and the watchdogs consuming all the CPU?

I run a bunch of heavy user space processes on a powerful Xeon machine (32 virtual processors according to /proc/cpuinfo). The CPU load is normally around 30 and the machine feel responsive, but later ...
3
votes
1answer
348 views

Filter interactive output (top)

How can I filter the output from a "self-updating" program such as top while keeping its functionality intact? For example, I want to highlight my user name in top's output. My idea is to use ...
2
votes
4answers
4k views

memory usage linux in top is not correct

I am a bit worried about my linux vserver box. No more memory is left. To investigate this issue, i was looking at "top". But it deeply confuses me. It seems that no more memory is left, altough ...
2
votes
1answer
7k views

average load and total %CPU in top

I thought the average load by uptime and the summation of %CPU of all running processes in top (#9 column) should agree. But it seems not true. Here is my little experiments: On one server: $ top -b ...
2
votes
2answers
252 views

Is there a more detailed version of top?

I'm testing some software on a particular four core machine. Is there an option for top or a similar utility that can tell how much each core is being used for a particular job?
2
votes
3answers
1k views

Kill ssh session and/or stuck processes

I'm developing with vi over ssh. My problem is that sometimes I get my ssh connection killed because of my poor wifi connection and previous processes (like "top", "rails c", etc...) are not being ...
2
votes
1answer
1k views

Linux memory usage doesn't add up

I try to monitor the memory usage in my ubuntu server. When I run 'top' command, it shows 70% of the memory is used. (shown in the 'Mem:' line). But I want to find the processes that take my memory ...
2
votes
2answers
2k views

Why won't top command show the right result?

You want to find the line 3427 1 root S 36964 124% 2% tmux -L l in the following screenshots of top command. Why can tmux use more than 100 percent of memory? That is confusing... Is ...
2
votes
2answers
53 views

Redirecting top when multiple CPU's shown

If you run top, and then press 1, it shows the breakdown of usage on each CPU. How can I redirect this to a file? I know I can do top -n 1 > process.txt but how can I get the 1 option in the ...
2
votes
1answer
217 views

'top' output baffles me

top - 18:22:21 up 98 days, 23:26, 4 users, load average: 2.73, 2.85, 2.60 Tasks: 210 total, 1 running, 209 sleeping, 0 stopped, 0 zombie Cpu(s): 3.6%us, 2.5%sy, 0.0%ni, 87.7%id, 5.1%wa, ...
2
votes
1answer
399 views

Is it possible to change default behavior for “top”?

For example, when I run top I usually press "C" so I can see the explicit command being run not the executable name if you will. Is there a way I can modify top such that when I do: % top The ...
2
votes
1answer
1k views

ps and top give different CPU usage

I've seen a few posts similar to this, most notably here, but wasn't quite satisfied with the answers. I'm comparing top and ps results on a specific process and see huge discrepancies in CPU usage. ...
2
votes
1answer
382 views

Can top show more than 100% in %MEM?

Can the %MEM value for a process show more than 100% in top output?Is this ever possible?