lpstat 會顯示列印佇列中的工作:請求 ID、擁有者、檔案大小,以及工作被送出時的狀態資訊。
想看全部輸出請求而不只是自己的,加上 -o:
$ lpstat -o laserp-573 john 128865 Nov 7 11:27 on laserp laserp-574 grace 82744 Nov 7 11:28 laserp-575 john 23347 Nov 7 11:35
工作會依實際列印的順序排列。
$ lpq laserp is ready and printing Rank Owner Job Files Total Size active john 573 report.ps 128865 bytes 1st grace 574 ch03.ps ch04.ps 82744 bytes 2nd john 575 standard input 23347 bytes
第一行顯示印表機狀態;若印表機被停用或紙張用盡,這裡會出現不同的訊息,這也是排查「檔案送進去卻不出紙」的第一個觀察點。
要查印表機本身的設定與埠狀態,可用 lpstat -p;要看到目前被停用的目標,則是 lpstat -P。