Some years ago, the
lpstat
command would report if a printer is offline. This features seems to have disappeared; it doesn't seem to be available in Ventura. Is there a way to determine from the terminal (or a shell script) whether or not a printer is online? The printer list in System Settings can display whether a printer is online, so I hope there might be shell-script way of doing it.
I've searched extensively, and can't find an uptodate answer.
At nohillside's request, here are the results of lpstat -v
:
device for Cheryl_LaserJet_400_MFP_M425dn: dnssd://Cheryl%20LaserJet%20400%20MFP%20M425dn._ipp._tcp.local./?uuid=434e4638-4837-5139-4b4d-5820b14df350
device for Cheryl_LaserJet_400_MFP_M425dn__Fax_: hpfax://HPDMF/v=1&connectionType=Rendezvous&BonjourServiceName=Cheryl%20LaserJet%20400%20MFP%20M425dn&BonjourServiceDomain=local.
device for Cheryl_Maine_HP_LaserJet_Pro_4001: dnssd://Cheryl%20Maine%20HP%20LaserJet%20Pro%204001._ipps._tcp.local./?uuid=ffce78bf-f267-45e0-a6ba-bc6bca9244f4
device for Cheryl_Maine_LaserJet_400_M401dne: dnssd://HP%20LaserJet%20400%20M401dne%20(008C0F)._ipp._tcp.local./?uuid=50484746-4735-3438-3138-3ca82a008c0f
device for Dining_Room_LaserJet_M203dw: dnssd://Dining%20Room%20LaserJet%20M203dw._ipps._tcp.local./?uuid=564e4233-4730-3335-3835-e8d8d17c268c
device for Edward_Maine_LaserJet_Pro_MFP_4101: dnssd://Edward%20Maine%20LaserJet%20Pro%20MFP%204101._ipps._tcp.local./?uuid=3c2813b1-8436-4229-8f81-63cd67d913a7
device for Edward_Maine_LaserJet_Pro_MFP_4101___Fax: dnssd://Edward%20Maine%20LaserJet%20Pro%20MFP%204101._ipps._tcp.local./?uuid=3c2813b1-8436-4229-8f81-63cd67d913a7
device for HP_Color_LaserJet_Pro_M252dw: dnssd://HP%20Color%20LaserJet%20Pro%20M252dw%20(F6E983)._ipps._tcp.local./?uuid=564e4233-4631-3036-3833-3ca82af6e983
device for HP_LaserJet_P3010_Series: dnssd://HP%20LaserJet%20P3010%20Series%20%5B13EF70%5D._printer._tcp.local./BINPS
device for Maine_Color_OfficeJet_Pro_8210: dnssd://Maine%20Color%20OfficeJet%20Pro%208210._ipps._tcp.local./?uuid=71efec68-1a90-5a15-e447-35b576ea90b4
device for PDFwriter: pdfwriter:/
and for lpinfo -v
:
network smb
network https
network lpd
network ipps
network http
network ipp
network socket
fax hpfax
direct hpFaxbackend
network dnssd://Cheryl%20LaserJet%20400%20MFP%20M425dn._ipp._tcp.local./?uuid=434e4638-4837-5139-4b4d-5820b14df350
network dnssd://Dining%20Room%20LaserJet%20M203dw._ipp._tcp.local./?uuid=564e4233-4730-3335-3835-e8d8d17c268c
network dnssd://HP%20Color%20LaserJet%20Pro%20M252dw%20(F6E983)._ipp._tcp.local./?uuid=564e4233-4631-3036-3833-3ca82af6e983
network dnssd://HP%20LaserJet%20P3010%20Series%20%5B13EF70%5D._printer._tcp.local./
fax hpfax://HPDMF/v=1&connectionType=Rendezvous&BonjourServiceName=Cheryl%20LaserJet%20400%20MFP%20M425dn&BonjourServiceDomain=local.
The second list is an accurate list but incomplete list of available printers, as it doesn't include the virtual PDFWriter printer, but this seems to be the closest thing to a solution.
Asked by emendelson
(233 rep)
Oct 9, 2023, 02:36 AM
Last activity: May 22, 2025, 12:08 AM
Last activity: May 22, 2025, 12:08 AM