Printerc and Print Queue Setup - SNUG

Printerc and Print Queue Setup - SNUG

Printerc and Print Queue Setup Background: SCC utilizes AIX printing subsystem to handle majority of the application printing needs. Exceptions are: Pathology printing through Pathology Print servers; PathDX and Genetic module label printing are through RDS formatters; A few sites with large printer population, utilize CUPS printing subsystem. Print queue must be setup in Application servers/LPARs, it is not necessary to setup print queues (and printerc file) in dedicated Oracle LPARs, since we do not print directly from Oracle LPARs. Printerc file ties together the print queues and our application, like a cross reference table. Printerc and Print Queue Setup Information to obtain: Printer IP and/or DNS name Printer Type Report or Label Printer make and model Location and Description Queue name

Soft Name Name to be used in printerc file Purpose: Reports Must support PCL5 and higher printer language. Impact printer support Epson Emulation Label printing Regular labels for lab, micro, etc, 203 DPI Regular labels for lab, micro, etc, 300 DPI ISBT labels 300 DPI, Zebra printers Printerc and Print Queue Setup A word about DNS name resolution What does this mean to you? IP address = 216.58.219.174 scc1:/user/davew> nslookup google.com Server: 10.100.64.120 Address: 10.100.64.120#53

Non-authoritative answer: Name: google.com Address: 216.58.219.174 For me at least, its easier to remember the name, than numbers. Printerc and Print Queue Setup Whenever possible, SCC would like to setup printers using DNS name, rather than creating an alias mapped to the IP address in /etc/hosts file. Correct information for your DNS server: #> cat /etc/resolv.conf nameserver 10.1.8.83 domain bhcs.pvt You have the printer IP address: 10.92.32.224, in UNIX, or from your PC, you can run the command nslookup to identify the domain name of that printer: #/usr/spool/lpd/pio/@local/custom> nslookup 10.92.32.224 IP address of the

device you are checking Server: 10.1.8.83 it queries DNS server 10.1.8.83 Address: 10.1.8.83#53 DNS works on port 53 Name: PRT000131.bhcs.pvt Address: 10.92.32.224 this is the fully qualified domain name (FQDN) #/usr/spool/lpd/pio/@local/custom> ls l *PRT00131* -rw-rw-r-1 root printq 11630 Jan 26 2015 w31:[email protected] Printerc and Print Queue Setup If IP is not resolvable, you will see the following:

#> labapp1:/usr/spool/lpd/pio/@local/custom> nslookup 10.51.72.65 Server: 10.1.8.83 Address: 10.1.8.83#53 ** server can't find 65.72.51.10.in-addr.arpa: SERVFAIL Few possible causes: Device IP is not valid Entry has not been added to DNS servers Reverse lookup is not supported. Printers are not added to DNS servers Printers belong to another domain, not included in /etc/resolv.conf file. It DNS server is not able to resolve this IP, but IP address is valid, we will add an entry to /etc/hosts file, associate it with a dummy alias. 10.51.72.65 w31 # HP 4350 in ICU Is it necessary to add IP address to /etc/hosts file? No, its not, you can setup printers

using IP address. This comes in handy when printer has been replaced with a new device, then you just need to edit the /etc/hosts file with new IP, without the need to recreate the print queue. Printerc and Print Queue Setup Requirement: UNIX account review internal approval process. UNIX knowledge Text Editor such as vi. You may have to edit /etc/hosts file, or virtual printer file, You will edit printerc file File structure Network printer setup and configuration DNS server name resolution Edit /etc/hosts file Request SCC to provide Printer Info Template spreadsheet, this will assist with printer addition process Printerc and Print Queue Setup Breakdown of printerc file: A01_Label

^^^^^^^^^ ||||||||| ||||||||| ||||||||| ||||||||| ||||||||| !LZ1:201:lp -c dA01 >printer.trace 2>&1 ^^^ ^^^ ^^^^^^^^^^^ ||| ||| unix command to print to label printer lp2 ||| ||| ||| security number, this MUST be unique! ! ! ||| Type of printer. This indicates this is a label printer, Zebra to ||||||||| be precise. See chart below. ||||||||| Name of printer to be seen by users. First 3 characters must be unique, and should be upper case. The limit here is 29 characters (6/9/2008). For queue name, lets use upper case also, it has something to do with new process. P Laser or dot matrix printers used in Lab, Micro and BB modules.

F File, saves the report(s), labels to a file located in $UDIR/softprint dir. If you would like to save certain label format, the second letter after F should be just like one of the following example. Ex. FZ1 will save the label file in Zebra format. FT1 will save the label in UBI Easycoder 91 format. This will not affect reports. V View, used to display a report on screen. Same principle applies here. You can use different letter designations to represent different label formats. Printerc and Print Queue Setup Types of Label Printers: LA1 TermaBar label printer for Alverno "BIG PRINTER" LB1 BARCODE BLASTER label printer LC1 CITOH T4 Terminator label printer LB1 BARCODE BLASTER label printer LC1 CITOH T4 Terminator label printer LD1 DOTMATRIX printer LE1 format for zebra print but different form STFFS00239 LF1 FACIT label printer LL1 DataMax M-Class DPL language. LI1 Intermec printer (IPL) LP1 PT650 label printer

LT1 UBI 'ELTRON' label printer FIRST FORMAT (Zebra TLP2844 without Z) LU1 UBI 'ELTRON' label printer SECOND FORMAT Contains small slide label LW1 301\501 UBI 'ELTRON' label printer LZ1 ZEBRA-203 DPI label printer FIRST FORMAT LG1 ZEBRA-300 DPI label printer FIRST FORMAT LS1 ZEBRA-203 DPI label printer SECOND FORMAT contains small slide label LH1 ZEBRA-300 DPI label printer SECOND FORMAT contains small slide label LN1 ZEBRA-300 DPI ISBT label format, for Bloodbank Only LX1 ZEBRA label printer for 6 dots/mm printhead Printerc and Print Queue Setup Sample printerc file: View_file Save,file Dummy T01_BHPRT24690 T02_BHPRT12603 T03_BHPRT24689 ## B Printers B01_BHPRT00341 B02_BHPRT03127 B03_BHPRT07004

!VD1:30: !FZ1:31: !P:17:cat !LZ1:201:lp -c -dT01 !LZ2:202:lp -c -dT02 !LN1:203:lp -c -dT03 >/dev/null >/dev/null >/dev/null >/dev/null !LZ1:301:lp -c -dB01 !P :302:lp -m -dB02 !LN1:303:lp -c -dB03 >/dev/null 2>&1 >/dev/null 2>&1 >/dev/null 2>&1 2>&1

2>&1 2>&1 2>&1 Above example is my preferred setup. First letter is site identifier, then # will be from 01-99, if greater than 99, then go to A0, A1, to Z0-Z9. The combination should allow for greater coverage to meet the unique first 3 character requirement. The description following the underscore, in this case, is how each printer is labeled for this client. This is fairly important identifier, as your user and IT/MIS team will be using this name for reference, in this case, this is also the hostname for the printer device, so when we setup the print queue, we used it in the setup: labapp1:/usr/spool/lpd/pio/@local/custom> ls -l t01* -rw-rw-r-1 root printq 5308 Mar 6 2014 T01:[email protected] Printerc and Print Queue Setup Limitation with security numbers: Up to 4044 printers can be assigned in the security number. Reserved numbers are:

17 Dummy 30 -View file 31 -Save file 245 260, 700 702 *** PLEASE NOTE 4044 is the highest # as security for printers *** Printerc and Print Queue Setup Using the Printer Info Template spreadsheet to maintain your printer setup process. You still have to fill in the information, heres a short list of first tab. Since the DNS Name field is populated, the AIX command to setup the queue will rely on this column. If this column is empty, then it will utilize the Queue Name column entries to build the commands. Printerc and Print Queue Setup When I have entered all the information, click on Generate AIX Commands button, the following will display: Printerc and Print Queue Setup Click on jetdirect button, it will display all of the commands system uses to create these queues, in the HP Jetdirect format. You see the h `ZPRT000029`, which shows the system is using DNS name to

build the commands. /usr/lib/lpd/pio/etc/piomkjetd x '9100' /usr/lib/lpd/pio/etc/piomkjetd x '9100' /usr/lib/lpd/pio/etc/piomkjetd '9100' /usr/lib/lpd/pio/etc/piomkjetd '9100' /usr/lib/lpd/pio/etc/piomkjetd x '9100' mkpq_jetdirect -p 'scc_label' -D 'asc' -q W40' -h 'ZPRT000029' mkpq_jetdirect -p 'scc_label' -D 'asc' -q W41' -h 'ZPRT000030' mkpq_jetdirect -p 'SCC_hp' -D 'pcl' -q W42' -h 'PRT000222' -x mkpq_jetdirect -p 'SCC_hp' -D 'pcl' -q W43' -h 'PRT000115' -x mkpq_jetdirect -p 'scc_label' -D 'asc' -q W44' -h 'ZPRT000020' - Printerc and Print Queue Setup Click on jetdirect button, it will display all of the commands system uses to create these queues, in the HP Jetdirect format. I emptied out the DNS name column here, and you can see that h (host) is the queue name:

/usr/lib/lpd/pio/etc/piomkjetd /usr/lib/lpd/pio/etc/piomkjetd /usr/lib/lpd/pio/etc/piomkjetd /usr/lib/lpd/pio/etc/piomkjetd /usr/lib/lpd/pio/etc/piomkjetd mkpq_jetdirect mkpq_jetdirect mkpq_jetdirect mkpq_jetdirect mkpq_jetdirect -p -p -p -p -p 'scc_label' 'scc_label' 'SCC_hp' -D 'SCC_hp' -D

'scc_label' -D 'asc' -D 'asc' 'pcl' -q 'pcl' -q -D 'asc' -q W40' -q W41' W42' -h W43' -h -q W44' -h W40' -h W41' W42' -x W43' -x -h W44' -x '9100' -x '9100'

'9100' '9100' -x '9100' Printerc and Print Queue Setup Click on the hosts button, you can see the entries you can add to /etc/hosts file. This is only needed if your printers do not have a DNS name. 10.92.36.177 10.92.14.242 10.92.14.161 10.92.24.169 10.92.32.232 W40 W41 W42 W43 W44 #S4M #S4M

#Default #Default #S4M When building the /etc/hosts file, we just map the IP address to the queue name you provided. Printerc and Print Queue Setup Click on the printerc button, it will create the correct entries for printerc file, that you can append to the printerc file. W40_ZPRT000029 W41_ZPRT000030 W42_PRT000222 W43_PRT000115 W44_ZPRT000020 !LZ1:540:lp !LZ1:541:lp !P :542:lp !P :543:lp !LZ1:544:lp

Comments at the end of each line: LAB_LabServices_CR1_RY73 !P LA3_LabServices_CR2_RVF5 !P RXF_LabServices_CR_RXF8 !P -c -c -m -m -c -dW40 -dW41 -dW42 -dW43 -dW44 :0196:P:lp :0393:P:lp

:0451:P:lp > > > > > /dev/null /dev/null /dev/null /dev/null /dev/null 2>&1 2>&1 2>&1 2>&1 2>&1 -dLAB >/dev/null 2>&1:733-3615 -dLA3 >/dev/null 2>&1:733-3615

-dRXF >/dev/null 2>&1:733-3615 A lesser known feature, is the ability to add a comment at the end of each line. is the format. Add :######## to the end of each line. This is useful to place contact information for each printer. We are looking at adding this as a feature to the spreadsheet. Above Printerc and Print Queue Setup Heres a listing of available printer type that you can enter in Column D of Printer Data Tab. Printerc and Print Queue Setup Once the spreadsheet has been fully populated, lets try to execute this on the system now. Remember, print queues must be added to Application and Weblogic LPARs, theres no need to add printers to the Oracle LPAR. First thing first, if the printer IP are not resolvable through your DNS server, then you must update the /etc/hosts file first. ** Backup the /etc/hosts file first, before you edit the file. I copied the entries found under hosts button, and I will append this

information to the /etc/hosts file on Application/Weblogic LPARs: 10.92.36.177 10.92.14.242 10.92.14.161 10.92.24.169 10.92.32.232 W40 W41 W42 W43 W44 #S4M #S4M #Default #Default #S4M The command to create print queues will fail, if the host name entry is invalid.

Printerc and Print Queue Setup Execute the script to create the print queues: Login to system, be sure you have privileges to add print queues (if you can edit /etc/hosts file, then you can add print queues): /usr/lib/lpd/pio/etc/piomkjetd '9100' /usr/lib/lpd/pio/etc/piomkjetd '9100' /usr/lib/lpd/pio/etc/piomkjetd /usr/lib/lpd/pio/etc/piomkjetd /usr/lib/lpd/pio/etc/piomkjetd '9100' mkpq_jetdirect -p 'scc_label' -D 'asc' -q W40' -h 'ZPRT000029' -x mkpq_jetdirect -p 'scc_label' -D 'asc' -q W41' -h 'ZPRT000030' -x mkpq_jetdirect -p 'SCC_hp' -D 'pcl' -q W42' -h 'PRT000222' -x '9100' mkpq_jetdirect -p 'SCC_hp' -D 'pcl' -q W43' -h 'PRT000115' -x '9100' mkpq_jetdirect -p 'scc_label' -D 'asc' -q W44' -h 'ZPRT000020' -x If hostname is not valid, you will receive an error like the following: scc1:/user/davew> /usr/lib/lpd/pio/etc/piomkjetd mkpq_jetdirect -p 'scc_label' -D 'asc' -q W40' -h 'ZPRT000029' -x '9100'

Host name ZPRT000029 does not exist. scc1:/user/davew> A valid host name is required! Printerc and Print Queue Setup Now, you can add the entries to printerc file. Printerc file is located in /usr/lib directory. Make a backup copy of the file before you edit the file. Printerc and Print Queue Setup Error checking capability: Only a few area that really matters: Printerc and Print Queue Setup Cell manipulation within Printer Info Template spreadsheet: To make your life easier, you can combine the cells together, so you dont have to type too many fields therefore, lowers the chances for typo. In this example, I combine column F and B, to form Column G, which will be the first entries found in printerc file. The formula is displayed.

Printerc and Print Queue Setup This next example is to use the location column as part of the description. Simply change your formula to accomplish this. Printerc and Print Queue Setup Troubleshooting: 1. Jobs are not printing: 1. 2. 3. Is this isolated to a specific printer, or the problem is system wide? Is the problem affecting label printing, or report printing, or both? Is the system able to generate the softprint jobs (reports only), can you view the content of these softprint jobs? 2. Check printer status from your all of your application servers. If you have weblogic servers, make sure to check printer status from them too! 3. If printer jobs are queuing up, try to ping the printer in question. 4. Most print servers have built-in web browsers, enter the printer IP or hostname (http://printerhostname/) in your web browsers URL link, and you may be able to find additional information, such as printer status,

toner, etc, see next slide for sample screen shot. 5. Receiving extra page: was the printer changed recently? If it was changed, was it from one brand to another? This would suggest a print driver issue. Printerc and Print Queue Setup This example is from a Lexmark printer. Printerc and Print Queue Setup 6. When checking printer status from application, check process is hanging. There are 2 causes for this, let me give you the background first: AIX print queues can be setup in 2 ways. HPJetdirect or Remote queues. Most of the printers are setup using the HPJetdirect style queues. In certain situations, the queues are setup using remote print queue setup, that utilizes the LPD protocol. When checking print queues with lpstat command in AIX, the check process is different between HPJetdirect and remote printer queues. labapp1:/usr/spool/lpd/pio/@local/custom> lpstat -vw16 Queue Dev Status Job Files

User PP % Blks Cp Rnk ------- ----- --------- --- ------------------ ---------- ---- -- ----- --- --w16 [email protected] READY For Remote print queue: labapp1:/usr/spool/lpd/pio/@local/custom> lpstat -vc01 Queue Dev Status Job Files User PP % Blks Cp Rnk ------- ----- --------- --- ------------------ ---------- ---- -- ----- --- --c01 @BHPR READY c01: JetDirect lpd: no jobs queued on the port Auto In this case, lpstat command actually queries the print server to get an update from it. If the print server is offline, it will wait for a reply, until it times out.

Printerc and Print Queue Setup labapp1:/SCC/user/scc> timex lpstat -vw16r Queue Dev Status Job Files User PP % Blks Cp Rnk ------- ----- --------- --- ------------------ ---------- ---- -- ----- --- --w16r @BHPR READY : (WARNING) Connection to server failed. rembak: errno = 4: Interrupted system call w16r MPS_2 HOST_DOWN real 90.03 the timeout is set to 90 seconds before it gives up user 0.01 sys 0.01 In the old days, SCC application used lpstat command to check printer status, if you have multiple printers offline, the check printer process will take forever to complete! So we asked our programmer to change the check process with

another command: enq isA, it will only care for AIX queue status, and not worrying about print servers status: labapp1:/SCC/user/scc timex enq -isA real 0.05 user 0.00 sys 0.01 Printerc and Print Queue Setup For application checking process, we dont care about print server status, but for some reason, the old checking process (utilizing the lpstat command instead of enq command) keeps reviving itself into different releases. Please test the check printer status function as part of your validation process for new release of software. 7. Label print out looks smaller than normal. Check and see if printer type has changed. Zebra printers support 203 and 300DPI. A site purchased new printer that is 300 DPI, but all the in-house printers were 203 DPI. By simply swapping out an existing printer to this new 300 DPI printer will not work correctly, as labels will look smaller than what they should be. SCC provides another label type that works with 300 DPI printers (based on printerc file). But my recommendation with this is to

keep your printers to the same DPI if you can. Printerc and Print Queue Setup 8. Pull paper from specific tray: Question? Why does SCC have to make the adjustment? This will need to be done by SCC staff. Before we can change the printer setting, we have to find out the correct PCL (Printer Control Language) code to pull the paper from the correct paper tray. We will need someone standing by the printer, then we send out a test page to the printer with the tray selection command embedded in the print job. The person by the printer should alert us when the paper is pulled from correct tray. This may take multiple tries, and once we have the right code, please make sure to test this out by printing a report from application. Dont forget, turn off tray linking function from the printer. In printers now a day, this is by defining a different paper type in each tray. Printerc and Print Queue Setup Any additional questions? Thank you all for attending this session.

Recently Viewed Presentations

  • Lipid Monolayer Response to Lateral Stress the Role

    Lipid Monolayer Response to Lateral Stress the Role

    Lipid Monolayer Response to Lateral Stress the Role of Lung Surfactant Protein B Luka Pocivavsek1, Shelli Frey1, Josh Kurutz2, Kapil Krishan3, Alan Waring4, Ka Yee Lee1
  • Chapter 4

    Chapter 4

    In the overlap area, the two species compete for one or more of the same resources. As a result, each species can occupy only a part of its fundamental niche; the part it occupies is its . realized niche. Generalist...
  • INTERNET - WordPress.com

    INTERNET - WordPress.com

    Berbelanja melalui internet. 2002 Medial sosial internet Friendster didirikan oleh Jonathan Abrams and Peter Chin 2003 Medial sosial internet My Space didirikan oleh Tom Anderson 2004 Medial sosial internet Facebook didirikan oleh Mark Zuckerberg. Hingga kini Facebook telah digunakan oleh...
  • American Modernism

    American Modernism

    American Modernism 1900-1945 ... Themes Breakdown of social norms and cultural sureties Alienation of the individual Valorization of the despairing individual in the force of an unmanageable future Product of the metropolis, of cities and urbanscapes Social Norms/Cultural Sureties Women...
  • Name of Presentation - Internal Medicine

    Name of Presentation - Internal Medicine

    Medication reconciliation at time face-to-face. MDM highcomplexity (level 5) Medicare reimbursement. $218.26. 99496 requires the above initial contact, a face-to-face visit within 7 calendar days of dc, medication reconciliation at time of face-to-face, and MDM of High complexity (level 5).
  • Master Title - Defense Acquisition University

    Master Title - Defense Acquisition University

    10 ACAT I Programs . PEO Ships Portfolio. 33 USN / MSC ships currently under contract or building in PEO Ships portfolio. 79 FMS craft under construction
  • CPSC 411 Design and Analysis of Algorithms

    CPSC 411 Design and Analysis of Algorithms

    Show claim is true for iteration i+1. During iteration i, p i is under consideration, and some points might be popped off S in the while loop due to nonleft-turn check. Let p j be top of S after all...
  • Research Grants & Contract Office

    Research Grants & Contract Office

    Research Grants & Contracts Office ... WILL be running 2011/12 details tba 2009 - 146/41 - 28% ESRC (5) Decision process Submission via JeS Checked by Shared Services Centre (SSC), allocated to ESRC Officer for eligibility check Once accepted, proposal...