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

Chapter 16 Study Guide 503

3.Take a look at the last few lines of the /var/log/messages file using the tail command:

tail /var/log/messages

You should see a message indicating that crond was stopped. Check the running processes to ensure this by using the following command:

ps -ef | grep crond

4.Open another console window, and watch the /var/log/message file in real time:

tail -f /var/log/messages

5. Now, start the crond process by using its startup script in /etc/rc.d/init.d:

./crond start

You should see a message show up in the /var/log/messages file that crond was started.

6. Check to see if crond is running by using the following command:

ps -ef | grep crond

Answers to Chapter Questions

Chapter Pre-test

1.You can find the MAN pages directly on your system by simply typing the word man and the command that you want to look up.

2.The locate utility is used to find the location of a specified program.

3.By using the tail command, you can watch the log file in real-time, and see entries as they happen.

4.Most hardware problems are detected at boot time by the BIOS.

5.The main system kernel log file is /var/log/messages.

6.Most system configuration files are located in /etc.

7.You must first examine the symptoms of the problem to understand where to begin looking for a solution.

8.The pipe “|” option is used to send the output of one command to another one.

9.The best place to look for Linux documentation is the Linux Documentation Project.

10.You can examine current running processes by using the ps -ef command.

504 Chapter 16 Study Guide

Assessment Questions

1.D. The service, even though it is currently running, may be in a frozen state, and will need to be restarted. For review, see the “Process Configuration and Management” section.

2.B. Because the system has a problem even before the operating system is loaded, the problem is hardware-based, and is most likely caused by a problem with the system board. For review, see the “Methodology and Best Practices” section.

3.A. Because the area on the disk that stores the operating system can’t be found, the problem must lie with the hard disk. This can also indicate a problem with the master boot record of the drive. For review, see the “Methodology and Best Practices” section.

4.D. The locate command is able to find the location of the file very quickly. It is most helpful if you know the full name of the file that you are looking for. For review, see the “Tools for Log Files” section.

5.C. The general log file for the Linux system is /var/log/messages. For review, see the “System Log Files” section.

6.A. The quickest way to find out information on a system command is to use the internal MAN pages, which give you a full description of the command, and information on how to use all of its options. For review, see the “Troubleshooting Resources” section.

7.C. By outputting the log file through the grep command, a user can specify a certain keyword to look for, which then displays all instances of that word in the log file. This greatly reduces the time required for searching through a log file for relevant information. For review, see the “Tools for Log Files” section.

8.B. To see a file being updated in real time, you can use the tail -f command, which stands for “follow.” This way, you don’t have to keep opening and closing the file to see any changes. For review, see the “Tools for Log Files” section.

9.B. In order for the process to see the new configuration, it has to be restarted. For review, see the “Process Configuration and Management” section.

10.D. Because the installation program is specific to that distribution, it is best to visit that distribution’s home page for information on the installation. The other options may only give you general Linux support. For review, see the “Troubleshooting Resources” section.

11.A. Joining a local Linux Users Group allows you to interact with people within your city or region on any number of Linux issues. User groups are a great place to exchange information, and to get questions and answers on your system. For review, see the “Troubleshooting Resources” section.

12.D. By sending the output of the cat command to the more command, you can read the log file screen-by-screen. Thus, you can see the entire file from start to finish while using the spacebar to move ahead in the file. For review, see the “Tools for Log Files” section.

Chapter 16 Study Guide 505

13.C. Because the service seems to be working properly and no one else is having any problems, it is most likely that the user is not using her application correctly. For review, see the “Methodology and Best Practices” section.

14.A. To quickly narrow down your problem, you should initially determine whether the problem is hardwareor software-related. This puts you in the right direction from the beginning. For review, see the “Methodology and Best Practices” section.

15.B. By checking the running processes, you can quickly ascertain whether the suspected service is running or not. Even though the service may be running, it may be in a frozen state, so you should next test the service for functionality. For review, see the “Process Configuration and Management” section.

16.B. The command to show the first 100 lines of a file is head -100 filename. The tail command shows the last line of a filename, while grep searches for a specified search string within a file. For review, see the “Tools for Log Files” section.

17.D. The most overlooked item is often the item that can cause a problem. In this case, the user’s caps lock key was on, thus causing them to input their password incorrectly (Linux is case-sensitive). For review, see the “Methodology and Best Practices” section.

18.A. In this case (a broad topic like setting up networking), the best resource is a HOWTO document on the topic of networking. For review, see the “Troubleshooting Resources” section.

19.C. In this case, the most likely cause of the problem is that the /home partition is out of space, which is where the user is most likely trying to save his file. For review, see the “System Log Files” section.

20.D. Bootup kernel messages can be viewed in the /var/log/dmesg file. For review, see the “System Log Files” section.

Scenarios

1.You must begin with the obvious and most simple scenarios first, such as going to the user’s desk and trying to recreate the problem. Can the user access other files? Is the user logged in as themselves? Should the user even have rights to that file?

If this doesn’t work, you must move up the chain of systems from the most simple to the complex. Examine the user’s networking settings to make sure that they are correct. Try to access the same files from another point on the network.

Then, check your server for the problem. Most likely, the user doesn’t have permission to the file in question.

506 Chapter 16 Study Guide

2.Because the Web server was recently upgraded, it may be easy to assume that something is wrong with the software configuration. However, always start with the simplest and most obvious things first.

Check the log file of the Web server, and note any warning or error messages. This should give you a quick clue as to the location of the problem.

Judging by the log file, you can then narrow down the exact configuration issue that is affecting the server. You find that a typographical error has occurred in the configuration.

Using a text editor, you fix the problem. However, it won’t go into affect until you stop and restart the Web server process.

First, set up a console to actively view your application log file by using the following command:

tail -f /var/log/httpd/httpd.log

Then, stop and restart the Web server process, by paying close attention to any error messages that may appear in the log file.

Troubleshooting the

Boot Process

EXAM OBJECTIVES

6.5 Use system status tools to examine system resources and statuses (e.g., fsck, setserial)

6.6 Use systems boot disk(s) and root disk on workstation and server to diagnose and rescue file system

6.8 Use disk utilities to solve file system problems (e.g., mount, umount)

6.11 Take appropriate action on boot errors (e.g., LILO, bootstrap)

17C H A P T E R

508

Part VI Troubleshooting and Maintaining System Hardware

CHAPTER PRE-TEST

1.Why should you always create a system rescue boot disk?

2.What is the purpose of the fsck utility?

3.What command can you use to examine current system resources usage?

4.What sort of utilities should be saved on a boot disk?

5.Why would you want to connect to your server using a terminal connection?

6.What command can you use to check current running processes?

7.What is the purpose of LILO?

8.What command can you use to format the master boot record?

9.What log can you check to analyze boot time errors?

10.What is the purpose of the setserial command?

Answers to these questions can be found at the end of the chapter.

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