Certification Summary


Before you can control a process by issuing a control command, you will need to obtain some information about the process, such as process ID, which you do by viewing the process. Therefore, process management begins with viewing the processes on the system, which can be accomplished with the ps, pgrep, and prstat commands. The ps command displays information about the active processes on the system, and the pgrep command can be used to display only those processes that match specific criteria. If you want the displayed process information updated at a specified interval, use the prstat command. You can use the pgrep command to find out the process ID and use the process ID in the kill command to send the process a signal; alternatively, you can accomplish both tasks with one command: pkill.

You can schedule processes that need to be run repeatedly by making their entries in the /var/spool/cron/crontab directory files, called crontab files. You can manage these files by using the crontab command. You can schedule processes that need to be run only once by making their entries in the /var/spool/cron/atjobs directory files, called atjobs files. You can manage these files by using the at command interactively. The access to the crontab command can be controlled by creating the cron.deny and cron.allow files.

You can view the status of the LP print service on Solaris by using the lpstat command, and you can configure the service by using the lpadmin command. A component of the LP print service, the lpsched, manages print requests on the local system. By default, each user on the system has access to the printers on the system. You can control that access by using the users.allow and users.deny files.

Printers are important resources on the system, and the LP print service provides access to them. However, the most important resource that needs to be protected in case of a disaster or a crash is the data on the disks. The solution to a data loss resulting from a disaster or a disk crash is backup and recovery. This is the subject we explore in the next chapter.

Inside the Exam

Comprehend

  • When the cron.allow file exists, the cron.deny file is not even checked, so its content plays no role in determining access to the crontab command.

  • When the users.allow file exists, the users.deny file is ignored to check access to printers.

  • You can first find a process and then send it a signal by using the /usr/bin/kill command, or you can use the pkill command, which will find the process for you that matches a criteria and send it a signal.

Look Out

  • The value R for the S (state) field in the output of the ps command does not mean the process is running. It means the process is runnable —it is in the queue and ready for running.

  • Use the signal 9 (kill -9) with caution, because it kills the process without giving it a chance to clean up after itself. It may cause data loss or data corruption.

  • When neither the cron.deny file nor the cron.allow file exists, nobody except the superuser has access to the crontab command. In contrast, when neither the users.allow nor the users.deny file exists, all users have access to the printer on the system.

  • When the print scheduler is restarted, a partly finished print job is printed in its entirety.

Memorize

  • The ps and pgrep commands take a snapshot, whereas the prstat command refreshes its output at a specified interval.

  • The default signal sent by kill and pkill is -15 (i.e., terminate the process and give it a chance to clean up after itself).

  • The print scheduler, lpsched, is automatically started when you add a printer to the system with the lpadmin command.

  • You can use the cancel command to cancel a print request waiting to be printed or currently being printed.

  • By default, all users have access to a printer on the system they are logged on to.




Sun Certified System Administrator for Solaris 10 Study Guide Exams 310-XXX & 310-XXX
Sun Certified System Administrator for Solaris 10 Study Guide Exams 310-XXX & 310-XXX
ISBN: N/A
EAN: N/A
Year: 2005
Pages: 168

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net