If you send a print request to a printer with lp and do not receive any output, use the checklists below to make sure your system is ready for printing. These lists supplement the troubleshooting information in the manufacturer's hardware manual.
Use the following list of questions to determine whether your printer hardware is working as designed:
Printers do not always indicate clearly whether they are turned on. Make sure the printer is plugged into the power socket and the power switch is on.
Frequently, printers run out of paper in a high-volume situation.
Make sure the entire paper pathway is clear of sheets or fragments of paper. Refer to your printer hardware documentation before attempting to put any unusual paper or other media through your printer.
Be sure the baud rate of the printer matches that of the serial port.
Often, reseating the serial cable where it connects to the printer restores correct operation.
The use of the pins in serial cables varies somewhat in different applications. Cables designed for specific hardware may or may not function correctly with different hardware. Check your system Owner's Guide and the documentation supplied with your printer and cable to determine whether the cable is correct for your hardware.
The lp scheduler is the program in charge of spooling your files to the printer, and it is invoked whenever you use the lp print command. The scheduler can be in a number of states, and each printer registered with lp can be in a number of states as well.
To check on the complete status of the lp system, type
lpstat -t
This gives you a complete description of the status of lp. You may also want to examine the contents of the file /var/spool/lp/log. Use the information you find to answer the following questions:
If you do not see the name of your printer in the list of information produced by lpstat, then you must register your printer with lp.
If your printer is not enabled, the lpstat listing contains this line:
printer yourprinter disabled since...
To enable the printer, type
enable yourprinter
lp sometimes disables a printer automatically if it is unable to send a file to a print server, so a disabled printer often indicates a hardware problem, such as a host that is not communicating with the network.
If the printer is not accepting requests, the lpstat listing contains this line:
yourprinter
not accepting requests since...
You must use the accept command for that printer destination. Become the superuser (with su) and type
/usr/lib/accept yourprinter
If the scheduler is not running, the lpstat listing contains the message
scheduler is not running
To restart the lp scheduler, become superuser (with su) and type
/usr/lib/lpsched
If your system has more than one printer, and you wish to send a job to a printer other than the default, remember to use the -d option:
lp -dotherprinter
If you are having trouble with a printer you are accessing over a network, check the status of the lp scheduler on your workstation or the print server's host system.
If none of the above procedures work, there are several "last resort" procedures:
/usr/lib/lpshut
Then kill any jobs running as lp. You can identify these processes with the command
ps -fu lp
Then type the command
/usr/lib/lpsched
If your print request does not make it to the queue, then
The file you submitted may not be in the proper format for the print server to print your request.
If your print request makes it to the queue and never gets to the print server, then
Waiting for remote queue to be enabled.
This message usually means that your hostname is not in the print server system's /etc/hosts.equiv file. If your print request disappears from the queue and does not print, or prints incorrect information, then
/usr/etc/lpc stop lp (or your printer name)
lpr /etc/group
cd /usr/spool/lpd (or your spool directory)
ls -l
Your system should return something similar to
-rw-rw---- 1 root lp 69 Aug 23 14:02 cfA117tls
-rw-rw---- 1 root lp 227 Aug 23 14:02 dfA117tls
-rwxr----- 1 root lp 0 Aug 23 14:01 lock
-rw-rw-r-- 1 root lp 25 Aug 23 14:46 status
cat cfA117tls
Your system should return something similar to
Htls H the hostname that sent the print request
Proot P the person who sent the request
Jgroup J the jobname
Ctls C class/hostname
Lroot L the person who sent the request
fdfA117tls f name of the file to print
UdfA117tls U name of the file to remove after printing
N/etc/group N the original file name
It is recommended that you use the more command just in case your test file is not as short as the /etc/group file. The df file should look exactly like the file you attempted to print. In this case, the file dfA117tls should be exactly the same as the /etc/group file.
more dfA117tls
The system should return something similar to
sys::0:root,bin,sys,adm
root::0:root
daemon::1:root,daemon
bin::2:root,bin,daemon
adm::3:root,adm,daemon
mail::4:root
uucp::5:uucp
rje::8:rje,shqer
lp::9:
nuucp::10:nuucp
user::20:
other::995:
demos:*:997:
guest:*:998:
Now that you have verified that the request is properly spooling on the local system, check the print server system. You may need to contact the System Administrator of the print server system first; you need the root password. Once you enter the stop command on that system, no print requests are printed. Instead, they remain in the queue. Make sure that there are no requests in the queue that are currently printing.
/usr/etc/lpc stop lp
/usr/etc/lpc start lp
If you do not know where the spool directory is, use the cat or more command with the /etc/printcap file to look at what is set in the sd: variable.
ls -l
The print server system should return something similar to
-rw-r----x 1 root 4 Aug 15 10:27 .seq
-rw-rw---- 1 root 69 Aug 23 14:02 cfA117tls.csd.sgi.com
-rw-rw---- 1 root 227 Aug 23 14:02 dfA117tls
-rwxr------ 1 root 0 Aug 23 14:01 lock
-rw-rw-r-- 1 root 25 Aug 23 14:46 status
cat cfA117tls.csd.sgi.com
The print server system should return something similar to
Htls H the hostname that sent the print request
Proot P the person who sent the request
Jgroup J the jobname
Ctls C class/hostname
Lroot L the person who sent the request
fdfA117tls f name of the file to print
UdfA117tls U name of the file to remove after printing
N/etc/group N the original file name
more dfA117tls
The system should return something similar to
sys::0:root,bin,sys,adm
root::0:root
daemon::1:root,daemon
bin::2:root,bin,daemon
adm::3:root,adm,daemon
mail::4:root
uucp::5:uucp
rje::8:rje,shqer
lp::9:
nuucp::10:nuucp
user::20:
other::995:
demos:*:997:
guest:*:998:
The df file should look exactly like the file you attempted to print. In this case, the print server system's dfA117tls file should be exactly the same as the dfA117tls file that was on your system.
/usr/etc/lpc start lp
Your file should now print on the printer. It should look exactly like the output of the more command. If it does not, then contact the System Administrator of the print server system.