Troubleshooting of UNIX operating system printing failures

  

In the UNIX system working environment, once a printer system failure occurs, it will inevitably affect the work to varying degrees. The following are the six major faults of the printer system under UNIX system and their troubleshooting methods. I believe it will help the reader to solve similar problems encountered.
In the working environment of UNIX system, it often hurts the work because of the problem that the printer can't print or the printing effect is not satisfactory due to the printer system failure. Based on years of practical experience, the author summarizes the troubleshooting methods for several printer system faults under the UNIX system for reference by the peers:
Fault 1: The printer cannot print
If the printer does not work after the print command is issued, there is no For printouts, check the following:
1. Make sure the printer is plugged in.
2. Check if the hardware of the printer is normal. Generally, it can be checked by self-test method.
3. Check the printer cable to make sure it is properly connected to the printer interface and computer print port.
4. Make sure the printer is configured correctly. To create a parallel or serial printer to receive data correctly. If the printer is serial, make sure that the baud rate at which the computer sends data to the printer matches the baud rate of the printer.
5. The printer should be in a valid state. To do this, start sysadmsh and select:
Printers→Schedule→Accept
Printers→Schedule→Enable
6. Make sure the system recognizes the printer port at startup. After the copyright information, the system should display the following information for each port:
Parallel 0x378-ox37A 07-Unit=0
If the system does not display such information for the corresponding printer, then the following faults should be followed. The relevant command execution mentioned in .
7. Make sure that the interrupt vector for the port configuration is correct and that no other hardware is using the same interrupt vector.
8. Test the connection of the printer port by redirecting the output of the command directly to the device.
For parallel printer LP0, type:
date>dev/lp0
For serial printer ttyla, type:
(stty options;date)>/dev/ttyla
where options are waves Rate, checksum and other settings you want to pass to the serial printer.
If the output of the redirect command cannot be printed, it should be executed according to the following command in the second fault "Cannot redirect output to the printer".
If the output of the redirect command can be printed, submit a standard file (such as /etc/motd), start sysadmsh to print, select:
Dirs/Files→Print
If the hardware connection is normal, the printer is valid And the configuration is correct, but the print request still can not be executed, you should do the following checks:
1. Check if the lpsched process is running:
ps-Ulp
2. If the lpsched process is not running, then Restart:
/usr/lib/lpshut
/usr/lib/lpsched
3. Check if the print request has been filtered:
lpstat-o-1
This command displays the output request The status, printer name and details of the relevant device.
4. If the printer detects an error, the automatic printing process will not continue immediately. Force the process to continue by making the printer valid.
Fault 2: Cannot redirect output to printer
If the output is redirected directly to the parallel or serial port, the result is no motion, or the system displays "Cannot create" message, it should be checked as follows :
1. Check if the device file corresponding to the port exists in the /dev directory
. Make sure this file is a device file instead of a text file.
2. Remove the cable from a normal system and use it in this system to test the cable connection.
3. If there is a DOS partition, print a file from the DOS operating system. If you can print files normally under DOS but not on UNIX systems, you should check the following:
Make sure the port system is recognized when it starts up, and the port configuration is correct;
If the port is configured correctly, it still cannot be If the output is redirected to the port, try changing the device name; for example, LP1 is used to replace LP0; for serial port, tty2a is used to replace ttyla;
If a device name is changed If you still can't print, it may be that the printer is defective. You should check the hardware documentation that came with the printer to try to solve the problem.
4. If you can't print under DOS, you should check the printer configuration.
If the printer is configured correctly and you still can't redirect the output to the printer, the problem is most likely on the hardware. Then check the cables and ports again. If the problem persists, contact your printer vendor.
Fault 3: The port is not recognized when the system starts.
If the system does not recognize the port at startup (ie, a line of information corresponding to the port's "parallel" or "slidial" content is not displayed after the copyright information. ), should be checked as follows:
1. Confirm that the parallel or serial card settings are correct.
Turn off the power and turn on the machine;
Unplug the print card from the bus and plug it in again.
2. If there are more than one parallel card, it may be that one of the blocks conflicts with the other, and the first block should be removed.
3. Check if the print card configuration is correct. This can be done by comparing the manual that came with the card. If possible, set the card to another configuration and try it out.
4. The print card may be broken. Try another one.
Fault 4: The output of the printer is illegal
If the printer prints an illegal output, it should be checked as follows:
1. Determine the baud rate of the serial printer and see if it has a baud rate with the computer. Match (if the printer is connected via a parallel port, it has no relationship to the baud rate). For best performance, set the baud rate to 9600.
To make a change to the baud rate used by the printer service, use the following sysadmsh option:
Printers→Configure→Parameters
in the "Default initial settings" section “stty” The field is filled with the baud rate value. Then submit a standard sample file for printing.
2. Determine the printer's parity setting to see if it matches the printer's parity setting. (If the printer is directly connected to the computer via a wire and the correlation distance is less than 15.25m, there is no need to use the parity bit. ).
After setting the parity bit, you should use the following sysadmsh option:
Printers→Configure→Parameters
Add one of the following three items to the "stty" field in the "Default initial settings" section of the form. :
oddp setting generates odd parity
evenp setting produces even parity
-parity setting does not use parity bit (default)
Fault 5: Printout format is wrong
If printer The output is legal, but the format is wrong, you should start sysadmsh and select:
Printers→Configure→Parameters
For each of the following situations, adjust the settings of "Default initial settings" and "stty" :
If the printer output is twice as wide as normal, use the -onler or -tabs option;
If the body of the output is packed together, enter the -tabs option;
If the output of the printer If it is jagged, you should enter the -onlcr option (this option is the default, but the administrator may be wrong As it is removed).
Fault 6: Parallel print speed is slow
If the printer print speed is abnormally slow, you should check if the configuration of the printer is set during the installation process.
If the printer is still slow after confirming that the parallel port is configured correctly, the problem may be that the parallel port is not capable of generating interrupts.
To speed up the printing speed of parallel printers, you can change the way hardware and print drivers communicate. The parallel printer driver can be "spooled" on the parallel port so that the driver can be independent of the interrupt generated from the parallel port (Note: When the printer driver “Spool] parallel disconnect, it is possible Will encounter problems with running out of system resources).
To establish a spooling mechanism for a parallel port or parallel printer, a so-called "special device node" should be established. The steps are as follows:
1. Note the parallel printer port identified at system startup (you can view the last boot information in the /usr/adm/mcssagcs file). For example:
parallel 0x378 0x374 unit=0
2. Register as a super user.
Set matching options according to your printer's needs.
3. Check if the setting of "Tab" is correct.
If these settings and baud rate are correct and the output is still not normal, you should check if the printer type is correct or not. If the printer type selected when creating the printer with the print service is incorrect, an incorrect control character will be transferred to the printer, which will cause the printer's output to disappear or become illegal. In addition, it may be due to the wrong character set being set.
If you don't know the printer type, you should use the following steps to find out the printer type:
1. If you think the printer is of a certain type and you are not sure, enter the following command at the system prompt:
TERM=printer-type tput longname
A short description of the printer specified by printer-type will appear on the terminal. If you think the description does not match your printer, you can try another printer-type and repeat the process until the description matches the actual printer.
2. If you do not know what name (printer-type) to try, you can use the following command to check:
/usr/lib/terminfo directory, to get a list of printer type names:
ls -R/Usr/lib/terminfo/more
Select a word or number from the resulting list to represent the printer type. For example, the name 495 represents the AT&&T495 printer. Replace the printer-type in the command in step 1 with each name in the list until you are satisfied.
After you get the name of the printer type that you think is correct, you can change the printer type setting. To do this, follow these steps:
1. Start sysadmsh and select:
Printers→Configure→Parameters
2. In the printer name (terminfo database) field, enter the type name of the printer.
3. Enter one of the following commands to create a special device file for the printer:
For lp0, type: mknod/dev/lp0p c 6 64
For lp1, type: mknod/dev/lp1p c 6 65
For lp2, type: mknod/dev/lp2p c 6 66
4. Enter the following command for all printers you want to configure. For example, for /dev/lp0, you would enter:
chown bin /dev/lp0p
chgrp bin /dev/lp0p
chmod 222 /dev/lp0p
5. If you are using a printer Machine program, the new parallel spooling device must now be notified to the spooler.
Start sysadmsh and select:
Printers→Configure→Modify
6. In the "Device mame" field, do not use the standard parallel device name, you should use /dev/lp0p, /Dev/lplp, or /dev/lp2p.

Copyright © Windows knowledge All Rights Reserved