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

294 Technique 41: Keeping an Eye on Your System

If you want to delete a log file from the viewer’s list, select the file and click the Delete button. This doesn’t actually delete the log file; it just removes the log file from the list of log files you see in the viewer.

any of the words listed on the Warnings tab (see Figure 41-7), it displays a warning icon (a yellow triangle with an ! in it) next to the message.

• Figure 41-5: The Log File Locations editor.

Setting up alerts and warnings

When you’re browsing through a long log file (and log files can get very long), it’s easy to miss important information amidst all of the trivia. The log viewer can search for keywords in a log file and highlight any entries that contain those keywords. By default, the log viewer will search for words like “fail,” “denied,” and “error” and display a bright red stop sign when it finds one (the red stop sign is called an alert). More innocuous words like “warning” are flagged with a yellow triangle (the yellow triangle is a warning). You can adjust the alert and warning keywords to fit your preferences.

To set up alerts, choose File Preferences in the log viewer. Then click the Alerts tab to open a dialog with a list of keywords, as shown in Figure 41-6.

Whenever the log viewer sees a message that contains one of the words listed, it displays an alert icon (a red stop sign, with an x in it) next to the message. Use the Add and Delete buttons to customize the keyword list.

To set up warnings, choose File Preferences in

the System Log viewer and then select the Warnings tab. If the log viewer sees a message that contains

• Figure 41-6: The Alerts keyword list.

• Figure 41-7: The Warnings keyword list.

Keeping an Eye on the System Logs 295

Use the Add and Delete buttons to customize the Warnings keyword list. The alert and warning icons make problems easy to spot in a crowded log file.

Viewing your log files from SuSE

The default log viewer included with SuSE (GNOME System Log Viewer) doesn’t have as many bells and whistles as the Fedora and Mandrake versions do, but you can still save time while gleaning information from your log files with its help. To monitor your log files from SuSE Linux, follow these steps:

1. Open the Main Menu and choose System Monitor System Log.

The GNOME System Log Viewer opens, displaying the contents of the /var/log/messages file (see Figure 41-8).

• Figure 41-8: The GNOME System Log Viewer.

Use the arrow to the left of the date to open and close the tree control and display the entries for that day.

2. Double-click an item to open a detailed view of the log entry (see Figure 41-9).

• Figure 41-9: Details of a log entry.

Monitoring your log files from SuSE

You can also use the System Log Viewer to monitor the activity in a log file. To monitor the activity in a log file, follow these steps:

1. Choose File Monitor.

The Monitor Options dialog opens (see

Figure 41-10).

Figure 41-10: The Monitor Options dialog.

2.Highlight a log file in the left panel and click the Add button.

The log file is moved to the right panel (see Figure 41-11).

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