[cups.general] Getting printjob pagecounts when SNMP won't work
Jerome Alet
alet at librelogiciel.com
Wed Feb 1 13:31:34 PST 2006
On Wed, Feb 01, 2006 at 11:07:15AM -0800, Rob Tanner wrote:
>
> I am setting up a print server where we will be doing print charge back
> accounting (users pay by the page). The backend wrapper "accsnmp"
> works great for all but two printers that are too old and don't support
> the common printer MIB. Therefore, I presume that I need to use either
> postscript or pcl to read the pagecounter before and after, and also to
> get the printer status (printing and idle). Does anyone have any code
> snippets that do that or is there yet another mechanism to accomplish
> the same thing.
You could grab PyKota using subversion :
$ cd /tmp
$ svn co svn://svn.librelogiciel.com/pykota/trunk pykota
$ cd pykota/pykota/accounters
and then :
$ python pjl.py your_printer_ip_address
if you've got a meaningful result, then adapt this Python script to your
needs (no need to setup PyKota at all).
NB : the script should exit after 3 or 4 queries to the printer,
if not, you're on your own...
hoping this helps
bye
Jerome Alet
More information about the cups
mailing list