Wednesday, April 4, 2018

How to manage print queue on AIX

 AIX admin  do following task while managing  print queue.
Print a job
Query the status of the job.
Cancel his print job.
Change priority of print job.
start or stop print queue.
start stop  ‘qdaemon’ on AIX.

Here i am discussing some command to check status of printer queue on AIX.
Check the status of the qdaemon process
 #ps -ef | grep qdaemon  //important process

If qdaemon process found in inoperative state then Start the qdaemon process by following command.
 #startsrc -s qdaemon
Stop the qdaemon
 #stopsrc -s qdaemon

***The qdaemon tracks both job requests and the resources(printer) necessary to complete the jobs.

There are diffrent commands to show status of printer queue on AIX.

example:

#lpstat
#enq -A
#lsallq

understand lpstat command output on AIX
======================================
#lpstat -p[queue name]
This command displays a list similar to the following:
Queue  Dev      Status      Job    Files      User      PP      %      Blks      CP      Rnk

Queue- Queue name
Dev- Queue device name
Status- Current status of the queue
Job -Job Number
Files- Name of file being printed
User- Aix user ID (owner of AIX print job)


PP- number of pages in print job
%- Percentage of AIX print job done.
Blks- Number of blocks the print job has broken
Cp- Number of copies
Rnk- Job rank in the print queue

qchk command example

#qchk -Pqueuename
shows status of a specific AIX queue
#qchk -A
Shows status of all AIX queues

There other command qadm in AIX to manage queue ,like printer queue UP and down.

example

#qadm -U[qname] Bring queue UP.
#qadm -D [qname] Bring queue DOWN.
#qadm -K [qname] Bring forcefully queue down.

===========================================

Different state of printer on AIX

Ready - Printer on AIX OS ready to accept print jobs
Dev-Wait- Printer is not ready, not on-line, out of paper paper jam, or
Running- Printer on AIX OS printing
Down - Printer is not ready but will accept jobs

Troubleshooting Printer queue on AIX.

possible reason for facing issue on AIX printer queue.

1.check printer cable properly connected or not
2.make sure that printer is online.
3.printer is not out of paper.
4.qdaemon process is running on AIX server.if "qdaemon" process not running no printer will able do his print job.
5.make sure that job is not already printed.
6.make sure that AIX admin not sent job to incorrect printer.
=========================================
How to mange print queue on AIX
===============================
In printer management on AIX we generally do following.

1.start printer queue.
2.stop printer queue.
3.know the status of printer queue.



1.How to stop/start Printer queue on AIX.

step 1.

SMIT spooler ----manage print queue----stop/start print queue ---Print queue name and press enter


===============================================

2.How to check status of Printer queue on AIX

SMIT  spooler ----manage print queue---know the status of print queue----enter print queue name
and press enter .

===============================================

Print Queue on AIX using command line
root@servername:/root : lpstat -p[queue_name]
Queue   Dev   Status    Job Files              User         PP %   Blks  Cp Rnk
------- ----- --------- --- ------------------ ---------- ---- -- ----- --- ---

Flag

-p   printer status

some example of lpstat from MAN page

Examples
       1    To display the status for all print queues, enter:

            lpstat
       2    To display the long status for all printers, enter:

            lpstat -t

       3    To display a job number in the print queue lp0, enter:

            lpstat -plp0 This command displays a list similar to the following:

            Queue  Dev      Status      Job    Files      User      PP      %      Blks      CP      Rnk
            lp0    dlp0     running     39     motd       guest     10      83      12        1       1



Command examples on AIX for managing printer.
===================================
Display the default queue on AIX :
#qchk -q

To display the status of the printer lp0 on AIX:
#qchk -P lp0

To display the status of specific job numberon AIX :
#qchk -# [job number]

To display the status of all queues:
#qchk -A

To cancel the specific print job on AIX:
#qcan -x [job number]

To enable queue xyz on AIX:
#enable xyz

To disable queue xyz:
#disable xyz

To display the status all queues:
#lpstat

To display the status of print queue lp0:
#lpstat -p lp0

To display the jobs submitted by user root AIX:
#lpstat -u root

To display the status of queue testq:
#lpq -P testq


     

No comments:

Post a Comment