logo

Home page
Articles for Windows, Linux, OS X
Mac tips and articles
Mac tips
Windows 8 tips and articles
Windows 7 tips and articles
Vista Tips
XP Tips
Linux tips and articles
Read the blog
Online store
Windows, Linux, OS X programs
Links
About

Linux tips and tweaks

Monitor the system

The resources on your computer are limited and there is only so much memory, disk space, processing power, internet bandwidth and so on. If you run several applications at once you may run short of one or more resources and this can seriously affect the performance of the computer. It can slow down to a crawl if there is little memory left, or if the processor is being used heavily by another program, or downloads are taking place in the background.

It is a good idea to keep an eye on the system and to monitor the resource usage. In Linux this is easy and there are several ways of performing this task. It can be done by pointing and clicking in the graphical interface and also by typing at the command line in a Terminal window too.

The most obvious way to monitor system resources is by running System Monitor, which in Ubuntu is on the System, Administration menu. The Resources tab displays the CPU history, memory and swap history and network history as live scrolling charts. You can change the update frequency of the charts by going to Edit, Preferences and then the Resources tab.

Linux top command

The Processes tab is also useful and it shows a list of processes, which are programs and other things running in the background. Click the CPU header and the list is sorted with the process using the most CPU time at the top (click again to reverse the sort order). If a process is placing too heavy a demand on the CPU it can cause the computer to slow to a crawl. It's possible to change the amount of CPU time allocated to a process by right clicking it and selecting Change Priority.

You can increase the priority so that the program or process runs faster or decrease the priority so it slows down and gives more time for the rest of the processes to run. You shouldn't actually need to change the priority of processes because Linux does a good job of managing them anayway, but it is useful to know how to do it just in case you ever need to tweak things. For example, you might want to use it to speed up a program, such as video processing, which is taking a long time.

It's possible for a program or process to crash and tie up the CPU or to sit there doing nothing at all. If a program or process freezes you can right click it in the processes list and select End Process or Kill Process. It's not the correct way to quit a program and you shouldn't do this under normal circumstances, but if you can't quit in the usual way, such as from a menu or button within the program, then use it.

Use the panel gadget

A great way to monitor system resources is by adding a gadget to the panel if you use the gnome desktop. Right click an empty part of the top or bottom panel and select Add To Panel. You can now select and add System Monitor. You'll see it in the panel and if you right click it and select Preferences from the menu, you can choose what to display. For example, you might just want to show the processor, memory and network. This displays three mini live scrolling charts that show how much of each resource is being used. When the mouse hovers over one of them, a pop-up message box provides more details. It's really useful to have this on the screen all the time so you can see what's happening to the system.

Linux top command

Top command

There are some Linux users that want to do everything from the command line for some strange reason. For those people, there is a command you can type in to the Terminal window that displays the live system status. It has a text display, but otherwise it is similar to the graphical System Status. Just type top and you'll see the CPU usage, memory used, free and total, the list of processes and how much CPU time they are using and so on. Press Q to quit and return to the command prompt.

Linux top command



Go to Linux tips index...

copyright