Questions tagged [top]

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

480 questions
570
votes
9 answers

How to display `top` results sorted by memory usage in real time?

How can I display the top results in my terminal in real time so that the list is sorted by memory usage?
Theodor Coogan
  • 5,701
  • 3
  • 12
  • 3
306
votes
16 answers

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.
Josh K
  • 3,866
  • 4
  • 22
  • 15
293
votes
9 answers

How to display meminfo in megabytes in top?

Sometimes it is not comfortable to see meminfo in kilobytes when you have several gigs of RAM. In Linux, it looks like: And here is how it looks in Mac OS X: Is there a way to display meminfo in Linux top in terabytes, gigabytes and megabytes?
Anthony Ananich
  • 7,234
  • 5
  • 31
  • 45
258
votes
3 answers

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 | \_ unicorn_rails worker[0] -c config/unicorn.rb …
Cheng
  • 6,531
  • 11
  • 40
  • 42
256
votes
3 answers

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: 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, 0.0%hi, 0.0%si, 0.0%st While I know the definitions of each of…
its_me
  • 13,709
  • 23
  • 54
  • 52
214
votes
1 answer

Human readable memory sizes in top?

Is there an option in top to show memory sizes in human readable format? Example: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 3960 phil 20 0 1347280 383112 30316 S 0.0 9.5 …
Philipp Claßen
  • 4,689
  • 7
  • 29
  • 41
120
votes
11 answers

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 :)
ripper234
  • 31,063
  • 43
  • 82
  • 90
119
votes
9 answers

How to view a specific process in top

Are there any relatively strightforward options with top to track a specific process? Ideally by identifying the process by a human readable value? e.g. chrome or java. In other words, I want to view all the typical information top provides, but for…
Michael Coleman
  • 1,307
  • 2
  • 8
  • 7
110
votes
2 answers

Understanding %CPU while running top command

I am trying to understand what %CPU means when I run top. I am seeing %CPU for my application at "400" or "500" most of the time. Does anyone know what this means? 19080 david 20 0 27.9g 24g 12m S 400 19.7 382:31.81 paper_client lscpu gives…
david
  • 2,147
  • 7
  • 25
  • 31
94
votes
6 answers

How to change top's sorting back to CPU?

A former coworker did something to top that whenever it runs as root the data is sorted by MEM usage instead of the default CPU usage. According to multiple searches, the man page and even the options within the top console itself (O), just pressing…
user27807
89
votes
3 answers

What do the "buff/cache" and "avail mem" fields in top mean?

Within the output of top, there are two fields, marked "buff/cache" and "avail Mem" in the memory and swap usage lines: What do these two fields mean? I've tried Googling them, but the results only bring up generic articles on top, and they don't…
user48923
89
votes
6 answers

How to check which process is using most memory

When I check free in one of Prod server it showing 70% of memory is being used: total used free shared buffers cached Mem: 164923172 141171860 23751312 0 4555616 20648048 -/+ buffers/cache: …
sandeep
  • 891
  • 1
  • 7
  • 3
79
votes
2 answers

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 00002 bob 25 0 77380 1196 1184 R 95.4 0.0 …
Abe
  • 1,681
  • 2
  • 13
  • 8
78
votes
3 answers

top command on multi core processor

I am using freescale IMX6 quad processor. I want to know if the top command lists the CPU usage of all 4 cores or of a single core. I am seeing an application's CPU usage being the same with 4 cores and with a single core. I was guessing the CPU…
user3818847
  • 1,131
  • 2
  • 8
  • 7
67
votes
2 answers

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 with time (i.e. when running the same command a bit…
Theodor
  • 939
  • 1
  • 8
  • 9
1
2 3
31 32