HOWTO: Monitor System Processes
The top tool displays the top x number of processes that are using resources on your system. While most desktop users will likely want to use something like Ksysguard (which has a process table tab) instead, some may prefer the speed and elegance of top.
As with many GNU/Linux tools - the output of the top command is cryptic at first glance. The man page for top is quite formidable and contains many options to display how the output is formatted. I’m not going to go into that level of detail, rather we’ll just look at the default display.
The default columns are kind of intuitive. Kind of. I think the most useful columns are the CPU%, MEM%, and COMMAND columns. The COMMAND column displays the name of the running process, and the CPU% and MEM% columns show how much memory and CPU time the process has taken up since the last time top updated.
By default, top is started in interactive mode meaning it will stay on your screen and update itself periodically so you can keep an ongoing eye on your system. It’s ‘interactive’ because you can also issue commands to it such as hitting the spacebar to force a refresh. It’s instructional to launch top on your webserver and then watch it as you surf your website. You’ll see your webserver (apache, likely?) jump up and down the process list as you surf along.
Top also has a batch mode which might be useful for calling it in scripts and saving its output somewhere for later processing.
A great tutorial on all the ins and outs of top can be found on Linux Forums, here.
Related Stories
POSTED IN: How To
0 opinions for HOWTO: Monitor System Processes
No one has left a comment yet. You know what this means, right? You could be first!
Have an opinion? Leave a comment: