[cups.general] Output of "lpstat -p"
Markus.Grunwald at pruftechnik.com
Markus.Grunwald at pruftechnik.com
Mon Jan 15 08:14:51 PST 2007
Hello,
Writing some scripts (printer queue/printer status in this case) for cups,
I found the output of "lpstat -p" most helpfull. I experimented with the
Stylus C42UX driver and got this output:
printer C46 is idle. enabled since Jan 01 00:00
printer C46 now printing C46-1. enabled since Jan 01 00:00
Starting ESP Ghostscript 7.07.1...
printer C46 now printing C46-1. enabled since Jan 01 00:00
Processing page 1...
printer C46 now printing C46-1. enabled since Jan 01 00:00
Printing page 1, 5%
printer C46 now printing C46-1. enabled since Jan 01 00:00
Printing page 1, 100%
printer C46 now printing C46-1. enabled since Jan 01 00:00
Unable to open USB device "usb:/dev/usb/lp0: No such device
[ attach the printer ]
printer C46 now printing C46-1. enabled since Jan 01 00:00
Sending print file, 8192 bytes...
printer C46 now printing C46-1. enabled since Jan 01 00:00
Sending print file, 8192 bytes...
printer C46 is idle. enabled since Jan 01 00:00
Sending print file, 1261568 bytes...
With a few regular expressions, this can be parsed very nicely and I was
happy.
Until I tried the same with "PCL4 Printer Foomatic/laserjet(recommended)".
Everything I got from this driver was:
printer LJ is idle. enabled since Jan 01 00:00
printer LJ now printing LJ-3. enabled since Jan 01 00:00
printer LJ now printing LJ-3. enabled since Jan 01 00:00
printer LJ now printing LJ-3. enabled since Jan 01 00:00
printer LJ now printing LJ-3. enabled since Jan 01 00:00'
Unable to open USB device "usb:/dev/usb/lp0"
[ lprm - ]
printer LJ is idle. enabled since Jan 01 00:00
Unable to open USB device "usb:/dev/usb/lp0"
printer LJ now printing LJ-3. enabled since Jan 01 00:00
Unable to open USB device "usb:/dev/usb/lp0"
1) No nice progress information :(
2) In the last two lines: Since the indented line always just prints the
_last_ message and the LJ driver doesn't give any other output (see 1) ),
I can't find out whether the printer is attached and the message is
outdated or if the printer really isn't attached.
Now, my question is: What part of cups is responsible for the nice output
of the C42 and the ugly output of the LJ driver? Can I _somehow_ adjust
the LJ (and possibly many others, I didn't try them all...) output of
'lpstat -p' ?
Many thanks,
Markus Grunwald
Softwareentwicklung
PRÜFTECHNIK Condition Monitoring GmbH
Oskar-Messter-Straße 19-21
85737 Ismaning
www.pruftechnik.com
Tel: +49 (0)89 99616177
Fax: +49 (0)89 99616200
More information about the cups
mailing list