{"id":1014,"date":"2016-12-28T08:56:44","date_gmt":"2016-12-28T14:56:44","guid":{"rendered":"http:\/\/blog.ls-al.com\/?p=1014"},"modified":"2016-12-28T08:56:44","modified_gmt":"2016-12-28T14:56:44","slug":"solaris-lp-printer-queue-job-ids","status":"publish","type":"post","link":"https:\/\/blog.ls-al.com\/solaris-lp-printer-queue-job-ids\/","title":{"rendered":"Solaris lp printer queue job ids"},"content":{"rendered":"
If you have a Unix queue name that is long, your job id's may be cut off in the list. So you will be trying to troubleshoot\/cancel jobs with \"not-found\" messages.<\/p>\n
lpstat output. Note all job id\u2019s cut off\u2026<\/p>\n
\r\nprinter company_check_M402n now printing company_check_M402n-19101. enabled since Wed Dec 28 05:54:55 2016. available.\r\n[..]\r\ncompany_check_M402n-191 ebsuser_a 1165 Dec 27 15:36\r\n<\/pre>\nCorrect job id\u2019s shown with a short script. Script below is self explanatory:<\/p>\n
\r\n~\/scripts# python check_spool.py \r\nListing LP spool job id's\r\ncompany_check_M402n-19104\r\n\r\n# cat check_spool.py \r\nfrom os import listdir,path\r\nfrom os.path import isfile, join\r\nprint "Listing LP spool job id's"\r\nspoolpath='\/var\/spool\/lp\/requests\/localhost\/'\r\nonlyfiles = [f for f in listdir(spoolpath) if isfile(join(spoolpath, f))]\r\nfor f in onlyfiles:\r\n fname = path.abspath(spoolpath + f)\r\n with open(fname) as spoolfile:\r\n lines = spoolfile.readlines()\r\n print lines[0].strip()\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"If you have a Unix queue name that is long, your job id’s may be cut off in the list.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[50,14],"tags":[],"class_list":["post-1014","post","type-post","status-publish","format-standard","hentry","category-printing","category-solaris"],"_links":{"self":[{"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/posts\/1014","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/comments?post=1014"}],"version-history":[{"count":0,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/posts\/1014\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/media?parent=1014"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/categories?post=1014"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/tags?post=1014"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}