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

learn more… | top users | synonyms

7
votes
2answers
7k views

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?
1
vote
1answer
32 views

Understanding the top command high load average and high CPU idle

DirectAdmin sent me the following top output: This is an automated message notifying you that the 5 minute load average on your system is 179.99. This has exceeded the 10 threshold. One Minute ...
5
votes
1answer
29 views

High %sy in top output, how to debug?

We have 2 identically configured servers and one of them is showing a high %sy while the other does not. This would seem to indicate that the system is busy doing something. Cpu(s): 28.1%us, ...
0
votes
1answer
17 views

Average CPU utilization of a process

I am trying to conduct some experiments for determining what the CPU utilization of my process is. I am familiar with the top and ps commands. Which would be a better solution for getting the average ...
0
votes
0answers
43 views

CPU load and power management (frequency)

question background In my understanding the load value (shown e.g. by top) allows (together with the knowledge how many CPU cores the system has) a very quick assessment which share of the ...
2
votes
0answers
51 views

Programmatically get CPUs 'detailed' usage, like top/htop

htop has a great way to show CPU usage. It shows the activity (usage in %) of each cores, and each core gauge is divided into three parts : blue: low priority processes green: normal processes red: ...
1
vote
1answer
75 views

How do I get the old procps-ng top(1) layout back (pre-3.3.10)?

Since updating to procps-ng 3.3.10 my top(1) looks like this: Instead of: Not only are these colours annoying & offensive, I can't get it to sort as the "old" top(1) (O no longer works, and ...
24
votes
2answers
6k 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 | ...
1
vote
0answers
13 views

How to interpret numerous processes with exact same RAM usage [duplicate]

I have a VM that processes files, parses the information and saves it to a database. I've been monitoring the resource usage and noticed /usr/sbin/console-kit-daemon --no-daemon.. Below you see a ...
1
vote
1answer
76 views

Is there a valid alternative to top for OpenBSD?

I like very much htop, on GNU/Linux is very nice, I would like a similar software for OpenBSD 5.6. Anyone knows something about that?
5
votes
3answers
109 views

Start top with particular sorting

I'd like to start top with sorting set to resident memory size, instead of the default CPU usage. I don't see a way to do that from command line arguments or startup file. Obviously I can't echo "Oq" ...
11
votes
2answers
17k 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 ...
1
vote
1answer
74 views

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 ...
1
vote
1answer
71 views

Total CPU usage and CPU usage under processes list is different in FreeBSD top implementation?

For some reason, overall CPU usage on my FreeBSD machine fluctuates between 1% and 85%, but the CPU usage in processes column never adds up to this amount. For example here the overall CPU usage is ...
2
votes
1answer
24 views

`top` not refreshing screen on exit

When I exit top, the prompt reappears at the bottom and I can see the bottom of the last thing it was showing. How can I get top to behave like less i.e. refresh the screen back to when I launched ...
1
vote
1answer
90 views

Find the process which is taking maximum CPU usage if CPU usage is more than 60%?

I am trying to measure the cpu usage of my ubuntu machine and if the cpu usage is more than 60%, then I need to find out the process who has the highest cpu usage and then send out an email saying CPU ...
30
votes
6answers
56k 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 :)
3
votes
3answers
63 views

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 ...
2
votes
0answers
72 views

Why would whois take up 100% of the CPU?

Running top on my CentOS web server shows an instance of whois running from 99-100% of one of the CPUs. I've not knowingly used whois on this server before, would it be safe just to kill this ...
2
votes
2answers
162 views

How does a parallelized Python program look with top command?

I work on a shared cluster. I've seen people run parallelized c code on this cluster which, when I use top to see what processes are running, are shown to be using (for example) 400% of the CPU, ...
2
votes
4answers
387 views

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 ...
7
votes
3answers
6k 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: ...
0
votes
1answer
57 views

Bash crashes when running common commands [closed]

Open Bash, run Top, and about 1/3 times, bash just closes. The other 2/3 times, it runs properly. The same thing occurs with other commands like "clear" or "/sbin/ifconfig" Any ideas what may be ...
1
vote
2answers
120 views

Extract text from one iteration of top

I want to execute the top command from my bash script the problem is that usually when I type the top command on the console , I exit by Ctrl+C. but how to exit from top when I run the top command ...
52
votes
1answer
63k 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, ...
0
votes
0answers
145 views

What's limiting my CPU usage in forked processes?

I am running some long-running programs (for scientific purposes) on a multi-core Linux box. The processes are controlled by a small daemon which restarts the next job when one finishes (I run 3-6 at ...
0
votes
0answers
28 views

How fast is a process reading/writting virtual memory?

So, we have top, htop, iotop, iostat, vmstat, etc, to measure many different things on Linux, but how can one measure how much MB/s a process is reading and writting to/from RAM, i.e., virtual memory? ...
2
votes
1answer
207 views

Why highest priority threads are displayed with RT in top and htop?

In the top and htop tools, processes (or/and threads depending on display settings) having the highest realtime priority (99 from the userland API point of view) with either the scheduling policy ...
1
vote
1answer
30 views

How do I control the cycle length of “top” command

I have been told that "top" command only cycles once per second (I don't know if that's true) and I need it to show changes in processes way shorter than a second, how do I do that? What I need to ...
3
votes
3answers
275 views

Alert when running process finishes

There are a few questions and answers on here with regard to being alerted when a process completes/exits(1, 2) – but these all assume that the user has issued said process themselves, and thus can ...
1
vote
1answer
1k views

Huge CPU load due to high system usage

Tasks: 747 total, 176 running, 560 sleeping, 0 stopped, 11 zombie Cpu(s): 10.5%us, 89.2%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.3%si, 0.0%st Mem: 74236420k total, 73285344k used, 951076k ...
1
vote
1answer
44 views

Memory usage stays high after compilation jobs

I am operating a small Linux VM with 1Gb of RAM. It is a fairly typical LAMP setup which takes about 16% of memory on normal usage I used the box to compile stuff yesterday, the memory went up to 60% ...
1
vote
0answers
29 views

Top forest view with filter, can I include all children?

If I'm using top in "forest" mode (V) and I restrict by PID (o PID=12345), can I also get top to show all the child processes in the same view? Ubuntu, top from procps-ng version 3.3.9
1
vote
1answer
195 views

How to redirect per-CPU top output to file?

I want redirect top output to a file, but I am interested in the per-CPU usage. Doing just #I only want to see processes belonging to myuser top -b -d 1 -u myuser > top.txt gives me stats ...
22
votes
4answers
14k 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 ...
3
votes
1answer
124 views

PBS equivalent of 'top' command: avoid running 'qstat' repeatedly

When I run several jobs on a head node, I like to monitor the progress using the command top. However, when I'm using PBS to run several jobs on a cluster, top will of course not show these jobs, and ...
4
votes
1answer
2k views

Human readable memory sizes in top? [duplicate]

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 ...
2
votes
2answers
173 views

Is there a way to get “top” to run exactly once and exit?

I find the output of the shell command top to be a simple and familiar way to get a rough idea of the health of a machine. I'd like to serve top's output (or something very similar to it) from a tiny ...
1
vote
2answers
82 views

How to use top with only showing CMD name

How do you use top with just showing the CMD name? I have used top with just showing the running process that I want; for example: $ top -p 19745 And if I want more than one PID, I would use: $ ...
3
votes
2answers
4k views

ATOP shows red line vmcom and vmlim. What does it mean?

utility atop shows: ATOP - MyServer 2013/01/07 00:03:57 10 seconds elapsed PRC | sys 2.18s | user 8.33s | #proc 141 | #zombie 0 | #exit 0 | CPU | sys 21% | ...
1
vote
1answer
2k views

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 ...
0
votes
2answers
5k views

Top “id” is using 50-99% of CPU

My i386 Lubuntu install is running with a constantly 100% CPU. Using top I have diagnosed "%id" as using up a lot of CPU, usually between about 50% and 99%. Why is this happening, and how can I stop ...
3
votes
4answers
146 views

What is using memory? [closed]

According to htop and free, the machine I'm looking at is currently at 6631 / 11907 MB of RAM. That's more or less half of the RAM available. However when I sort top or htop by MEM%, the most memory ...
3
votes
2answers
659 views

Understanding %CPU while running top command [duplicate]

I am trying to understand what does %CPU means when I run top. I am seeing %CPU for my application as 400 or 500 most of the times. Does anyone knows what does this mean? What number is a high ...
0
votes
0answers
418 views

How to find the cpu and memory usage of a single process in linux

This question is similar to this SO. I wanted to find the CPU and memory utilization for a single process so I decided to use the top -p <$PID> as mentioned in the question. Here is my script. ...
1
vote
2answers
126 views

What does % utilization mean in htop if only 1 process can execute at a time?

I see that the htop command reports respective the % of utilisation of each CPU core and also that of the processes. We know that only 1 process can execute at a time in the CPU. How is it possible ...
3
votes
2answers
95 views

CPU percentage of a single process

How do I get the average CPU percentage (for every second) consumed by a single process since it starts until it ends (exists)? Could I make this with Top?
1
vote
2answers
498 views

What does “batch mode” mean for the top command?

I was reading about the top command and I came across something I don't quite understand: top options: -b Run in batch mode. This is useful for sending output from top to other programs or to ...
0
votes
1answer
73 views

The shell command “top” shows which processes from the /proc directory?

The manual page states, The top program provides a dynamic real-time view of a running system. It can display system summary information as well as a list of processes or threads ...
0
votes
1answer
47 views

get cpu by user

Working with monit I need create an alert that get cpu usage of system users, so: top -b -n 1 -u user1 | awk 'NR>7 { sum += $9; } END { print sum; }' seems a good solution but I'm not sure about ...