Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Linux Timesaving Techniques For Dummies.pdf
Скачиваний:
59
Добавлен:
15.03.2015
Размер:
15.98 Mб
Скачать

298 Technique 41: Keeping an Eye on Your System

The severity component indicates the importance of the message. Linux supports the severities shown in Table 41-2.

TABLE 41-2: SYSLOG SEVERITIES

Severity

Description

Panic (or Emerg)

Serious problems — break out

 

the fire extinguisher.

Alert

Something’s about to go wrong

 

unless you do something to

 

stop it.

Crit

Critical condition encountered

 

(something like “out of disk

 

space” or “out of memory”).

Error

An error has occurred.

Warning

Something went wrong, but you

 

can continue to do whatever you

 

were doing.

Notice

Things are okay, but here’s

 

something you might like to

 

know.

Info

Things are okay, but you

 

probably won’t be interested

 

in this.

Debug

Debug messages intended for

 

propeller-heads.

 

 

Keeping an Eye on Resources with KDE System Guard

KDE System Guard is a customizable system monitor capable of monitoring not only your local system, but remote systems as well. The information displays in several easy-to-read formats that make it a snap to see where your performance bottlenecks are. KDE System Guard includes a task manager that tells you with a quick glance who’s using system resources. It also gives you easy click-and-kill access to runaway processes.

If you’re using GNOME, KDE System Guard isn’t available. Instead, GNOME includes a much simpler tool called System Monitor. To run System Monitor, open the Main Menu and choose System Tools System Monitor.

Finding and killing runaway processes

KDE System Guard makes managing processes easy. Here’s how to get started:

1. To start KDE System Guard in Fedora, open the Main Menu and choose System Tools More System Tools KDE System Guard.

If you’re using Mandrake, open the Main Menu and choose System Monitoring KDE System Guard.

From SuSE, open the Main Menu and choose System Monitor KDE System Guard.

The KDE System Guard window appears, as shown in Figure 41-13.

Figure 41-13: The KDE System Guard main window.

2.Click the Process Table tab see a list of the processes running on your system and some of their more important properties.

By default, you see all processes currently

running on your system, but you can limit

Keeping an Eye on Resources with KDE System Guard 299

the processes with the drop-down list box at the bottom of the screen (see Figure 41-14).

Figure 41-14: The process selection drop-down list box.

3.Choose one of the four options in the dropdown list box to limit the view:

All Processes shows all processes currently running on the system.

System Processes shows all processes that are currently running that are owned by

root — processes like services and watchdog programs.

User Processes shows all processes that are owned by any user on the system.

Own Processes shows the processes that are owned by the user logged in and running KDE System Guard.

4.Click the Refresh button to update the selected worksheet.

By default, the worksheet updates every two seconds, but you can change the update interval by choosing Edit Work Sheet Properties from the menu bar. The Worksheet Properties dialog opens (see Figure 41-15). To change the update interval, just use the spin control or type in a new number, and then click OK.

Figure 41-15: The Worksheet Properties dialog.

5.If you see a runaway process, highlight the process name in the list and click Kill to stop the process.

A confirmation dialog appears so you can change your mind (see Figure 41-16).

Figure 41-16: Confirmation of a process kill.

6.Click the Kill button in the warning dialog to stop the process.

In a second or two, the process table updates, and you’ll see that the victim process is gone.

7.Back in the Process Table tab, check the Tree box to display the parent-child relationships among processes.

If you have multiple copies of the same program running, use the tree format to tell the child processes apart.

300 Technique 41: Keeping an Eye on Your System

Prioritizing processes to smooth a network bottleneck

You can make users play nice by “renicing” the processes that aren’t quite as important as others. (Each process has a nice value that controls its priority in relation to other processes.) To change a program’s priority, follow these steps:

1. Open a terminal window and give yourself superuser privileges with the su command.

2. Type ksysguard at the command line to open

System Guard.

3. Right-click on a process name in the list, and choose Renice Process from the pop-up menu.

4. Use the bar control to raise or lower the process priority and click OK to confirm the change.

In a system with cramped resources, lowering process priorities can give you a short-term solution to a performance bind. In the longrun, you’ll probably want to upgrade your system because lowering someone’s priority is a good way to make enemies (if they figure out who did it).

Watching your system load

KDE System Guard comes with a built-in worksheet that displays the current system load in an easy-to- understand format. With a quick look, you can see a graph showing CPU Load, Physical Memory, Load Average, and Swap Memory. To use the System Load tool, follow these steps:

1. In the KDE System Guard window, choose the

System Load tab to open the system monitors, shown in Figure 41-17.

2. You can add sensors to this display by choosing Edit Work Sheet Properties.

Each sensor monitors some aspect of your system. For example, the Battery Charge sensor

measures the amount of juice left in your battery (assuming that you’re running Linux on a laptop) and the Load Average sensors measure the overall system load for that past minute, five minutes, or 15 minutes (depending on which Load Average sensor you choose).

Figure 41-17: The System Load worksheet.

3.In the Worksheet Properties dialog that appears, add rows or columns to create empty slots in the worksheet for the sensors (see Figure 41-18). Then click OK to close the dialog.

• Figure 41-18: Add sensors to new fields.

Keeping an Eye on Resources with KDE System Guard 301

4. Expand the tree control in the Sensor Browser panel on the left to see the list of available sensors.

5. To add a sensor, drag the sensor name from the tree and drop it on a Drop Sensor Here label (in the worksheet).

A pop-up menu appears showing the sensor display options, as shown in Figure 41-19.

Pop–up menu

• Figure 41-19: Sensor display options.

The sensor types are as follows:

Signal Plotter: This is the default display type for the System Load window.

Multimeter: This is a large digital display.

BarGraph: Drag multiple sensors into one window to show value comparisons.

SensorLogger: Create custom logs for your system resources.

6.Choose a sensor type from the pop-up menu.

The new sensor is added to the display grid.

7.To change the properties of a sensor, right-click on the sensor and choose Properties from the pop-up menu.

The Settings window appears, as shown in Figure 41-20. The Settings window varies with the sensor type. A quick look through the tabs will help you decide on the customizations you’d like for your display.

• Figure 41-20: The Settings window for a Signal Plotter sensor type.

A few sensors can display the status of multiple objects in table form. For example, the Partition Usage Table Sensor displays the free space available on all disk partitions. That’s a handy way to view a group of resources quickly.

After you set up the sensors and preferences you need, you can monitor your system for performance or resource bottlenecks.

Creating a new worksheet

If you’d like to create a new worksheet instead of revamping the System Load page, or if you want to create multiple worksheets to display the various system attributes, it’s easy to do with KDE System Guard. Here’s how:

1. Click the New icon on the toolbar.

The Worksheet Properties dialog opens.

Соседние файлы в предмете Операционные системы