Monitor CPU usage

Keeping an eye on CPU load can be a good way of spotting if something is going wrong on your computer—if the system is doing nothing in particular, but CPU usage is at 99%, then it's likely a program is in the process of crashing.

A variety of CPU load applets are available under Ubuntu and each go about the task in different, often entertaining, ways. Perhaps my favorite is bubblemon, which shows CPU usage as a vessel of bubbling liquid. If it boils, your computer is busy! You'll find it listed in Synaptic. Once installed, log out and then back in again, and then right-click a blank spot on the panel. Select Add to panel and select Bubblemon from the list. A good way to test the new applet is to drag a window around quickly—this taxes the CPU, so should cause some virtual bubbles to rise.

Worth investigating if you'd like to take an opposing approach is cpufire-applet which, as its name suggests, shows CPU load as rising licks of flame. It can be installed via Synaptic and configured in the same way as bubblemon—after logging out and back in, add the CPU Fire Applet, as described above, by right-clicking the panel.

As entertaining as they are, neither applet offers much concrete information. Ubuntu's built-in System Monitor applet is much in the same vein and provides only a graph of CPU activity across time. To see actual numbers, you'll need to use Synaptic to search for and install the hardware-monitor applet. Once it's installed, log out and then back into Ubuntu. Right-click a blank spot on the panel, click Add to panel, and select Hardware Monitor from the list. The applet is very small and you might just notice it where you initially clicked on the panel. By default it shows a graph of CPU activity. To see percentage figures, right-click it, select Preferences in the menu that appears, and, after selecting the Viewer tab, click the Text radio button. If your computer has a dual-core processor, hardware-monitor will report the speed of both cores, and this can mean the display gets quite cramped. Therefore you might want to click the dropdown list under the Font heading of the Viewer tab and select a smaller point size (maybe 8 point, depending on your screen resolution and eyesight).

See also Tip 106, on page 158, which describes how to alter the CPU speed on the fly, and Tip 150, on page 194, which explains how to monitor CPU temperatures.

Some say that [Caps Lock is one of the most useless keys on the keyboard. it's certainly more of a pain than a help when hit by accident, particularly on some keyboards that lack the usual LED lights to show it's active (such as battery-powered models). You can turn-off [Caps Lock by following Tip 90, on page 147, but another solution is to use Synaptic to install lock-keys-applet, which will simply warn you if [Caps Lock has been activated. Once installed, right-click a blank spot on the panel, click Add to panel, and then select Lock Keys from the list. Now, whenever [Caps Lock is hit, you'll have a visible notification.

Lock keys also shows if the numeric keypad button is active (it should be, unless you like the keypad being a clone of the cursor keys), as well as the [Scroll Lock key, which isn't used much nowadays. By right-clicking the applet's icon and selecting Preferences, you can control which keys are shown in the display.

Ubuntu is setup so that, if one user creates a file, all other users have read-only access to it (in other words, file permissions of -rw-r--r-- and folder permissions of drwxr-xr-x). To make any files or folders you create accessible only by yourself (-rw--and drwx—), open your .profile file in

Gedit (gedit -/.profile) and remove the hash alongside umask=022. Then change the entire line to read umask=077 (that's zero, seven, seven). Save the file, and log out and back in again.

You can also alter the permissions on folders and files you've already created. To protect filename.doc, for example, you would type chmod go-rw filename.doc. This will remove (-) read and write (rw) permissions from members of your group (g) and others not in your group (o). To change permissions on a folder and everything in it, you could type something like chmod -R go-rwx Documents/, which will change your Documents folder—and all files/folders within it—so that only you can access them.

Resist the temptation to change permissions on your entire /home folder. Various pieces of software store configuration files there and sometimes run with unique ownerships, so changing permissions could cause real problems. Many folders holding personal information, such as your Firefox browsing history, already have restrictive permissions set so that only you can access them.

Was this article helpful?

0 0

Post a comment