Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Linux+ Certification Bible.pdf
Скачиваний:
46
Добавлен:
15.03.2015
Размер:
3.78 Mб
Скачать

Chapter 16 Linux Troubleshooting Basics 491

concept of Linux combined with its emphasis on sharing knowledge forms the basis of this openness between users; you will constantly be sharing knowledge with your fellow Linux users and administrators. Communication with your friends and co-workers through e-mail and instant messaging programs offer another great resource for you to use when troubleshooting a problem.

System Log Files

6.7 Inspect and determine cause of errors from system log files

Most system processes and applications keep a running log file. When examining a Linux problem, check these log files first to define the actual problem. Log file

entries can be very verbose, but can instantly point you in the right direction when you’re trying to narrow down the source of a problem.

The type of problem that you are having can guide you to which log file you should check first. For example, if you are having general system problems or if you are having issues with main system services, such as DNS or NFS, you should check the main system log file, which is located in /var/log/messages.

/var/log/messages is the most important log file in your system. Check it frequently for error and other informative messages.

You may also find that odd server problems may be the result of something very simple, such as low disk space, which are indicated in /var/log/messages with an entry similar to the following:

Mar 22 14:41:16 system kernel: /home is out of disk space

Log files for an application may also be found in the /var/log directory, but they can often be located with the main program files themselves, such as

/usr/local/apache.

Other important logs include:

/var/log/dmesg: A log file that tracks kernel boot messages

/var/log/boot.log: A log file that contains service and device status at boot time

/var/log/lastlog: A log file that shows the last person who logged into the system

var/log/maillog: A log file of sendmail activity

/var/log/cron: A log file of activity performed by the cron daemon

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