The following questions will help you measure your understanding of the material presented in this chapter. Read all the choices carefully because there might be more than one correct answer. Choose all correct answers for each question.
1. | Which of the following commands can you use to display the process information that will be updated periodically?
|
|
2. | In the output of the ps command the S field for a running process will display which of the following values?
|
|
3. | Which of the following commands will display all the processes that go in the process argument string?
|
|
4. | Which of the following commands will kill a process with process ID 24387 and process name pass 2?
|
|
5. | Which of the following commands or actions will kill the process with process ID 24387 and let it clean up after itself?
|
|
6. | Which of the following commands can you use to schedule a command to be executed repeatedly?
|
|
7. | Which of the following entries in a crontab file instructs the system to execute the diskchecker script at 9:10 A.M. each Sunday and Tuesday?
|
|
8. | When you installed the SunOS software, you deleted the cron.deny file that the system created, and you did not create a cron.allow file. Which of the following is true?
|
|
9. | Which of the following is a correct statement? (Choose all that apply.)
|
|
10. | How do you configure the print service on Solaris? (Choose all that apply.)
|
|
11. | The CEO of your company complains that she cannot print a web page. You suspect a problem with the print server and want to ensure that the listener service for the web print requests is running. What is the name of this service?
|
|
12. | You discover that the print scheduler, lpsched, has stopped on your system. Which SMF command would you issue to restart the scheduler?
|
|
Answers
1. | þ D. The prstat command refreshes the output at a specified interval. ý A and B are incorrect because the pgrep and ps commands take a snapshot of the system and do not update the output. C is incorrect because plist is not a command. |
2. | þ A. The state O indicates that the process is running. ý B is incorrect because R means the process is runnable —that is, in the queue for running. C is incorrect because S means the process is sleeping. D and E are incorrect because there are no state values A and running. |
3. | þ A and B. The ps command with -f option generates the full listing of the processes, and the grep command selects the process from the output whose argument string contains the string go. The pgrep command accomplishes the same thing. ý B is incorrect because R means the process is runnable—that is, in the queue for running. C and D are incorrect because the ps and prstat commands are being used with the wrong syntax. |
4. | þ A and D. You use the process ID in the kill command and the process name in the pkill command. ý B and C are incorrect because you use the process ID in the kill command and the process name in the pkill command. |
5. | þ B. Signal 15 kills the process and gives it a chance to clean up after itself. ý A is incorrect because signal 9 kills the process without giving it a chance to clean up after itself. C is incorrect because it is the wrong command syntax. D is incorrect because pressing CTRL-C will interrupt the process but will not kill it. |
6. | þ A. The crontab command is used to edit a crontab file in which you can enter a command that you want to execute repeatedly. ý B is incorrect because the at command is used to schedule a command to be executed at a future time only once. C and D are incorrect because there are no such commands as cron or run to schedule a process. |
7. | þ B. This is the correct use of the command. This first field is minute, the second field is hour, and the last field represents days: 0 for Sunday and 2 for Tuesday. ý A is; incorrect because the first two fields have the wrong values for the minute and the hour, and the last field has the value in the wrong format. C is incorrect because it will schedule the job for Monday and Wednesday. D is incorrect because it will schedule the job at 10:09 A.M., not 9:10 A.M. |
8. | þ B. When neither the cron.allow nor the cron.deny file exists, only the superuser has access to the crontab command. ý A is incorrect because no user except the superuser ever has access to all the crontab files. You need to be a superuser to access other users' crontab files. C and D are incorrect because when neither cron.allow nor cron.deny exists, no user except the superuser has access to any crontab file. |
9. | þ A and C. When neither the cron.allow nor the cron.deny file exists, only the superuser has access to the crontab command, and the cron.deny file is created during installation. ý B is incorrect because each user has access to printers on the system if neither the users.allow nor the users.deny file exists. D is incorrect because only the cron.deny file, not the cron.allow file, is created during the Solaris OS software installation. |
10. | þ B. You use the lpadmin command to configure the LP print service. ý A is incorrect because you should not edit the configuration files directly. C is incorrect because the lpsched is the scheduler that manages the print requests. D is incorrect because there is no such command as printerconfig to configure the LP print service. |
11. | þ B. The name of the service that listens to the print related HTTP requests is svc:/application/print/ipp-listener. ý A, C, and D are all incorrect because there are no such services as http-listener, ippd, and http-listen. |
12. | þ D. The SMF service manages the print scheduler under the FMRI svc:/application /print/server. Therefore the svcadm enable svc:/application/print/server command will start the print scheduler. ý A is incorrect because svcs is the SMF command to determine the status of a service. B is incorrect because the correct argument in the command is enable, not start. C is incorrect because the FMRI contains the word server, not lpsched. |