.TH PAGECOUNT 1 "December 1993" "USGS Local" .SH NAME pagecount \- get page count from PostScript AppleTalk printer using CAP .SH SYNOPSIS .I /usr/local/cap/usgs/pagecount ATname [ delay ] .SH DESCRIPTION .I pagecount returns the lifetime number of pages printed from a PostScript printer via AppleTalk. .I pagecount is a shell script that uses the .IR lwpr command supplied with CAP (Columbia AppleTalk Package). .PP If the printer is down, .I pagecount returns "0". .PP You should use the .I getzones and .I atlooklws CAP commands to get the exact names of printers. .SH ARGUMENTS .TP .B ATname is the full AppleTalk/CAP name of a laser printer, in the form: .sp PrinterName:LaserWriter@ZoneName .sp where: .sp .I PrinterName is the short name of the printer .sp LaserWriter is literal .sp .I ZoneName is the name of the printer's Zone. .IP Note that names with spaces and other special characters should be quoted. .TP .B delay is an optional argument, specifying the delay time in seconds, default 10 seconds. Some printers might consistently take longer to respond to a query. .SH EXAMPLES Let's say you want the page count of a laser printer named \*(lqPaperMate\*(rq in a zone named \*(lqTwilight\*(rq. .sp .RS .nf % pagecount PaperMate:LaserWriter@Twilight .br 931207 .br % .fi .RE .PP PaperMate has printed 931,207 pages in it's lifetime. .PP If \*(lqPaperMate\*(rq consistently takes more than 10 seconds to respond, but usually less than a minute: .sp .RS .nf % pagecount PaperMate:LaserWriter@Twilight 60 .br 931220 .br % .fi .RE .PP To track printer use over time, for the printer \*(lqBic\*(rq in zone \*(lqRed\*(rq, put the following line in .IR crontab (1): .sp .RS .nf 0 2 * * * pagecount Bic:LaserWriter@Red > Bic.pc .fi .RE .PP You will get one line every day, with \*(lqBic's\*(rq pagecount taken at 2:00 AM. .SH LIMITATIONS Created and tested on SunOS 4.1.3 with CAP 6 pl 126 .SH SEE ALSO CAP manuals .SH AUTHOR Rex Sanders, US Geological Survey, Pacific Marine Geology .br US Government work in the public domain.