Questions tagged [top-command]

Unix/Linux utility providing a "dynamic, real-time view of a running system".

84 questions
293
votes
7 answers

Network usage top/htop on Linux

Is there a htop/top on Linux where I get to sort processes by network usage?
xxxxxxx
  • 5,037
  • 6
  • 28
  • 26
198
votes
11 answers

top -c command in linux to filter processes listed based on processname

top -c Top lists all the processes, there are good options to filter the processes by username by using the option -u but I am wondering if there is any easy way to filter the processes based on processname listed under COMMAND column of the top…
user1615330
84
votes
18 answers

Limit the output of the TOP command to a specific process name

If you call the top command, you get all the running processes. But how can I limit the output only to a certain process name like "java"? I've tried this top -l 2 | grep java but in this way you get only snapshots and not a continuously updated…
Alex
  • 8,245
  • 8
  • 46
  • 55
71
votes
3 answers

In Linux, what do all the values in the "top" command mean?

When you run top and see all running processes, I've always wanted to know just what everything actually means. e.g. all the various single-letter state codes for a running process (R = Running, S = Sleeping, etc...) Where can I find this?
Aaron Fi
  • 10,116
  • 13
  • 66
  • 91
42
votes
10 answers

Inspecting Java threads in Linux using top

I am inspecting a Java process in Linux using top -H However, I cannot read the name of the thread in the "COMMAND" column (because it is too long). If I use 'c' to expand the full name of the process, then it is still to long to fit. How can I…
Jake
  • 15,007
  • 22
  • 70
  • 86
36
votes
1 answer

What do top %cpu abbreviations mean?

Does anyone know what the 2-letter abbreviations mean in the %CPU line in the header above the top table of processes? Here's a sample output from running top. top - 15:10:34 up 8 days, 5:11, 1 user, load average: 0.10, 3.80, 26.82 Tasks: 1…
Ray N. Franklin
  • 595
  • 1
  • 5
  • 13
28
votes
7 answers

A process command in top

The problem comes up when you run couple of python scripts. in top at command, it shows only 'python' with these scripts. How to rename a process or otherwise tag it so that I could tell them apart in top?
Cheery
  • 24,645
  • 16
  • 59
  • 83
28
votes
6 answers

Comprehending 'top' CPU usage

What does it exactly mean to have a 350% cpu usage (by a process) on a 4-CPU box? The process is a 'mysqld' which is currently being 'bombarded' by a simulated OLTP scenario. Any pointers appreciated.
user59634
24
votes
3 answers

Top unix command ascending order

I am using Ubuntu 12.04 and have recently started working on bash. I need to display say memory or CPU in ascending order. command : top shift F, this shows window of all the column. I select n for memory and it is ordered in descending order. Same…
Death Metal
  • 830
  • 3
  • 9
  • 26
22
votes
7 answers

Change the ruby process name in top

I would like to change the name of the ruby process that gets displayed in the linux/unix top command. I have tried the $0='miname' approach but it only works with the ps command and in top the process keeps getting displayed as "ruby"
muesan
  • 373
  • 3
  • 8
16
votes
4 answers

In *nix, what causes "sleeping" in top command?

What causes these sleeping processes that I see in top? If I were to call PHP's sleep() function, would that add to the sleeping count I see in top? Are there any disadvantages to having a high number in sleeping?
StackOverflowNewbie
  • 39,403
  • 111
  • 277
  • 441
15
votes
2 answers

RES != CODE + DATA in the output information of the top command,why?

what 'man top' said is: RES = CODE + DATA q: RES -- Resident size (kb) The non-swapped physical memory a task has used. RES = CODE + DATA. r: CODE -- Code size (kb) The amount of physical memory devoted to executable code, also known as the 'text …
BruceAuyeung
  • 155
  • 1
  • 1
  • 7
12
votes
2 answers

CPU usage in top batch mode

I have a problem that makes me mad. I am running top in batch mode with the following command, top -b -n 1 The problem is I can run top in batch mode 100 times but the CPU usage never changes past the original value. The memory usage changes as…
toc777
  • 2,607
  • 2
  • 26
  • 37
11
votes
2 answers

where does top gets real-time data

Where does top application gets it's data on Linux? I would be interested in real-time CPU load/pid data.(I read allmost all documentation in /proc/pid man page, but the info isn't there). The pid is a jboss. I need the data lightweight (to be…
Mark
  • 155
  • 1
  • 11
11
votes
7 answers

How to suppress the general information for top command

I wish to suppress the general information for the top command using a top parameter. By general information I mean the below stuff : top - 09:35:05 up 3:26, 2 users, load average: 0.29, 0.22, 0.21 Tasks: 1 total, 0 running, 1 sleeping, …
sjsam
  • 21,411
  • 5
  • 55
  • 102
1
2 3 4 5 6