A command-line system monitor tool that produces a frequently-updated list of processes.
16
votes
5answers
12k 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 :)
14
votes
1answer
14k 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, ...
13
votes
3answers
15k 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.
10
votes
2answers
2k 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 | ...
10
votes
1answer
680 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
1answer
2k 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
6answers
3k 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.
8
votes
3answers
2k 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 ...
7
votes
2answers
537 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 ...
7
votes
2answers
705 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 ...
6
votes
2answers
2k 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
613 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
2k views
Understanding top and load average
I'm observing a high load average an 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 ...
5
votes
2answers
992 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
4answers
2k 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, ...
4
votes
1answer
142 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
90 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
3answers
385 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
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
860 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 ...
4
votes
4answers
2k 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 ...
4
votes
1answer
313 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 ...
3
votes
2answers
165 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
437 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
165 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
1answer
84 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
1k 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
2answers
395 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
2answers
268 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
225 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 ...
3
votes
2answers
1k 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
...
3
votes
2answers
456 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
2answers
1k 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 ...
3
votes
1answer
730 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
983 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
1answer
200 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
...
2
votes
2answers
870 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 ...
2
votes
3answers
282 views
Killing a tree of processes in top/htop
htop allows me to nicely see trees of processes within the shell. I can kill processes by pressing F9 (KILL) and then selecting which signal (e.g. 15 SIGTERM) I want to send to a job to kill.
...
2
votes
2answers
504 views
Find the PID of top CPU/MEM usage, save to a shell variable
Is there any way to get the PID of the top CPU/MEM usage, I need to use that in a script, top command doesn't seem to work for it.
2
votes
2answers
211 views
How to interpret this top command
top - 04:36:16 up 32 days, 2:33, 1 user, load average: 251.72, 250.54, 231.19
Tasks: 785 total, 249 running, 522 sleeping, 2 stopped, 12 zombie
Cpu(s): 8.9%us, 90.5%sy, 0.4%ni, 0.0%id, ...
2
votes
4answers
130 views
How to find out what is this process for?
I have this 'java' process running for 3 hours ( I guess ). I didn't see it before and I wonder how could I find out where it's coming from?
Here is a screenshot:
EDIT: ok I figured it out, it's ...
2
votes
1answer
715 views
CPU and core usage stats
I'm running some programs on a server and I would like to know how much % cpu I'm taking up and how many cores are being utilised by my process.
To clarify, the server has 16 CPUs, all quad-core. I ...
2
votes
3answers
283 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 ...
2
votes
2answers
138 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 ...
1
vote
3answers
2k views
Why is apache2 showing up a defunct in the process list?
When I run top I see one line that doesn't look too good:
2475 www-data 20 0 0 0 0 Z 1 0.0 0:00.19 apache2 <defunct>
Why is this process <defunct> and what should I ...
1
vote
4answers
451 views
How to find which machines are idle on a cluster of many nodes
I run measurements on a cluster consisting of 32 nodes/machines. I do not require all nodes, only 4, for example. The problem is most of the time, the nodes are busy with other people running their ...
1
vote
2answers
128 views
Why linux uses swap memory when there are still tons of physical memory unused
root@host [/home4/nudenude/public_html/hello/cache]# top -r
top: unknown argument 'r'
usage: top -hv | -abcHimMsS -d delay -n iterations [-u user | -U user] -p pid [,pid ...]
root@host ...
1
vote
1answer
278 views
Where does top / gnome-system-monitor get its information about cpu usage?
I am curious where gnome-system-monitor and top (the command line tool) get their information about the CPU usage in %. Could you please explain it to me?
1
vote
1answer
307 views
htop reporting much higher memory usage than free or top
The following three outputs were taken essentially simultaneously:
top:
top - 02:54:36 up 2 days, 13:50, 3 users, load average: 0.05, 0.05, 0.09
Tasks: 181 total, 1 running, 179 sleeping, 0 ...
1
vote
1answer
99 views
How do you prevent user from opening a program?
I'm trying to write a script which prevents the concerned user from opening programs (mostly internet browsers) from being run during a certain time (like 1000 to 1200 hrs). This is like a ...
