A command-line system monitor tool that produces a frequently-updated list of processes.

learn more… | top users | synonyms

33
votes
1answer
38k views

In Linux “top” command what are us, sy, ni, id, wa, hi, si and st (for CPU usage)?

When I issue $ top in linux, I get a result similar to this (see here). One of the lines has CPU usage information represented like this: Cpu(s): 87.3%us, 1.2%sy, 0.0%ni, 27.6%id, 0.0%wa, ...
23
votes
5answers
34k views

How to find which processes are taking all the memory?

I'm looking for somthing like top is to CPU usage. Is there a command line argument for top that does this? Currently, my memory is so full that even 'man top' fails with out of memory :)
22
votes
4answers
26k views

How to monitor CPU/memory usage of a single process?

I would like to monitor one process's memory / cpu usage in real time. Similar to top but targeted at only one process, preferably with a history graph of some sort.
16
votes
2answers
4k views

Why does `htop` show more process than `ps`

In ps xf 26395 pts/78 Ss 0:00 \_ bash 27016 pts/78 Sl+ 0:04 | \_ unicorn_rails master -c config/unicorn.rb 27042 pts/78 Sl+ 0:00 | ...
13
votes
1answer
2k views

Meaning of colours in htop

Given the option: [ ] Detailed CPU time (System/IO-Wait/Hard-IRQ/Soft-IRQ/Steal/Guest) In htop (Version 1.0.1) what are the meanings of the colours? In the following image, I'm seeing rather a lot ...
9
votes
6answers
7k views

How to make a process invisible to other users?

How could you launch a process and make it invisible to the top command? The process is started by a normal user (not root), and should not be visible to other normal users.
9
votes
3answers
3k views

How can I receive top-like CPU statistics from the shell?

I'm trying to get an accurate read of my used CPU (in percent) from top. This is the command I'm running for testing: top -n1 | awk '/Cpu\(s\):/ {print $2}' This returns: 10.7%us, Which is the ...
9
votes
2answers
1k views

Tools for Monitoring Steal Time (st)

We're running on a virtual "dedicated" server, which should, in theory, mean that we're the only guys on the server. In practice.... I'm thinking we might not be. Notice that although it looks ...
9
votes
1answer
4k views

Why the value of VSIZE in top is different from the value of VSZ (Virtual set size) in ps?

I know VSZ in ps is for the total address space allocated for the app and is sometimes aliased as vsize (mentioned in man page of ps on linux), but what's the definition of VSIZE in top? This top ...
8
votes
2answers
4k views

How to know reason of a process going to sleep state and wake it up?

When I do 'top' , I see my perl script process in 'S' state. Is there a way to know, what is making this perl process go in sleep state and ways to wake it up? Any way to debug to give more insights ...
8
votes
2answers
861 views

How to find out how much memory a program taking

I use htop to watch my processes, but most of services ran are multi threaded, so they are shown on several lines with a % of memory use which in some cases is the same for all, sometimes it varies ...
7
votes
2answers
5k views

Top and ps not showing the same cpu result

This is linked to this question. When I run top I get the following result: pid 3038 is using 18% cpu, however when running the result is 5.5%. And this number does not appear to be changing ...
7
votes
3answers
3k views

Understanding top and load average

I'm observing a high load average on a certain machine (about 9) in all three load fields. I understand load as the number of processes in state "run" / currently desiring CPU time. Am I correct at ...
6
votes
3answers
2k views

How to display meminfo in megabytes in top?

Sometimes it is not comfortable to see meminfo in kilobytes while you have several gigs of RAM. In Linux it looks like that: And here is how it looks in Mac OS X: Is there a way to display ...
6
votes
3answers
4k views

How to select specific processes with 'top'?

In case of one program having multiple instances, running pidof program gives: `1 2 3` top -p accepts comma-delimited arguments: 1, 2, 3. This means that top -p `pidof program` won't work: ...
6
votes
1answer
1k views

top output: cpu usage > 100%

Here is the top output which I gathered: I noticed that top is showing vlc's cpu usage is > 100%. Can anybody please justify me why it is showing like this, whether this is a bug in top ...
6
votes
2answers
138 views

Why are there so few “running” processes?

On all of BSD/Linux/MacOS and Solaris, I made an observation - no matter how busy the system is, top always reports very few (usually 1-2) running processes. According to my limited understanding, a ...
6
votes
3answers
108 views

Full username in top

On our systems user names can be up to 20 characters long. But the top commands only displays the first 8 characters. How can I configure top to display the whole user name? At the moment we use: ...
5
votes
3answers
183 views

Determining the particular processor on which a process is running

I have access to an 8-core node of a Linux cluster. When logged in to the node, I can see a list of processors using this command: more /proc/cpuinfo In my 8-core node, the processors are numbered ...
5
votes
2answers
3k views

How to properly run “top” command through SSH?

I have to run top command on one computer being on another. My targeted PC has IP 192.168.0.81 I was trying to do it: ssh 192.168.0.81 top But I got this result: top: tcgetattr() failed: Invalid ...
5
votes
5answers
3k views

Top says 100% CPU used, but 50% of cores idle?

top - 08:43:16 up 96 days, 22:16, 1 user, load average: 4.03, 3.92, 3.98 Tasks: 199 total, 1 running, 198 sleeping, 0 stopped, 0 zombie Cpu0 : 0.0%us, 0.5%sy, 50.0%ni, 49.5%id, 0.0%wa, ...
5
votes
4answers
3k views

How do I get “top” command to wrap its output?

The "command" column gets truncated by the width of the screen and I am unable to see the last part of it. I have tried to reduce the font size so I can see a longer part of the command line but it ...
5
votes
2answers
1k views

Number of running processes show in top

The usual maximum number that I have seen in the "running" field displayed in top(1) is the number of logical CPUs installed in the system. However, I have observed that under Ubuntu 10.04 (not ...
5
votes
1answer
947 views

top / htop; group process by command

I'd like to know how much resource a specific command is using. top and htop displays information on per process basis but I'd like the information to be shown on per command basis. E.g. I'd like to ...
5
votes
1answer
134 views

How to monitor top applications using CPU (and IO if possible) in a graph?

I need to find what and when these applications used so much CPU (and IO if possible too). This should be in a graphic timeline like we see in GNOME System Monitor CPU History. I also want to compare ...
4
votes
2answers
429 views

How can we use the command 'top‘ to monitor the total CPU usage and each processor usage simultaneously?

You know that we can use the command top to monitor the real-time CPU usage and toggle the result display to the per-processor view by pressing key 1. The disadvantage of it is you can only monitor ...
4
votes
1answer
169 views

How can I turn off the realtime display of unix command “top”?

I want top to just give me the results when I call it and then exit. How can this be done? top's manpage does not list any flag for this purpose. Also, I do not want to use ps -eLf for the purpose.
4
votes
1answer
51 views

top: how to cancel current command?

While browsing processes on a shared server in top I accidentally hit the r key which prompted me with renice. I had no clue what this was going to do with my input and found no way to go back. I ...
4
votes
2answers
457 views

What is the STATE column of the TOP command on Solaris?

I'm running a very large, memory intensive program on my new UNIX server and trying to fully understand the output of the "top" command. Here is what I see right now (showing only the first process): ...
4
votes
1answer
2k views

Why does top report the incorrect CPU usage?

I have a machine with Intel(R) Xeon(R) CPU E5520 visible as 16 logical cores (8 with HT). If I run something to eat CPU time (single threaded) top correctly reports 100% CPU usage for the process but ...
4
votes
2answers
65 views

How to freeze current task order?

I believe I have read some time ago how you can make top stop sorting the tasks so that they stay in the same line (easier to read) but still get updates for their values (in contrast to simply ...
4
votes
1answer
138 views

show hostname in top

I'm using top with tmux to monitor the most-CPU-consuming processes on different computers. How can I get the hostname to be displayed in each pane? Can I tell top to display the hostname somehow?
4
votes
2answers
9k views

What units of time does “top” use?

If I issue the "top" command and receive results such as: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 00001 bob 25 0 77380 1212 1200 R 95.8 0.0 89122:13 fee ...
4
votes
3answers
858 views

why does htop meter show >90% while table is 0.0%?

Why do the progress meters across the top of the screen in htop show CPU usage consistently above >90% while the numbers in the table below show a nearly idle system with CPU usage and load average at ...
4
votes
1answer
51 views

how to list all instances of an application?

How do I list all instances of an application. ie I am running 12 instances of application called "tcpA" I would like to list all of them. Below is top, I don't know if there is a way to look at a ...
4
votes
2answers
2k views

100.0%sy with poor disk performance

I have RHEL 5.4 kernel 2.6.18-164.el5 and I am experiencing very bad disk performance that happens randomly during working with Oracle. Nothing appears in the logs. When it happens, I see one CPU ...
3
votes
2answers
189 views

Shouldn't there be more RAM free than this? [duplicate]

Possible Duplicate: Correctly determining memory usage in Linux I see that almost all my RAM is in use. Is this bad? Strange thing is I don't see what is actually using the RAM.
3
votes
2answers
725 views

Using top to see processes run by a user on behalf of sudo

If I run top -u username I will see all the processes by a particular user. Is there a way to also see all the processes that the user called via sudo?
3
votes
2answers
395 views

Memory management, bias to swapping

I was having 768 MB RAM. In a general day MySQL was using 100-180 mb of RAM and MySQL was swapping 80-120 mb. I was having 50-60 mb free RAM. So I thought I should upgrade. Then I upgraded my RAM ...
3
votes
2answers
3k views

How to see complete list of processes in top

When I do 'top', I learn that there are many processes running out of which many are in sleep state. I need to see complete snapshot of all processes at that point. the 'top' is able to show listing ...
3
votes
1answer
296 views

How do I stream a top snapshot into a file

Is there any way to persist the snapshot of top at that given moment into a file? I tried top > top.out but the contents were nothing like top in STDOUT: ^[[H^[[2J^[(B^[[mtop - 16:09:49 up 18 ...
3
votes
2answers
698 views

How can i redirect the output to a file when the program is build with ncurses library [duplicate]

Possible Duplicate: Removing control chars (including console codes / colours) from script output If we redirect output to file in this pattern top >> somefile.txt, we get lot of ...
3
votes
2answers
521 views

How is FireFox running on a virtual machine that has no display?

I am using a Red Hat virtual machine, accessible only remotely. However when I use the top command, one of the displayed processes taking up the most memory is firefox, located at ...
3
votes
3answers
395 views

How can I keep track of what's using the most CPU?

I use nagios to monitor my server. Once in a while I'll get a report that the CPU load is warning / critical, etc. Usually this happens at some odd hour or when I don't have the tools to immediately ...
3
votes
1answer
35 views

program executing for 2 days

I have a java program which implements the Hungarian algorithm. I made changes to the existing code in such a way that the input is read from file. I have a pretty huge input around 32,000 rows for ...
3
votes
2answers
673 views

How can I kill the top CPU/IO process quickly?

I find that sometimes my Linux will stop responding, so I need to switch to another terminal with CtrlAltF2, and type a command to kill the top CPU usage process or top IO usage process, so that the ...
3
votes
1answer
1k views

Why Process CPU % Usage larger than Total CPU Time

When I run the TOP command, a process shows 1208% cpu usage and the total CPU usr time is 81.7% with IRIX mode on. When I change to IRIX mode off, the process shows 99% cpu usage and the total user ...
3
votes
2answers
734 views

Top Command - How to reduce the displayed Columns

Can we get specific column in a top command, for eg I'm interested in only the memory utilization and CPU usage column. How do I reduce the displayed columns of the top command to only the above two ...
3
votes
2answers
664 views

Why “uninterruptible sleep” is not counted as “IDLE”?

When I run top -bi, where the parameter -i means "ignore idle processes", the resulted list(see below) of processes are either R or D, although there're S processes at that time. So, why ...
3
votes
1answer
296 views

HP-UX SZ limit for ps?

Right so I have a fun little thing that I'm deathly confuzzled about. I have a program that is running and I am getting the following: using top: SIZE RES 1639M 359M using ps: SZ 20171 ...