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

290 Technique 40: Taking Care of New (And Old) Users

Filtering users and groups

The SuSE User and Group Administration tool enables you to filter the users and groups that you see while you’re adding and modifying accounts. By default, YaST displays local users. A local user is a user whose numeric user ID is in the range 500 through 60,000 (inclusive). A system user is a user whose numeric user ID is less than 500 or greater than 60,000. User root is a system account (root’s

uid is 0). SuSE Linux defines a number of other system accounts such as bin (user bin owns most of the programs in the /bin directory), daemon (used to run many of the background daemons on a typical Linux system), and mail (user mail owns most components of the e-mail processing system).

To switch between local users (or local groups) and system users (or groups), click Set Filter and select the filter you want to use.

41 Keeping an Eye on Your System

Technique

Save Time By

Watching the activity in your system logs

Customizing your log files

Customizing system notifications for better alerts

Creating custom resource worksheets with KDE System Guard

Linux log files can provide all sorts of information about your system. In this technique, we show you how to collect and customize that information. We also introduce you to some handy tools that help

you monitor your log files and system resources.

The system log viewer is an easy way to review all your log files at once. An easy graphical interface allows you quick click-and-view access to all the logs, in one place. You can also customize the displays to call your attention to problems without having to search through long log files. The filter mechanism built into the system log viewer enables you to quickly and easily find problems related to device failures or programs that just won’t start.

The syslogd daemon is responsible for deciding what gets written to the log files. The daemon comes preconfigured with a standard set of instructions, but you can customize the rules in the /etc/syslog.conf file to make the daemon more sensitive to problems. We show you how in this technique.

KDE System Guard is a great graphical tool that creates custom system and network resource-usage worksheets. You can arrange sensors that display information from your computer and other machines on your network to compare system resources in plotted charts and bar graphs. You can also use the process table to manage tasks — kill off runaway programs or change the scheduling priority of processes as they execute. You can also tell at a glance who’s running what tasks and who’s hogging your resources.

This technique is all about controlling information. Just like a detective, you need sources. The great thing about Linux’s information resources is you don’t have to pay them off for information. Just keep an eye on them, and they’ll tell you what you need to know about the state of your computer.

292 Technique 41: Keeping an Eye on Your System

Keeping an Eye on the

System Logs

Log files contain information about the activities on your system. Information about various system processes is recorded into log files. The information in your log files can provide handy clues when things go wrong.

System logs contain a ton of information, but they can be a bit clunky to use. The system log viewer is a great tool to access your information quickly and conveniently, without the clunk.

Graphical system log viewers are included in most Linux distributions, and include handy search features and customizable warnings and alerts. The default log viewers included with Fedora and Mandrake are very similar — we’ve grouped the instructions for their tools together in the next section, “Viewing and filtering log files with Fedora and Mandrake.” The log viewer included with SuSE is a bit more primitive, but it still renders a lot of insight into the activity on your system. You can find instructions for using the SuSE default log viewer later in this technique in the section, “Viewing your log files from SuSE.”

Viewing and filtering log files with

Fedora and Mandrake

If you’re using Fedora or Mandrake, and want to see what’s going on in your log files with the System Log viewer, follow these steps:

1. If you’re using Fedora, open the Main Menu and choose System Tools System Logs. On

Mandrake, open the Main Menu and choose System Monitoring System Log.

2. Enter the superuser password (if prompted to do so).

The System Logs window opens. The left panel displays a list of log names.

3. Select a log file to view details of the log in the

• Figure 41-1: The Kernel Startup Log file.

You may have more log files or fewer (and some of the log files may be empty). Use the scroll bars to scan the displayed log file or use the Filter feature to find specific messages.

Follow these steps to use the Filter tool:

1. Enter the keywords in the Filter For field and click the Filter button.

Only those lines that include the keywords are displayed, as shown in Figure 41-2.

window on the right, as shown in Figure 41-1.

• Figure 41-2: A filtered result set.

Keeping an Eye on the System Logs 293

Unfortunately, the Filter tool is case-sensitive; error and Error are two different words as far as the viewer is concerned.

2. To show the complete log file again, click the

Reset button.

Adding and deleting log files from the viewer

The log viewer lets you keep your most commonly viewed log files ready and waiting for you. You can add more log files to the display or remove log files that you’re not interested in. The log viewer remembers your preferences from session to session. To customize the set of log files displayed, follow these steps:

1. Choose Edit Preferences from the log viewer’s menu bar.

The Preferences dialog opens, as shown in Figure 41-3. It has three tabs: Log Files, Alerts, and Warnings.

Figure 41-3: The Preferences dialog.

2.If you want, set the refresh rate on the Log Files tab.

The refresh rate determines how often the viewer rereads the log files to display new messages. The default refresh rate is every 30 seconds; use the controls next to the field to adjust it.

Pressing Ctrl-R refreshes the logs immediately from any display in the System Log viewer.

3. To add a log file, click the Add button on the

Log Files tab.

The New Location dialog appears, as shown in Figure 41-4.

• Figure 41-4: Add a new log file with the New Location dialog.

4. Fill in the dialog and then click OK to add an existing log to the list.

The System Log viewer is a viewer only; the log file must exist for it to show up in the viewer.

5. To change the pathname for a log file that’s currently in the list, highlight the log’s filename and click Edit.

You’ll rarely need to change the pathname for an existing log file unless you’ve changed the tool that creates the log.

The Log File Locations dialog opens, as shown in Figure 41-5.

6. Use the Browse button to find the log file (or just type in the name if you know it) and then click OK to save your new location.

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