Saturday, 19 September 2015

How to view printer status from the UNIX command line.


How can I view printer status information from the UNIX command line?

You can use the following commands to display information and printer status or copy it to a file.
  • Viewing the Print Job Status with lpq and lpstat
    • BSD UNIX workstation, Linux
      % lpq -Pprinter_name
    • System V UNIX, Solaris, HP-UX
      % lpstat -o printer_name
      If you are using HP-UX, do not put a space between "-o" and "printer name".

  • Viewing the Printer Status with rsh and ftp
    • rsh
      % rsh host_name parameter
      If your workstation is HP-UX, use the remsh command instead of rsh.
    • ftp
      % ftp host_name
      User user_name
      password:
      ftp> get parameter -

      Leave the user name and password blank.
      "-" indicates standard output.
    • The following parameters can be used with rsh, rcp, and ftp:
      • stat returns the status of the device and information about print jobs.
      • info returns information about the paper tray, output tray and printer language.
      • prnlog returns a record of the last 10 print jobs.
      • syslog returns messages about the network infterface board.

  • Copying Information to a File
    • rcp
      % rcp host_name:parameter file_name
    • ftp
      % ftp host_name
      User: user_name
      password:
      ftp> get parameter file_name

      Leave the user name and password blank.
Share This

No comments:

Post a Comment

Register Now

Contact Form

Name

Email *

Message *