qchk Command

Purpose

Displays the status of a print queue.

Syntax

qchk [ -A ] [ -L ] [ -W ] [ -P Printer ] [ -# JobNumber ] [ -q ] [ -u UserName ] [ -w Delay ]

Description

The qchk command displays the current status information regarding specified print jobs, print queues, or users. Use the appropriate flag followed by the requested name or number to indicate specific status information. If you run the qchk command with no flags, the status of the default queue is returned.

You can use the Printer Queues application in Web-based System Manager (wsm) to change printer characteristics.

You could also use the System Management Interface Tool (SMIT) smit qchk fast path to run this command.

Flags

Item Description
-# JobNumber Requests the status of the job number specified by the JobNumber variable. The qchk command looks for JobNumber on the default queue when the -#JobNumber flag is used alone. To search for JobNumber on all queues -# flag must be used with the -A flag. The -# flag may also be used in conjunction with the -P Queue flag.
Notes:
  1. Specify the -P Queue to override the default destination printer.
  2. If jobs 1, 2, and 3 are in the printer queue, and you specify that you want the status of job 3 while job 1 is running, the status information will show job 1 and job 3, not only job 3.
  3. If you specify a job number that does not exist, the system displays the current job number on the queue instead of an error message.
-A Requests the status of all queues.
-L Displays information in a long-form mode. If the -L and -W flags are used simultaneously, the-L flag displays status of the print job in a semicolon-separated format.
-P Printer Requests the status of the printer specified by the Printer variable.
-q Requests the status of the default print queue.
-u UserName Requests the status of all print jobs sent by the user specified by the UserName variable.
-W Displays information in a wide-form mode with longer queue names, device names, and job numbers. Larger job number information is supported on AIX® 4.3.2 and later. If the -W and -L flags are used simultaneously, the -W flag displays the status of the print job in a semicolon-separated format.
-w Delay Updates requested status information at intervals, in seconds, as specified by the Delay variable until all print jobs are finished.

Security

Attention RBAC users and Trusted AIX users: This command can perform privileged operations. Only privileged users can run privileged operations. For more information about authorizations and privileges, see Privileged Command Database in Security. For a list of privileges and the authorizations associated with this command, see the lssecattr command or the getcmdattr subcommand.

Examples

  1. To display the default print queue, enter:

    qchk  -q

  2. To display the long status of all queues until empty, while updating the screen every 5 seconds, enter:

    qchk  -A  -L  -w 5

  3. To display the status for printer lp0, enter:

    qchk  -P lp0

  4. To display the status for job number 123, enter:

    qchk  -# 123

  5. To display the status of all print jobs while restricting the queue status to only printer lp0, enter:

    qchk  -A  -P lp0

  6. To display the wide status of the default print queue for AIX 4.2.1 or later, enter:

    qchk  -W  -q

Files

Item Description
/usr/sbin/qdaemon Contains the qdaemon daemon.
/var/spool/lpd/qdir/* Contains the job description files.
/var/spool/lpd/stat/* Contains information on the status of the devices.
/var/spool/qdaemon/* Contains the temporary copies of enqueued files.
/etc/qconfig Contains the configuration file.
/etc/qconfig.bin Contains the digested, binary version of the /etc/qconfig file.