1 / 30

Printer and log file administration

Printer and log file administration. Unit objectives Set up, manage, and use printers Understand the purpose of log files and how they’re administered. Topic A: Printer administration. Common Unix Printing System (CUPS). Creates Print Job File Several files Command output. continued.

shakti
Télécharger la présentation

Printer and log file administration

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Printer and log file administration Unit objectives • Set up, manage, and use printers • Understand the purpose of log files and how they’re administered

  2. Topic A: Printer administration

  3. Common Unix Printing System (CUPS) • Creates Print Job • File • Several files • Command output continued

  4. Common Unix Printing System (CUPS) • Print job • The lp command • specifies what to print • Common Unix Printing System (CUPS) • assigns print job a unique print job ID • places a copy of the print job into the print queue, provided the printer is accepting requests continued

  5. Common Unix Printing System (CUPS) • Once in queue, job is ready for printing • with printer disabled, cups prints an error message, leaves job in queue • with printer enabled, cups sends job to printer, deletes job from queue continued

  6. Printer administration, continued • Spooling • Accepting jobs into the print queue • /var/spool/cups • Printing • Sending jobs from queue to printer

  7. The print process

  8. Printer commands • See details about line printing system • lpstat –t • See list of all printers on system and status • Status commands • accept printer1 • Set printer1 to accept jobs • disable printer1 • set printer1 to not print • Jobs will go into queue, but not print • -r will sent message to users

  9. LPD Printing System • Older systems still use Line Printing Daemon (LPD) • Commands • lpr- print documents to print queue (like lp) • lpc-view status of printers • lpq-view print jobs in a queue • lprm-remove jobs, like cancel command

  10. Managing print jobs • lp –d printer1 /etc/inittab • Sends a copy of the /etc/inittab file to printer1 • -d lets you specify printer name • lpoptions command • lpoptions –d <printername> • Stored in /etc/cups/lpoptions file • Also PRINTER or LPDEST variables

  11. lp command options • See page 11-7 • Can send multiple files • Can pipe to lp command • lpstat • See print jobs you have queued

  12. Managing print jobs • Removing jobs • cancel p1-1 p1-2 • Use the cancel command with print job IDs • Restricting usage • lpadmin –u allow:root, user1 –u deny:all –d printer1 • Deny everyone but root and user1

  13. Configuring printers • cups daemon (cupsd) • Core printing component • Accepts jobs to queue and sends them to the printer • /etc/cups/cupsd.conf • Contains settings for cupsd • /etc/cups/printers.conf • Contains configuration for each printer • NOTE: • Printers are physical devices on the network or attached to a machine. However, we often refer to the queue name as the printer and vice versa. However, a printer can have multiple queues

  14. Printer Configuration Tool

  15. Creating a print queue

  16. Selecting a queue type

  17. Creating a network queue

  18. Selecting the printer model

  19. Post Creation • Print a test file • Settings can be edited through GUI

  20. Sharing a printer

  21. Topic B: Log file administration

  22. What is a log file • Log files • Contain information about the performance of system daemons • Appended by system daemons • /var/log • The directory that contains most log files

  23. Log files found in /var/log

  24. The system log daemon • System log daemon (syslogd) • Logs system events to various log files via information stored in /etc/syslog.conf • Creates /dev/log for daemons to write to • Syslog.conf format • facility.priority /var/log/logfile

  25. The system log daemon • Facility • Refers to the area of the system from which information is gathered • Priority • Importance of system information when logging system events

  26. Facilities used by system log daemon

  27. Priorities used by log daemon

  28. Managing log files • Don’t remove log files • But they do get big! Make a copy, or printout • Use a redirect to empty them out • logrotate command • Used to rotate log files • /etc/logrotate.conf • Used by the logrotate utility to specify rotation parameters for log files • How many logfiles…

  29. Managing log files • /etc/logrotate.d • More detailed log rotation information • logrotate is usually run by cron • Can manually run • logrotate logrotate.conf

  30. Unit summary • Set up, managed, and used printers • Learned about log files and how they are administered

More Related