To check on the complete status of the lp system, type:
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:lpstat -t
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...
In order 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
/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 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 doesn't print or prints incorrect information, then:
/usr/etc/lpc stop lp (or your printername)
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 recommend 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. First, you may need to contact the System Administrator of the print server system. You need the root password, and 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 doesn't then contact the System Administrator of the print server system.