na.lpstat manual page
Table of Contents

NAME

na.lpstat - print the line printer status and information

DESCRIPTION

This proxy agent, originated from the lpq program, allows you to examine the printer status and the print scheduler to examine the print job queue.

If the spooling directory is not defined in the /etc/printcap file, the default directory is used.

na.lpstat has to be run as root.

ATTRIBUTES

na.lpstat has one attribute group, status, and one attribute table, queue.

The status group reports printer status. The group includes:

status - printer status text string (string[32]) statusCode - indicates printer status: 0 - idle, 1 - waiting, 2 - printing, 3 - printer error. (int) daemonPresent - (for SunOS 4.x systems only) indicates whether the lp daemon is present. The value ``true'' means that the daemon is running, while ``false'' means the daemon is not running. (enum)
printerQueue - (for SunOS 4.x systems only) indicates whether the printer queue is turned on. The value ``on'' means the queue is turned on. The value``off'' means the queue is turned off. (enum) lpScheduler (for SunOS 5.x sys-tems only) indicates whether the lpScheduler program is available. True indicates that the printer is available; False indicates a printer is not available.

The queue table reports the job queue of printer. The key is the owner name of the job.

ownerName - owner name of the print job (string[32]) rank - rank of the print job (string[32]) jobNumber - job number of the print job (int) totalBytes - total number of bytes of the file to be printed (long)

OPTIONS

No options accepted.

ERRORS

cannot open printer description file
cannot open the description file (that is, /etc/printcap ) for the printer.

unknown printer
printer name is unknown to the proxy agent.

connection is down
connection to the remote printer is down.

lost connection
connection to the remote printer is lost.

cannot chdir to spooling directory
cannot change current directory to spooling directory. The directory might not exist or give the user access permission.

cannot examine spooling area
cannot examine the spooling directory; this might be related to previous error.

no remote host to connect to
no remote host name defined in the printer description file, or the name is unknown to the proxy agent.

unknown host
remote host name is unknown to the proxy agent.

printer/tcp: unknown service
service unknown to proxy agent.

cannot report status group
proxy agent is unable to report group `status' for building report error.

cannot report queue table
proxy agent is unable to report table `queue' for building report error.

cannot open lock file(permission denied)
unable to open the printer lock file, possibly no root permission.

printer is down
printer is down.

no daemon present
warning message, no lp daemon running.

NOTES

The proxy agent is dependent upon the lp daemon. It examines the status and controls files in the spooling directory that the daemon creates.

The `statusCode' attribute in the `status' group is provided for ease in setting up the thresholds for the printer status. The attribute `status' is an ASCII string. Note that there is no distinction between what kind of printer error may have occurred (for example, out of paper, paper jammed); all errors have a statusCode of 3.

Like the lpq program, the proxy depends on the printcap file.


Table of Contents