Questions tagged [top]

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

Filter by
Sorted by
Tagged with
0 votes
1 answer
4k views

Using Linux Top, How do I view the thread count of a process

With ps I can view the NLWP (number light weight processes) with ps -o NLWP. How do I show this column in top? Only interested in the count.
Justin Thomas's user avatar
1 vote
1 answer
511 views

top memory used and percent don't match

I have an ec2 server and sometimes I have memory issues - I've had the mysql process killed due to out of memory. This breaks my website and game and sometimes it takes me hours or days to notice :(. ...
KisnardOnline's user avatar
0 votes
2 answers
457 views

How do I use top (or equivalent) to determine if a process is behaving badly?

Are there indicators for when a process has "gone over to the dark side"? I feel that just using MEM% and CPU% are poor indicators for detecting things such as memory leaks (or other problems, ...
Usagi's user avatar
  • 199
4 votes
1 answer
2k views

top equivalent to show I/O per process (per second) on mac/osx

Is there a top-like (visual) tool which can show per process disk I/O (kb/sec)? The question was already asked at Monitor disk activity, á la top, or nettop (per process) on a Mac? and What'...
ddofborg's user avatar
  • 141
5 votes
1 answer
5k views

What's the equivalent of top -H -p <pid> on OS X?

I need to monitor the CPU usage of threads created by a given process. In *nix one can use top -H -p <pid>, but that not available in OS X. An equivalent of ps -eLo pid,ppid,lwp,nlwp,osz,rss,...
raulk's user avatar
  • 169
0 votes
1 answer
1k views

Find location of process running in top command

When I run 'top' I see a process running named "watchdog" I read up on watchdog via the man page ala Google but I don't have that program installed. I've done a whereis and checked the /dev file to no ...
user avatar
8 votes
2 answers
7k views

How to choose columns for top command in batch mode?

$ top -bn1 | head top - 15:16:52 up 11 days, 5:01, 4 users, load average: 0,00, 0,03, 0,11 Tasks: 411 total, 1 running, 408 sleeping, 0 stopped, 2 zombie %Cpu(s): 4,5 us, 0,6 sy, 0,0 ni, ...
Raffael's user avatar
  • 1,211
9 votes
1 answer
8k views

What kswapd is doing when there is no swap

The top look like this: KiB Mem : 3989652 total, 30976 free, 1480440 used, 2478236 buff/cache KiB Swap: 0 total, 0 free, 0 used. 2276236 avail Mem PID USER PR NI ...
Nikita Kipriyanov's user avatar
0 votes
0 answers
1k views

how do I get the PID list and USERNAME of each of those PIDs in LINUX using python?

I am trying to get the PID's and their respective usernames for displaying something similar to the top command in linux. I managed to get the list of PIDs but I am unable to fetch any username for ...
Dee's user avatar
  • 1
1 vote
1 answer
1k views

Using `top` to output only the running processes, PIDs and users?

I'd like to run top -n 1 so that it only outputs a list of running processes, their PIDs and the user that has run them (the "COMMAND", "PID" and "USER" columns). I don't need any of the other ...
CS Student's user avatar
0 votes
1 answer
1k views

Should I trust htop or top when it comes to RES memory?

I am writing a program to test some memory usage metrics on our systems and I want to hit a target memory consumption. You execute my program via meminflate.exe -G 103.1 if you want to take up 103.1 ...
drjrm3's user avatar
  • 1,496
0 votes
1 answer
5k views

What would cause a high `%wa` value when there is nothing performing heavy io?

I have a 92.3%wa value on top right now under linux and when I run iotop -a, I see nothing causing heavy io. What might be the cause of the large %wa value and how can I go about diagnosing this? The ...
drjrm3's user avatar
  • 1,496
1 vote
1 answer
345 views

how to check how much memory processes take?

As we know in Linux machines, we have RAM memory and swap memory. My first question is: What is the reason that the swap memory is increasing – because high level of using the RAM memory or ...
maihabunash's user avatar
2 votes
3 answers
3k views

Find *where* the executable is for a currently running process

If I have 2 executables (/path/to/gcc/myapp.exe, and /path/to/intel/myapp.exe) where one is compiled with an intel compiler and one is compiled with standard gcc, running both will show up in top as ...
drjrm3's user avatar
  • 1,496
0 votes
1 answer
185 views

Why Menu Meter and htop report inconsistent occupied memory and total memory?

On my Macbook Pro running OS X 10.10.3, Menu Meter and htop seem to be reporting inconsistent memory results:
qazwsx's user avatar
  • 8,889
2 votes
1 answer
94 views

How can I safely remove timeout from a script?

I started a script with timeout --signal 2 --kill-after 10 14400 and now decided that it should rather run as long as it must, so I need to remove that timeout from the running script. top -p $(...
Aich's user avatar
  • 133
1 vote
0 answers
94 views

Top -l returning always 0.0 CPU usage when requesting single PID

On Mac OS X 10.9 (Mavericks) & 10.10 Yosemite I’m unable to get the correct CPU usage for a single process using the top -l command for example top -l 1 -ncols 3 -pid <pid> Even though I ...
Roy's user avatar
  • 113
1 vote
2 answers
158 views

how to make top show multiple CPUs (no toggling)

Is there any way to make top show multiple CPUs by default? I know how to toggle (1) But I'm running it on batch mode and the output is redirected to a file.
guest9586's user avatar
  • 133
0 votes
1 answer
266 views

How much time does top command consider while finding CPU usage percentage? [duplicate]

Top gives me an output like: %Cpu(s): 4.7 us, 1.3 sy, 0.0 ni, 93.9 id, 0.1 wa, 0.0 hi, 0.0 si, 0.0 st if my CPU has spent 4.7% of its time on user processes, how much of time history has it ...
learner's user avatar
  • 548
0 votes
1 answer
81 views

How to know, which process had accessed the harddrive last time and when?

How to know, which process had accessed the harddrive last time and when? Like ntopng with "last seen", but in local? The question is about Linux.
Dims's user avatar
  • 12.7k
7 votes
3 answers
11k views

linux - is there a more advanced version of top?

Is there any type of super-top command that will show the results through time? With regular top, it will tell me for an instant what processes are using what, but is there anything that will show ...
Strawberry Saturn's user avatar
1 vote
1 answer
322 views

Low load average with plenty of cpu-intersive processes

I see loadavg at about 1 with at least 3 processes running at full tile. How can that be? top - 11:48:32 up 147 days, 5:38, 8 users, load average: 1.08, 1.11, 1.05 Tasks: 416 total, 4 running, ...
sds's user avatar
  • 2,050
2 votes
1 answer
998 views

Iostat and top show static resource usage on first value

For one of my projects, I need to obtain resource (CPU, I/O and disk-space) usage programatically. Currently I'm running shell commands (iostat) and parsing the results which works relatively well ...
Awake Zoldiek's user avatar
0 votes
1 answer
8k views

How to install top & htop on Ubuntu 8.04.2 LTS (hardy)

Env. Rackspace Ubuntu 8.04.2 LTS (hardy) I am in a corner situation where I need to maintain carefully a legacy server before I can plant for an upgrade. Actually an upgrade is not an option, I ...
zabumba's user avatar
  • 269
1 vote
2 answers
3k views

How to save the output from top/atop

I wanted to know if there a way to save the output from top or atop commands into a textfile for later processing. atop|top > output.txt is not really working at both top and atop keep running in ...
user1745713's user avatar
0 votes
1 answer
315 views

Weird output from linux `top` command

I got a weird output from command top, which shows the summation of the RES column is greater than my physical memory. For instance, I have a host with 64G physical memory and the swap partition has ...
guest007's user avatar
16 votes
3 answers
18k 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 ...
Husman's user avatar
  • 273
1 vote
1 answer
159 views

What is the point of sorting by PID and username in top?

I've been using the top program to find the most CPU and memory hungry programs on linux systems. Only recently did I discover the multi-window mode. The default windows number 2 (teal) and 4 (yellow) ...
andyn's user avatar
  • 373
21 votes
4 answers
17k 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 ...
bright-star's user avatar
  • 1,599
0 votes
0 answers
649 views

99% used memory, but 70% of unused allocated memory and 97% swap available: what can I do?

In a server with 48GB of RAM, when I run top, I see that less than 500 MB are free (1%), whereas when I sum up the column of % of memory used by each process, it is around 30%. Since only the 2.7% of ...
Ricky Robinson's user avatar
1 vote
2 answers
3k views

How to use the top command in Unix to only see process using more than 10% CPU?

I want to use top, but not see all of the processes that are using minute chunks of computing power. Can someone tell me how to use top to see things above a certain cpu % cutoff? I tried just using ...
jake9115's user avatar
  • 1,219
0 votes
1 answer
1k views

top output Time+ information misleading

I am running SuSE 11.2. Shen I am running "top" command on one of my machine, it looks like this: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND ...
Wei's user avatar
  • 111
2 votes
2 answers
79 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 ...
user1527227's user avatar
0 votes
1 answer
777 views

RAM size mismatch: top/htop vs dmidecode

I've got lenovo ideapad Y530. According to dmidecode, I should have 3GB RAM: tomasz@tomasz-lenovo-ideapad-Y530:~$ sudo dmidecode --type memory [sudo] password for tomasz: # dmidecode 2.9 SMBIOS 2.4 ...
ducin's user avatar
  • 367
0 votes
1 answer
1k views

pidstat -u -I shows cpu usage 385%

I have a guest running in qemu doing linux kernel compilation. From host, I am watching its usage with below command pidstat 4 -p pid_of_process -u -I -I flag should average out for all number of ...
soap's user avatar
  • 111
0 votes
2 answers
277 views

In the linux top program, what does the z option indicate

I'm trying to understand the top program better, and I don't really get the 'z' option which highlights all running processes. Wouldn't all processes in top be considered running? In what context ...
Dave Stibrany's user avatar
0 votes
1 answer
2k views

Is using top a robust way of measuring system CPU usage?

I got confused while reading this question on stack overflow. The asker says: "'top' will simply not do, as there is a delay between cpu dumps, it requires 2 dumps and several seconds, which hangs ...
mshildt's user avatar
  • 113
3 votes
1 answer
4k 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 ...
Ulrik's user avatar
  • 151
7 votes
2 answers
16k 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. ...
TTT's user avatar
  • 431
26 votes
6 answers
26k 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 ...
drjrm3's user avatar
  • 1,496
44 votes
2 answers
74k views

How to get `top` for a specific user only?

How can I read top in bash only for one user? I don't want it to display data for other users.
detraveller's user avatar
2 votes
1 answer
2k views

How to read 'top' results

I am running a software and while it is running, I want to know how much CPU usage or RAM it occupies... along with maybe other things that could be interesting. For that purpose, I need to know ...
detraveller's user avatar
2 votes
2 answers
4k views

Monitoring CPU usage of Virtualbox with top

I'm using the top command in Linux to keep a close eye on Virtualbox which is running a VM. The current CPU in the server is a Quad Core Xeon processor 3.3 Ghz and I have only assigned one core to ...
Scandalist's user avatar
  • 3,091
16 votes
3 answers
18k 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 ...
dronus's user avatar
  • 1,908
39 votes
4 answers
24k views

iotop complains "CONFIG_TASK_DELAY_ACCT not enabled in kernel" only for specific process

I'm trying to use iotop to determine whether the CPUs are waiting on I/O at any point for a specific program called bwa (it's a next-generation sequence alignment program). If I start iotop without ...
Mark Ebbert's user avatar
1 vote
1 answer
1k views

Is my top statement saying my asterisk server is using too much resources?

I installed an asterisk server on my VPS with linode. I have 1 GB of ram. I'm not sure what kind of CPU is in use. I decided to test the number of concurrent calls my system can handle. So I used ...
learningtech's user avatar
  • 1,151
1 vote
1 answer
2k views

The outputs of ps and top do not match

I have a situation where I have a process, say script.pl (here it is), which seems to stick around in the output to ps auxw | grep script.pl, sometimes when load is heavy it sticks around for several ...
kmarks2's user avatar
  • 131
6 votes
1 answer
2k 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....
Anshu Prateek's user avatar
2 votes
1 answer
3k views

Top command cache vs free memory

When I am running top command (on embedded system with 64 MB RAM) I am getting below description on total memory usage: "Mem: 43468K used, 968K free, 0K shrd, 1280K buff, 21896K cached" It looks ...
Lunar Mushrooms's user avatar
8 votes
2 answers
7k 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 ...
Sharvari Marathe's user avatar