SlideShare uma empresa Scribd logo
1 de 30
Managing Printers
Chapter 14
Chapter Objectives
• Understand printing terminology and concepts.
• Understand print server requirements and configuration.
• Understand print client requirements and configuration.
• Understand how to configure homogeneous printing.
• Understand how to configure heterogeneous printing.
Printing
• Printers
– Managing printing can be quickly summarized in the words of
Calvin (of Calvin and Hobbes):
EWWWWWW,
YUCK,
GROSS!
Printing
• Printing Overview (in a perfect world)
– User creates file, wants to print it.
– User calls system utility (lp, lpr, print) to print out the file.
– The utility sends the print job to a print spooler.
– The print spooler sends the job to the printer.
• Things rarely work this easily!
Printing
• Printers
– Local Vs Remote vs Network printers
• A local printer is one which is connected to “this” system.
– Most local printers are connected to a serial port
(RS/232, USB, or Firewire) or a parallel port.
– The local system needs to know the capabilities of the
printer, and which port the printer is connected to.
– If this system is a print spooler it also has to know what
other systems/users are allowed to send jobs to the
printer.
• A remote printer is a printer connected to “some other” system.
– The local system needs to know what system the
printer is on, how to send the print job to the other
system, and the name of the remote printer.
Printing
• Printers
– A network printer is a printer connected to the network,
but not necessarily associated with any system.
• Network printers include their own spooler, so
all systems on the network could print directly
to the printer.
–This can cause interesting problems.
–Usually have to load vendor drivers on every
system.
–New manufacturers often get this part wrong!
Printing
• Printer Setup (BSD)
– All printing processes are controlled by the lpd daemon, and
the lpr program.
• Lpr accepts input to be printed and places it in a spool directory.
– Lpr selects where to store the print job, based on the
name of the printer the user wants to send the job to.
The print spool area is in /var/spool
– Lpr creates two files in the spool directory for each job.
These files are named cfXXX and dfXXX where xxx is
the print job number.
– The control file (cfXXX) contains reference and
handling information for this print job.
Printing
• Printer Setup (BSD)
– The data file (dfXXX) contains the information to
be printed.
– Once lpr places files in the spool directory, it
notifies lpd that it needs to wake up and print the
job.
– Lpd “finds” the entry in the spool directory and
looks up the printer in the /etc/printcap database.
» The /etc/printcap file contains an entry for each printer
the system has access to.
» The printcap file specifies the printer capabilities, which
machine is the print spooler for the printer, the
names/locations of any filters to be used for this printer,
and line discipline information for this printer.
Printing
• Printer Setup (BSD)
– If printcap says the printer is local, lpd checks to
see if a daemon is running for that printer (or starts
a daemon if none is present).
– Once lpd knows the printer capabilities, and that
this machine is the spooler, lpd creates a series of
pipes between the spool file and the printer device
driver.
» If a filter program is specified for this printer, lpd places
connections to this filter between the print spool area and
the printer.
– The (filtered) data is sent to the printer by the
device driver.
Printing
• Printer Setup (BSD)
–If printcap says the printer is a network printer,
or a remote printer,
» lpd opens a connection to the remote
machine’s lpd, and transfers the data and
control files to the remote machine.
» lpd then deletes the local copies of these files.
Printing
lj254-grayscale:
:sh:
:ml=0:
:mx=0:
:sd=/var/spool/lpd/lj254-grayscale:
:af=/var/spool/lpd/lj254-grayscale/lj254-grayscale.acct:
:lp=|/usr/share/printconf/util/jetdirectprint:
:lpd_bounce=true:
:if=/usr/share/printconf/util/mf_wrapper:
lj254-color:
:sh:
:ml=0:
:mx=0:
:sd=/var/spool/lpd/lj254-color:
:af=/var/spool/lpd/lj254-color/lj254-color.acct:
:lp=|/usr/share/printconf/util/jetdirectprint:
:lpd_bounce=true:
:if=/usr/share/printconf/util/mf_wrapper:
Printing
• Printer and Print Job Management (BSD)
– The lpq command allows the users to view a list of
entries in the print queue. lpq -P name views the
entries for printer referred to as name.
– The lprm command allows a user to remove (their
own) jobs from the print queue.
– The lpc command allows the administrator to manage
the lpr/lpd environment.
• NOTE: lpc has the distinction of winning the “flakiest
program of the year” award five times in 15 years! Lpc
has not been improved (thereby getting it off the honors
list), instead other programs have been released which
are even flakier!
Printing
• Printer and Print Job Management (BSD)
• lpc allows the administrator to:
– enable or disable queuing for a printer.
– enable (start) or disable (stop) printing on a printer.
The abort command is a harsh version of stop
(current job is not completed).
– Declare the printer down or up (these commands
affect both spooling and printing).
– Remove all jobs from a printers queue (clean).
– Move a job to the top of the printers queue (topq).
– Manipulate lpd (restart).
– Get printer status information (status).
Printing
• System V Printing Overview
– User wants to print file and invokes the lp utility.
– lp takes the input and places in the appropriate spool directory.
– lpsched determines when and where the file should be printed.
– lpsched launches a filter to format the output and send it to the
printer.
– So far it looks just like lpr, right?
• The similarities end here!
Printing
• Printer Setup (System V)
• All of the print commands are different between BSD
and System V! To name a few:
– To print a file, use lp -d printer instead of lpr -P printer
– To remove a print job, use cancel instead of lprm
– To obtain print job status, use lpstat instead of lpq
• In order to remain consistently inconsistent, Sun
created lpr, lpc, and lpq programs under Solaris.
These programs are actually wrapper programs which
call the appropriate System V commands and pass
the data off to the lp system.
Printing
• Printer Setup (System V)
• System V printer software defines destinations and
classes of printers.
– A destination is (usually) a particular printer.
» A destination could also be a plain file that you want to
append text to.
» Because lp uses exclusive locks on the printer “device” ,
this capability allows several users to append text to a
file without concurrent access problems.
–A class of printers is a group of destinations.
» If you had two printers in a room, you could set them up
as a class, and lp would print jobs to both printers (the
first free printer gets the next job).
Printing
• System V Printing
– lp is the user-level print command.
– lp (sometimes) copies (and sometimes links) the data to the spool
directory files (/var/spool/lp/request/dest).
– Spool files are labeled xxxn where xxx varies depending on the
OS. n is the print job number.
– lpsched takes the files in the spool directories and sends them to
the appropriate device.
Printing
• Printer and Print Job Management (System V)
– System V UNIX uses the lpadmin command to setup and
administer printers.
– lpadmin is used to add/remove, start/stop, enable/disable printers
much like lpc did in the BSD model.
• Most System V systems want lpsched stopped before lpadmin
commands will work.
• As usual, Solaris had to be different. Solaris wants lpsched
running before lpadmin commands will work.
Printing
• Printer Setup (System V)
• lpadmin comes complete with a bag full of options:
-d dest (make this the default printer)
-x dest (remove printer dest)
-p printer (tells lpadmin which printer to work with)
-v device (append output for printer to file)
-i interface (interface program for printer)
-c class (add printer to class)
-r class (remove class)
-h (printer is hardwired)
-l (printer is login terminal)
-e dest (copy interface for printer to dest)
-m model (copy model for printer to dest)
Printing
• Printer and Print Job Management (System V)
• Once you add a printer with lpadmin, you have to tell the system
to accept requests, and enable printing for that printer.
• Solaris also requires you to set the type of input that can be sent
to a printer (any, simple, postscript, ...).
– This information is used to allow or deny printing based
on the value of the magic number for the data file.
– Programs like Mentor that define their own file types
cause problems with this model.
– You have to write a filter program to convert the “odd”
files into a known/allowed file type in order to print
them!
Printing
#!/bin/csh -f
lpsystem -t bsd -y "OIT print server" print.helios.nd.edu
lpsystem -t s5 -y "CSE print server” babbage.cse.nd.edu
lpadmin -p lp -s print.helios.nd.edu!cse326
lpadmin -p lw384 -s print.helios.nd.edu!cse384
lpadmin -p lj323 -s print.helios.nd.edu!cse323
lpadmin -p eng_lab6 -s print.helios.nd.edu
lpadmin -p eng_lab7 -s print.helios.nd.edu
lpadmin -p eng_color1 -s print.helios.nd.edu
foreach printer (lp eng_lab6 eng_lab7 eng_color1 lj323 lw384 )
lpadmin -p $printer -T unknown -I simple,postscript
enable $printer
accept $printer
end
lpadmin -d lp
Printing
• Printer and Print Job Management (System V)
– System V printing software is a suite of programs to accomplish
what BSD does with 3 programs:
• cancel - remove a print job
• accept/reject - tell system to accept/reject spooling jobs for
printer.
• enable/disable - tell the system to allow/reject printing on this
printer. Job is still spooled, just not printed.
• lpmove - move job to another printer.
• lpstat - get status of print job(s)
lpstat comes with a bag full of options:
-a [list] Reports which print destinations are accepting requests.
-c [list] Report status of all classes and their members.
-d Report status of the system default destination.
-f [list] [-l] Verify [list] the forms recognized by LP print service.
-o [list] Report status of output requests.
-p [list] [-D] [-l] Report status of printers [description] [capabilities].
-P Report paper types.
-r Report the status of the LP request scheduler.
-R Report the position of each job in the print queue.
-s Report a status summary.
-S [list] [-l] Verify the character sets / print wheels.
-t Report all status information.
-u [login-ID-list] Report status of output requests for users.
-v [list] Report printer names and devices.
Printing
• Printing Problems and Solutions
– The two basic print problems are:
• No Output:
– Check the obvious:
» Is the printer on?
» Does the printer have paper, ribbon, toner?
» Is the printer paper jammed?
» Will other jobs print?
– Check the lp user database.
– Determine if the print spooler can talk to the printer.
– Check the printer log files for clues.
Printing
• Printing Problems and Solutions
– Incorrect Output:
• Check the printcap file (or lpadmin) to see if the printer
type is correct.
• Make sure the line discipline matches the printer
settings.
• Look at the filter files and see that they do what you
think they are doing.
• Check the data file for odd character sequences.
Printing
• Printing Problems and Solutions
– Many times printing problems are due to software failures. These
failures fall into two general categories:
• System software failure.
– lpd/lpsched has crashed/burned.
» Use the appropriate commands to stop the lp system,
then restart the lp system and see if the problem
disappears.
» If stop/restart does not work, try removing the first entry
in the queue to see if lpd/lpsched work. If so, the
problem is in the data file.
Printing
• Printing Problems and Solutions
– Data file problems.
• Look for odd character sequences in the file.
• Try printing the file to another printer (same model if
possible).
• Check filter program operation.
• Check job types allowed on the printer.
Printing
• Windows
– Windows also knows about local and remote printers.
• Local printers are almost always connected to a parallel port.
• Local printers are added with the Printer Control Panel (Add
Printer Wizard).
• You will probably need the OS media to install print drivers.
• Remote printers are handled similarly to the UNIX remote
printers, but they require more setup:
– Use the Add Printer Wizard
– Add a printer port (defines remote spooler type)
– Add the printer like it was a local printer.
– If print server is a UNIX host, FIX the setup!
Printing
• Windows
– Windows/DOS wants to send printer control codes to the
printer. These codes are part of the language the printer
uses to speak to the PC.
• Unix does not like these control codes!
– On NT/Win2k systems (Win 95/98 have no TCP print
driver):
• Go to the Document Defaults for the printer.
• Select the Advanced options.
• Select the Postscript Options.
• Set the system so that it does NOT send control codes.
• Set the system so that it does NOT send control-D after
each print job.
Summary
• Configuring and managing printers should be easy.
– Unfortunately, printer setup and management is not as easy as it
should be.
– The lack of standards makes this task a problem for system
administrators.
– Homogeneous printing is the simplest case.
– Heterogeneous printing is the most problematic.
• System administrators should understand how to:
– Configure print services under Windows, BSD and System V.
– Troubleshoot printing problems.
– Configure filters and advanced printing options.

Mais conteúdo relacionado

Mais procurados

Chapter 13 - I/O Systems
Chapter 13 - I/O SystemsChapter 13 - I/O Systems
Chapter 13 - I/O SystemsWayne Jones Jnr
 
Writing Character driver (loadable module) in linux
Writing Character driver (loadable module) in linuxWriting Character driver (loadable module) in linux
Writing Character driver (loadable module) in linuxRajKumar Rampelli
 
DEVICE FILE AND INPUT OUTPUT SUBSYSTEMS MANAGEMENT
DEVICE FILE AND INPUT OUTPUT SUBSYSTEMS MANAGEMENTDEVICE FILE AND INPUT OUTPUT SUBSYSTEMS MANAGEMENT
DEVICE FILE AND INPUT OUTPUT SUBSYSTEMS MANAGEMENTJOLLUSUDARSHANREDDY
 
Basics of Linux Commands, Git and Github
Basics of Linux Commands, Git and GithubBasics of Linux Commands, Git and Github
Basics of Linux Commands, Git and GithubDevang Garach
 
101 1.3 runlevels , shutdown, and reboot
101 1.3 runlevels , shutdown, and reboot101 1.3 runlevels , shutdown, and reboot
101 1.3 runlevels , shutdown, and rebootAcácio Oliveira
 
Linuxdd[1]
Linuxdd[1]Linuxdd[1]
Linuxdd[1]mcganesh
 
Microx - A Unix like kernel for Embedded Systems written from scratch.
Microx - A Unix like kernel for Embedded Systems written from scratch.Microx - A Unix like kernel for Embedded Systems written from scratch.
Microx - A Unix like kernel for Embedded Systems written from scratch.Waqar Sheikh
 
LINUX System Call Quick Reference
LINUX System Call Quick ReferenceLINUX System Call Quick Reference
LINUX System Call Quick Referencewensheng wei
 
Processes in unix
Processes in unixProcesses in unix
Processes in unixmiau_max
 
Part 04 Creating a System Call in Linux
Part 04 Creating a System Call in LinuxPart 04 Creating a System Call in Linux
Part 04 Creating a System Call in LinuxTushar B Kute
 

Mais procurados (19)

Chapter 13 - I/O Systems
Chapter 13 - I/O SystemsChapter 13 - I/O Systems
Chapter 13 - I/O Systems
 
Ch07
Ch07Ch07
Ch07
 
Writing Character driver (loadable module) in linux
Writing Character driver (loadable module) in linuxWriting Character driver (loadable module) in linux
Writing Character driver (loadable module) in linux
 
Ch04
Ch04Ch04
Ch04
 
DEVICE FILE AND INPUT OUTPUT SUBSYSTEMS MANAGEMENT
DEVICE FILE AND INPUT OUTPUT SUBSYSTEMS MANAGEMENTDEVICE FILE AND INPUT OUTPUT SUBSYSTEMS MANAGEMENT
DEVICE FILE AND INPUT OUTPUT SUBSYSTEMS MANAGEMENT
 
Basics of Linux Commands, Git and Github
Basics of Linux Commands, Git and GithubBasics of Linux Commands, Git and Github
Basics of Linux Commands, Git and Github
 
Linux io
Linux ioLinux io
Linux io
 
101 1.3 runlevels , shutdown, and reboot
101 1.3 runlevels , shutdown, and reboot101 1.3 runlevels , shutdown, and reboot
101 1.3 runlevels , shutdown, and reboot
 
Linuxdd[1]
Linuxdd[1]Linuxdd[1]
Linuxdd[1]
 
101 1.1 hardware settings
101 1.1 hardware settings101 1.1 hardware settings
101 1.1 hardware settings
 
Chapter 6
Chapter 6Chapter 6
Chapter 6
 
Microx - A Unix like kernel for Embedded Systems written from scratch.
Microx - A Unix like kernel for Embedded Systems written from scratch.Microx - A Unix like kernel for Embedded Systems written from scratch.
Microx - A Unix like kernel for Embedded Systems written from scratch.
 
LINUX System Call Quick Reference
LINUX System Call Quick ReferenceLINUX System Call Quick Reference
LINUX System Call Quick Reference
 
File000124
File000124File000124
File000124
 
Processes in unix
Processes in unixProcesses in unix
Processes in unix
 
Part 04 Creating a System Call in Linux
Part 04 Creating a System Call in LinuxPart 04 Creating a System Call in Linux
Part 04 Creating a System Call in Linux
 
Linux Booting Steps
Linux Booting StepsLinux Booting Steps
Linux Booting Steps
 
Linux admin course
Linux admin courseLinux admin course
Linux admin course
 
File000128
File000128File000128
File000128
 

Destaque

Chapter12 Managing And Implementing Backups And Disaster Recovery
Chapter12     Managing And Implementing Backups And Disaster RecoveryChapter12     Managing And Implementing Backups And Disaster Recovery
Chapter12 Managing And Implementing Backups And Disaster RecoveryRaja Waseem Akhtar
 
Chapter10 -- netware-based networking
Chapter10  -- netware-based networkingChapter10  -- netware-based networking
Chapter10 -- netware-based networkingRaja Waseem Akhtar
 
Chapter13 -- ensuring integrity and availability
Chapter13  -- ensuring integrity and availabilityChapter13  -- ensuring integrity and availability
Chapter13 -- ensuring integrity and availabilityRaja Waseem Akhtar
 
Chapter11 -- networking with tcpip and the internet
Chapter11  -- networking with tcpip and the internetChapter11  -- networking with tcpip and the internet
Chapter11 -- networking with tcpip and the internetRaja Waseem Akhtar
 
Chapter15 -- implementing and managing networks
Chapter15  -- implementing and managing networksChapter15  -- implementing and managing networks
Chapter15 -- implementing and managing networksRaja Waseem Akhtar
 
Chapter05 -- networking hardware
Chapter05  -- networking hardwareChapter05  -- networking hardware
Chapter05 -- networking hardwareRaja Waseem Akhtar
 

Destaque (20)

Ch22 system administration
Ch22 system administration Ch22 system administration
Ch22 system administration
 
Ch13 system administration
Ch13 system administration Ch13 system administration
Ch13 system administration
 
Chapter12 Managing And Implementing Backups And Disaster Recovery
Chapter12     Managing And Implementing Backups And Disaster RecoveryChapter12     Managing And Implementing Backups And Disaster Recovery
Chapter12 Managing And Implementing Backups And Disaster Recovery
 
Chapter10 -- netware-based networking
Chapter10  -- netware-based networkingChapter10  -- netware-based networking
Chapter10 -- netware-based networking
 
Chapter13 -- ensuring integrity and availability
Chapter13  -- ensuring integrity and availabilityChapter13  -- ensuring integrity and availability
Chapter13 -- ensuring integrity and availability
 
Chapter11 -- networking with tcpip and the internet
Chapter11  -- networking with tcpip and the internetChapter11  -- networking with tcpip and the internet
Chapter11 -- networking with tcpip and the internet
 
Ch08 system administration
Ch08 system administration Ch08 system administration
Ch08 system administration
 
Ch04 system administration
Ch04 system administration Ch04 system administration
Ch04 system administration
 
Ch18 system administration
Ch18 system administration Ch18 system administration
Ch18 system administration
 
Ch24 system administration
Ch24 system administration Ch24 system administration
Ch24 system administration
 
Ch20 system administration
Ch20 system administration Ch20 system administration
Ch20 system administration
 
Ch06 system administration
Ch06 system administration Ch06 system administration
Ch06 system administration
 
Chapter15 -- implementing and managing networks
Chapter15  -- implementing and managing networksChapter15  -- implementing and managing networks
Chapter15 -- implementing and managing networks
 
Ch10 system administration
Ch10 system administration Ch10 system administration
Ch10 system administration
 
Ch24
Ch24Ch24
Ch24
 
Beat Anger
Beat AngerBeat Anger
Beat Anger
 
Ch21 system administration
Ch21 system administration Ch21 system administration
Ch21 system administration
 
Ch23 system administration
Ch23 system administration Ch23 system administration
Ch23 system administration
 
Chapter05 -- networking hardware
Chapter05  -- networking hardwareChapter05  -- networking hardware
Chapter05 -- networking hardware
 
Ch06
Ch06Ch06
Ch06
 

Semelhante a Managing Printers and Printer Configuration

Semelhante a Managing Printers and Printer Configuration (20)

operating system
operating systemoperating system
operating system
 
Linux
LinuxLinux
Linux
 
Printing in linux with cups
Printing in linux with cupsPrinting in linux with cups
Printing in linux with cups
 
Printing with cups (linux)
Printing with cups (linux)Printing with cups (linux)
Printing with cups (linux)
 
Linux
LinuxLinux
Linux
 
Linux
Linux Linux
Linux
 
CUPS: Common UNIX Printing System
CUPS: Common UNIX Printing SystemCUPS: Common UNIX Printing System
CUPS: Common UNIX Printing System
 
OS-UNIT-1-INTRODUCTION.pptx.pdf
OS-UNIT-1-INTRODUCTION.pptx.pdfOS-UNIT-1-INTRODUCTION.pptx.pdf
OS-UNIT-1-INTRODUCTION.pptx.pdf
 
Ericas-Linux-Plus-Study-Guide
Ericas-Linux-Plus-Study-GuideEricas-Linux-Plus-Study-Guide
Ericas-Linux-Plus-Study-Guide
 
Divya
DivyaDivya
Divya
 
Divya
DivyaDivya
Divya
 
Project of deamon process
Project of deamon processProject of deamon process
Project of deamon process
 
Linux Cheat Sheet.pdf
Linux Cheat Sheet.pdfLinux Cheat Sheet.pdf
Linux Cheat Sheet.pdf
 
Daemons
DaemonsDaemons
Daemons
 
Lamp ppt
Lamp pptLamp ppt
Lamp ppt
 
Linuxppt
LinuxpptLinuxppt
Linuxppt
 
An Introduction To Linux
An Introduction To LinuxAn Introduction To Linux
An Introduction To Linux
 
Linux week 2
Linux week 2Linux week 2
Linux week 2
 
OS_Introduction_1.pdf
OS_Introduction_1.pdfOS_Introduction_1.pdf
OS_Introduction_1.pdf
 
Ppt
PptPpt
Ppt
 

Mais de Raja Waseem Akhtar

Chapter16 - the internet and its tools
Chapter16  - the internet and its toolsChapter16  - the internet and its tools
Chapter16 - the internet and its toolsRaja Waseem Akhtar
 
Chapter14 -- networking security
Chapter14  -- networking securityChapter14  -- networking security
Chapter14 -- networking securityRaja Waseem Akhtar
 
Chapter12 -- troubleshooting networking problems
Chapter12  -- troubleshooting networking problemsChapter12  -- troubleshooting networking problems
Chapter12 -- troubleshooting networking problemsRaja Waseem Akhtar
 
Chapter09 -- networking with unix and linux
Chapter09  -- networking with unix and linuxChapter09  -- networking with unix and linux
Chapter09 -- networking with unix and linuxRaja Waseem Akhtar
 
Chapter08 -- network operating systems and windows server 2003-based networking
Chapter08  -- network operating systems and windows server 2003-based networkingChapter08  -- network operating systems and windows server 2003-based networking
Chapter08 -- network operating systems and windows server 2003-based networkingRaja Waseem Akhtar
 
Chapter07 -- wa ns and remote connectivity
Chapter07  -- wa ns and remote connectivityChapter07  -- wa ns and remote connectivity
Chapter07 -- wa ns and remote connectivityRaja Waseem Akhtar
 
Chapter06 -- topologies and access methods
Chapter06  -- topologies and access methodsChapter06  -- topologies and access methods
Chapter06 -- topologies and access methodsRaja Waseem Akhtar
 
Chapter04 -- network protocols
Chapter04  -- network protocolsChapter04  -- network protocols
Chapter04 -- network protocolsRaja Waseem Akhtar
 

Mais de Raja Waseem Akhtar (20)

The prophet's wives
The prophet's wivesThe prophet's wives
The prophet's wives
 
God is Great
God is GreatGod is Great
God is Great
 
Namaz ka tareeqa
Namaz ka tareeqaNamaz ka tareeqa
Namaz ka tareeqa
 
Aayat ul qursi
Aayat ul qursiAayat ul qursi
Aayat ul qursi
 
Indiansoldiers
IndiansoldiersIndiansoldiers
Indiansoldiers
 
2ªwwii how did it fought
2ªwwii how did it fought2ªwwii how did it fought
2ªwwii how did it fought
 
Fun with EMC2
Fun with EMC2Fun with EMC2
Fun with EMC2
 
Jerusalm at night.pps
Jerusalm at night.ppsJerusalm at night.pps
Jerusalm at night.pps
 
From the sky
From the skyFrom the sky
From the sky
 
Discover the discovery
Discover the discoveryDiscover the discovery
Discover the discovery
 
Solaris servers sec
Solaris servers secSolaris servers sec
Solaris servers sec
 
The OSI - seven layers
The OSI  - seven layersThe OSI  - seven layers
The OSI - seven layers
 
Chapter16 - the internet and its tools
Chapter16  - the internet and its toolsChapter16  - the internet and its tools
Chapter16 - the internet and its tools
 
Chapter14 -- networking security
Chapter14  -- networking securityChapter14  -- networking security
Chapter14 -- networking security
 
Chapter12 -- troubleshooting networking problems
Chapter12  -- troubleshooting networking problemsChapter12  -- troubleshooting networking problems
Chapter12 -- troubleshooting networking problems
 
Chapter09 -- networking with unix and linux
Chapter09  -- networking with unix and linuxChapter09  -- networking with unix and linux
Chapter09 -- networking with unix and linux
 
Chapter08 -- network operating systems and windows server 2003-based networking
Chapter08  -- network operating systems and windows server 2003-based networkingChapter08  -- network operating systems and windows server 2003-based networking
Chapter08 -- network operating systems and windows server 2003-based networking
 
Chapter07 -- wa ns and remote connectivity
Chapter07  -- wa ns and remote connectivityChapter07  -- wa ns and remote connectivity
Chapter07 -- wa ns and remote connectivity
 
Chapter06 -- topologies and access methods
Chapter06  -- topologies and access methodsChapter06  -- topologies and access methods
Chapter06 -- topologies and access methods
 
Chapter04 -- network protocols
Chapter04  -- network protocolsChapter04  -- network protocols
Chapter04 -- network protocols
 

Último

Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 

Último (20)

Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 

Managing Printers and Printer Configuration

  • 2. Chapter Objectives • Understand printing terminology and concepts. • Understand print server requirements and configuration. • Understand print client requirements and configuration. • Understand how to configure homogeneous printing. • Understand how to configure heterogeneous printing.
  • 3. Printing • Printers – Managing printing can be quickly summarized in the words of Calvin (of Calvin and Hobbes): EWWWWWW, YUCK, GROSS!
  • 4. Printing • Printing Overview (in a perfect world) – User creates file, wants to print it. – User calls system utility (lp, lpr, print) to print out the file. – The utility sends the print job to a print spooler. – The print spooler sends the job to the printer. • Things rarely work this easily!
  • 5. Printing • Printers – Local Vs Remote vs Network printers • A local printer is one which is connected to “this” system. – Most local printers are connected to a serial port (RS/232, USB, or Firewire) or a parallel port. – The local system needs to know the capabilities of the printer, and which port the printer is connected to. – If this system is a print spooler it also has to know what other systems/users are allowed to send jobs to the printer. • A remote printer is a printer connected to “some other” system. – The local system needs to know what system the printer is on, how to send the print job to the other system, and the name of the remote printer.
  • 6. Printing • Printers – A network printer is a printer connected to the network, but not necessarily associated with any system. • Network printers include their own spooler, so all systems on the network could print directly to the printer. –This can cause interesting problems. –Usually have to load vendor drivers on every system. –New manufacturers often get this part wrong!
  • 7. Printing • Printer Setup (BSD) – All printing processes are controlled by the lpd daemon, and the lpr program. • Lpr accepts input to be printed and places it in a spool directory. – Lpr selects where to store the print job, based on the name of the printer the user wants to send the job to. The print spool area is in /var/spool – Lpr creates two files in the spool directory for each job. These files are named cfXXX and dfXXX where xxx is the print job number. – The control file (cfXXX) contains reference and handling information for this print job.
  • 8. Printing • Printer Setup (BSD) – The data file (dfXXX) contains the information to be printed. – Once lpr places files in the spool directory, it notifies lpd that it needs to wake up and print the job. – Lpd “finds” the entry in the spool directory and looks up the printer in the /etc/printcap database. » The /etc/printcap file contains an entry for each printer the system has access to. » The printcap file specifies the printer capabilities, which machine is the print spooler for the printer, the names/locations of any filters to be used for this printer, and line discipline information for this printer.
  • 9. Printing • Printer Setup (BSD) – If printcap says the printer is local, lpd checks to see if a daemon is running for that printer (or starts a daemon if none is present). – Once lpd knows the printer capabilities, and that this machine is the spooler, lpd creates a series of pipes between the spool file and the printer device driver. » If a filter program is specified for this printer, lpd places connections to this filter between the print spool area and the printer. – The (filtered) data is sent to the printer by the device driver.
  • 10. Printing • Printer Setup (BSD) –If printcap says the printer is a network printer, or a remote printer, » lpd opens a connection to the remote machine’s lpd, and transfers the data and control files to the remote machine. » lpd then deletes the local copies of these files.
  • 12. Printing • Printer and Print Job Management (BSD) – The lpq command allows the users to view a list of entries in the print queue. lpq -P name views the entries for printer referred to as name. – The lprm command allows a user to remove (their own) jobs from the print queue. – The lpc command allows the administrator to manage the lpr/lpd environment. • NOTE: lpc has the distinction of winning the “flakiest program of the year” award five times in 15 years! Lpc has not been improved (thereby getting it off the honors list), instead other programs have been released which are even flakier!
  • 13. Printing • Printer and Print Job Management (BSD) • lpc allows the administrator to: – enable or disable queuing for a printer. – enable (start) or disable (stop) printing on a printer. The abort command is a harsh version of stop (current job is not completed). – Declare the printer down or up (these commands affect both spooling and printing). – Remove all jobs from a printers queue (clean). – Move a job to the top of the printers queue (topq). – Manipulate lpd (restart). – Get printer status information (status).
  • 14. Printing • System V Printing Overview – User wants to print file and invokes the lp utility. – lp takes the input and places in the appropriate spool directory. – lpsched determines when and where the file should be printed. – lpsched launches a filter to format the output and send it to the printer. – So far it looks just like lpr, right? • The similarities end here!
  • 15. Printing • Printer Setup (System V) • All of the print commands are different between BSD and System V! To name a few: – To print a file, use lp -d printer instead of lpr -P printer – To remove a print job, use cancel instead of lprm – To obtain print job status, use lpstat instead of lpq • In order to remain consistently inconsistent, Sun created lpr, lpc, and lpq programs under Solaris. These programs are actually wrapper programs which call the appropriate System V commands and pass the data off to the lp system.
  • 16. Printing • Printer Setup (System V) • System V printer software defines destinations and classes of printers. – A destination is (usually) a particular printer. » A destination could also be a plain file that you want to append text to. » Because lp uses exclusive locks on the printer “device” , this capability allows several users to append text to a file without concurrent access problems. –A class of printers is a group of destinations. » If you had two printers in a room, you could set them up as a class, and lp would print jobs to both printers (the first free printer gets the next job).
  • 17. Printing • System V Printing – lp is the user-level print command. – lp (sometimes) copies (and sometimes links) the data to the spool directory files (/var/spool/lp/request/dest). – Spool files are labeled xxxn where xxx varies depending on the OS. n is the print job number. – lpsched takes the files in the spool directories and sends them to the appropriate device.
  • 18. Printing • Printer and Print Job Management (System V) – System V UNIX uses the lpadmin command to setup and administer printers. – lpadmin is used to add/remove, start/stop, enable/disable printers much like lpc did in the BSD model. • Most System V systems want lpsched stopped before lpadmin commands will work. • As usual, Solaris had to be different. Solaris wants lpsched running before lpadmin commands will work.
  • 19. Printing • Printer Setup (System V) • lpadmin comes complete with a bag full of options: -d dest (make this the default printer) -x dest (remove printer dest) -p printer (tells lpadmin which printer to work with) -v device (append output for printer to file) -i interface (interface program for printer) -c class (add printer to class) -r class (remove class) -h (printer is hardwired) -l (printer is login terminal) -e dest (copy interface for printer to dest) -m model (copy model for printer to dest)
  • 20. Printing • Printer and Print Job Management (System V) • Once you add a printer with lpadmin, you have to tell the system to accept requests, and enable printing for that printer. • Solaris also requires you to set the type of input that can be sent to a printer (any, simple, postscript, ...). – This information is used to allow or deny printing based on the value of the magic number for the data file. – Programs like Mentor that define their own file types cause problems with this model. – You have to write a filter program to convert the “odd” files into a known/allowed file type in order to print them!
  • 21. Printing #!/bin/csh -f lpsystem -t bsd -y "OIT print server" print.helios.nd.edu lpsystem -t s5 -y "CSE print server” babbage.cse.nd.edu lpadmin -p lp -s print.helios.nd.edu!cse326 lpadmin -p lw384 -s print.helios.nd.edu!cse384 lpadmin -p lj323 -s print.helios.nd.edu!cse323 lpadmin -p eng_lab6 -s print.helios.nd.edu lpadmin -p eng_lab7 -s print.helios.nd.edu lpadmin -p eng_color1 -s print.helios.nd.edu foreach printer (lp eng_lab6 eng_lab7 eng_color1 lj323 lw384 ) lpadmin -p $printer -T unknown -I simple,postscript enable $printer accept $printer end lpadmin -d lp
  • 22. Printing • Printer and Print Job Management (System V) – System V printing software is a suite of programs to accomplish what BSD does with 3 programs: • cancel - remove a print job • accept/reject - tell system to accept/reject spooling jobs for printer. • enable/disable - tell the system to allow/reject printing on this printer. Job is still spooled, just not printed. • lpmove - move job to another printer. • lpstat - get status of print job(s)
  • 23. lpstat comes with a bag full of options: -a [list] Reports which print destinations are accepting requests. -c [list] Report status of all classes and their members. -d Report status of the system default destination. -f [list] [-l] Verify [list] the forms recognized by LP print service. -o [list] Report status of output requests. -p [list] [-D] [-l] Report status of printers [description] [capabilities]. -P Report paper types. -r Report the status of the LP request scheduler. -R Report the position of each job in the print queue. -s Report a status summary. -S [list] [-l] Verify the character sets / print wheels. -t Report all status information. -u [login-ID-list] Report status of output requests for users. -v [list] Report printer names and devices.
  • 24. Printing • Printing Problems and Solutions – The two basic print problems are: • No Output: – Check the obvious: » Is the printer on? » Does the printer have paper, ribbon, toner? » Is the printer paper jammed? » Will other jobs print? – Check the lp user database. – Determine if the print spooler can talk to the printer. – Check the printer log files for clues.
  • 25. Printing • Printing Problems and Solutions – Incorrect Output: • Check the printcap file (or lpadmin) to see if the printer type is correct. • Make sure the line discipline matches the printer settings. • Look at the filter files and see that they do what you think they are doing. • Check the data file for odd character sequences.
  • 26. Printing • Printing Problems and Solutions – Many times printing problems are due to software failures. These failures fall into two general categories: • System software failure. – lpd/lpsched has crashed/burned. » Use the appropriate commands to stop the lp system, then restart the lp system and see if the problem disappears. » If stop/restart does not work, try removing the first entry in the queue to see if lpd/lpsched work. If so, the problem is in the data file.
  • 27. Printing • Printing Problems and Solutions – Data file problems. • Look for odd character sequences in the file. • Try printing the file to another printer (same model if possible). • Check filter program operation. • Check job types allowed on the printer.
  • 28. Printing • Windows – Windows also knows about local and remote printers. • Local printers are almost always connected to a parallel port. • Local printers are added with the Printer Control Panel (Add Printer Wizard). • You will probably need the OS media to install print drivers. • Remote printers are handled similarly to the UNIX remote printers, but they require more setup: – Use the Add Printer Wizard – Add a printer port (defines remote spooler type) – Add the printer like it was a local printer. – If print server is a UNIX host, FIX the setup!
  • 29. Printing • Windows – Windows/DOS wants to send printer control codes to the printer. These codes are part of the language the printer uses to speak to the PC. • Unix does not like these control codes! – On NT/Win2k systems (Win 95/98 have no TCP print driver): • Go to the Document Defaults for the printer. • Select the Advanced options. • Select the Postscript Options. • Set the system so that it does NOT send control codes. • Set the system so that it does NOT send control-D after each print job.
  • 30. Summary • Configuring and managing printers should be easy. – Unfortunately, printer setup and management is not as easy as it should be. – The lack of standards makes this task a problem for system administrators. – Homogeneous printing is the simplest case. – Heterogeneous printing is the most problematic. • System administrators should understand how to: – Configure print services under Windows, BSD and System V. – Troubleshoot printing problems. – Configure filters and advanced printing options.