44 Comments
- holydope, on 10/12/2007, -1/+23If you still use top, you should try htop (http://htop.sourceforge.net/). It's like top, but better... It's better in my opinion anyway.
- negativefx, on 10/12/2007, -1/+16like he just said, he's doing numerical programing...CPU performance is most important. Loser.
- kunjan1029, on 10/12/2007, -0/+11Whenever [INSERT ANY OS HERE]'s system CPU is occupied by a process, it is unavailable for processing other requests. Rest of pending requests must wait till CPU is free. This becomes a bottleneck in the system.
It is called multitasking. Its not Linux specific. - mooninite, on 10/12/2007, -0/+10If you want to graphically represent CPU/MEM usage:
gnome-system-monitor
or
XFCE plugins: CPU Graph, System Load Monitor - Kale, on 10/12/2007, -1/+10For my numerical programming, I do an Alt-F2 to change to another terminal window, type "top" and use it to monitor RAM usage and CPU utilization (in Slackware 10.2).
- troyounces, on 10/12/2007, -0/+3I like nmon analyser from ibm. I use it on my AIX and linux servers.
http://www-941.haw.ibm.com/collaboration/wiki/display/Wikiptype/nmonanalyser - gollo, on 10/12/2007, -2/+5htop FTW
- kunjan1029, on 10/12/2007, -0/+3And each process gets like a few milliseconds of CPU time.
http://en.wikipedia.org/wiki/Computer_multitasking
This method can be used to find out what process is hogging up the CPU cycles the most. (and you can re-nice them http://www.oreilly.com/catalog/linuxkernel/chapter/ch10.html search for nice on that page.) - mancat, on 10/12/2007, -0/+3vraa,
Yes, NT has eight different process priority levels, two of which are unavailable to any userspace process and are reserved for the kernel and realtime I/O drivers. - drizek, on 10/12/2007, -0/+3htop is a lot easier to read though.
- dark_helmet, on 10/12/2007, -2/+5I don't suppose you ever considered that Linux is very commonly used in servers, which generally don't run a desktop environment.
- Xilon, on 10/12/2007, -1/+3Try emerge (going by your gentoo avatar). Don't be a moron, please.
- bart9h, on 10/12/2007, -0/+2seconded. screen rules.
if you are a shell terminal guy, go for it.
it has so many useful features it wouldn't fit here. - CaptainMordecai, on 10/12/2007, -0/+2Instead of using a second virtual console perhaps you might give screen a try? If you'd like to see program output + top all at once its perfect...
basically the following will get screen up and running with 2 shells (comments parenthesised obviously)
screen
ctrl+a Shift+s (split the current window in 2)
ctrl+a tab (switch to the next section onscreen)
ctrl+a ctrl+c (start a new window in the current region)
man screen for all the details... - rickyboone, on 10/12/2007, -0/+2@madeingermany: No, not really. htop seemed to use similar resources as top, at least on my system.
- drizek, on 10/12/2007, -3/+4top sucks
apt-get install htop
instead. - pauldonnelly, on 10/12/2007, -0/+1No? Did you not read it, or do you not know what that phrase means?
- florin, on 10/12/2007, -2/+3Indeed. Explanation offered ("Rest of pending requests must wait till CPU is free. This becomes a bottleneck in the system") is pretty naive.
Buried as inaccurate. - LordVoldemort, on 10/12/2007, -2/+3Isn't this article preaching to the choir?
- madeingermany, on 10/12/2007, -0/+1top itself consumes too much resources to give you a good picture of system utilization.
is that different with htop? - strabes, on 10/12/2007, -0/+1I use ctrl+alt+delete to kill crashed/locked programs. There's never enough time to use it to monitor resource usage because something always crashes.
- idonthack, on 10/12/2007, -0/+1What do you mean, "windows wins"? If you're talking about graphical tools there's lots of those. This article seems to be more targeted to command line users (I just skimmed it, though)
I've got an icon on my toolbar that I can click that runs ksysguard. It gives me a window with color-coded graphs of memory, swap, and CPU usage, and in another tab I have a list of processes that I can sort by just about anything. - Hydraulix, on 10/12/2007, -0/+1What's wrong with dstat?
- punkrock4life, on 10/12/2007, -0/+1iostat 5
or
vmstat 5 - madeingermany, on 10/12/2007, -0/+1In Linux you can map Ctrl+Alt+Del to whatever you like - even something really useful.... but even to a system monitor :p
- CaptainMordecai, on 10/12/2007, -0/+1"Finally, you need to determine which process is monopolizing or eating the CPUs. Following command will displays the top 10 CPU users on the Linux system.
# ps -eo pcpu,pid,user,args | sort -k 1 -r | head -10
OR
# ps -eo pcpu,pid,user,args | sort -r -k1 | less"
*cough*
ps -Au | head -n 11
Ought to be enough for anyone.... - rickyboone, on 10/12/2007, -0/+1@drizek: I agree. Although, I have noticed some funny "duplicates" (or at least as far as I can tell). My VMware Server box shows two processes for each VM, with different PIDs. Only 1 PID is real, but both show up. Strange. :)
- helium, on 10/12/2007, -0/+1I have switched to atop from http://www.atcomputing.nl/atop
It has properties of old top and FreeBSD's systat, but it works all at once.
Great tool. - echimu, on 10/12/2007, -0/+1Commands are Linux specific; these commands are not available under Windows. May be available under OS X.
- Archon810, on 10/12/2007, -0/+1after trying htop a couple of months ago, I install it on all linux machines I can find now.
- transeunte, on 10/12/2007, -0/+1When in Rome...
- pauldonnelly, on 10/12/2007, -1/+1Hmm. Ctrl+alt+del or "t o p". Funny, those seem to be exactly the same length. Except top shows more information, of course.
- mym6, on 10/12/2007, -0/+0@vraa the nice level of a process in a UNIX like OS (Linux, Mac OSX) decides how much time the CPU will give it and in a sense, what order. UNIX operation systems have a wide range of priority levels unlike Windows which provides just 4, Below Normal, Normal, Above Normal and Realtime. Most systems put high numbers as having lower priority so for example, a process with a nice level of 0 on Linux has higher priority than a process that is niced at 1. The higher the nice level, the "nicer" the process is to everyone else. If you had to run an I/O intensive process (copying many iso files in parallel for example) you could renice your cp commands to 20. This would make everything else on the machine run as if the copies weren't happening at all.
- vraa, on 10/12/2007, -2/+2Does Windows 'nice' processes?
I know MacOSX does, but to be totally honest even after reading about it in wikipedia I'm not sure what "nice-ing" does.
From what I understand, it just drops the priority of a process down so it doesn't hog the cpu? - ratbastid, on 10/12/2007, -0/+0How do you talk about Linux status visualization without mentioning GKrellM?
http://members.dslextreme.com/users/billw/gkrellm/gkrellm.html - thesimo, on 10/12/2007, -1/+1i use "top" in teh terminal
- vwgtiturbo, on 10/12/2007, -0/+0Ok, so rmerrick is a big ol' *****. I think that's obvious. Why someone could be labeled as a 'loser' for NOT using a desktop environment is beyond me. Newsflash *****... a terminal (as in, runlevel 3, not 'Konsole') is actually much more productive than a GUI environment, IF you know what you are doing. Not everyone requires the hand-holding that the GUI provides. Dumbass...
- rmerrick, on 10/12/2007, -2/+1@Negativefx --
What a load of *****. I run linux on an old 1.3 Mhz AMD. When I run Top, I can see that the desktop does not use hardly any CPU usage once it is up and running. Even Top uses more CPU resources than the desktop. Check it out for yourself. Here is the command: Top -U dumbassuser. Try it, Loser. - pauldonnelly, on 10/12/2007, -1/+0Perhaps that it's not on every system, and the author doesn't consider it better than the non-standard one that is mentioned.
- Agret, on 10/12/2007, -3/+1apt-get: command not found
- inactive, on 10/12/2007, -5/+2In ubuntu you go to "system monitor"
this is my sig. - FKnight, on 10/12/2007, -5/+1I'm burying the whole article because every comment posted here annoyed me.
- rmerrick, on 10/12/2007, -26/+3Why don't you open a terminal emulator like everyone else? Is there some reason you are not using a desktop environment? Loser.
Gkrellm works fine for monitoring your CPU usage as well. It creates a little graph too.


What is Digg?
Digg is coming to a city (and computer) near you! Check out all the details on our