Changeset 1475 for pykota/trunk/conf/pykota.conf.sample
- Timestamp:
- 05/13/04 15:59:30 (20 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/conf/pykota.conf.sample
r1442 r1475 182 182 # supported values : 183 183 # 184 # - querying: asks the printer for its lifetime page counter184 # - hardware : asks the printer for its lifetime page counter 185 185 # via either SNMP, AppleTalk, or any external 186 186 # command. This method is the method used by 187 187 # default in PyKota since its beginning. 188 188 # 189 # - external : delegates the job's size computation to any 190 # external command of your choice. A stupid and 191 # completely unreliable example, but which 192 # shows what this command may be is : 193 # 194 # accounter: external(/bin/grep -c showpage) 195 # 196 # Another one, which should work with all DSC 197 # compliant Postscript files : 198 # 199 # accounter: external(/bin/grep -c "%%Page:") 200 # 201 # Finally the new smart external accounter which 202 # can handle both PostScript and PCL documents : 203 # 204 # accounter: external(/usr/bin/pkpgcounter) 205 # 206 # - stupid : counts the occurences of the 'showpage' postscript 207 # statement in the document to be printed. 208 # THIS IS NOT RELIABLE. This is just to serve as 209 # an example on how to implement your own accounting 210 # method. Use pkpgcounter instead. 211 # 189 # - software : delegates the job's size computation to any 190 # external command of your choice. 191 # 192 # best choice for this is probably to set it 193 # this way : 194 # 195 # accounter: software(/usr/bin/pkpgcounter) 196 # 197 # pkpgcounter is a command line tool which is 198 # part of PyKota and which can handle both 199 # DSC compliant PostScript documents and PCL5 200 # documents. More file formats will be added 201 # in the future, as time permits. 202 # 203 # while pkpgcounter is the recommended value 204 # you can use whatever command you want provided 205 # that your command accepts the job's data on its 206 # standard input and prints the job's size in pages 207 # as a single integer on its standard output. 208 # 212 209 # This value can be set either globally or on a per printer basis 213 210 # If both are defined, the printer option has priority. 214 # if not set it defaults to 'querying'. 215 # 216 # A script which seems to be accurate, copy it from the 217 # untested/postscript directory to another place. 218 # accounter: external(/usr/share/pykota/pagecount.sh) 219 # WARNING : it may not work when multiple copies are asked. 220 # this breaks ghostscript, I don't know why yet. 211 # if not set it defaults to 'hardware'. 221 212 # 222 213 # default value 223 accounter: querying 214 accounter: hardware 215 # accounter: software(/usr/bin/pkpgcounter) 224 216 225 217 # Print Quota administrator … … 326 318 327 319 # How to query the hpmarketing printer for its page counter. 328 # THIS IS ONLY USED IF YOU HAVE SET 'accounter' TO ' querying'320 # THIS IS ONLY USED IF YOU HAVE SET 'accounter' TO 'hardware' 329 321 # JUST COMMENT IT OUT IF YOU USE ANY OTHER ACCOUNTING METHOD. 330 322 # (it would be ignored anyway) … … 332 324 # In the lines below "%(printer)s" is automatically replaced 333 325 # at run time with your printer's Fully Qualified Domain Name 326 # for network printers. 334 327 # e.g. myprinter.example.com 335 328 # 336 # Only snmp(community, oid) and external(command) are supported329 # Only value supported is : external(... your command here...) 337 330 # 338 331 # Example : 332 # 339 333 # requester: external(/usr/bin/snmpget -v1 -c public -Ov %(printer)s mib-2.43.10.2.1.4.1.1 | cut -f 2,2 -d " ") 340 # and :341 # requester: snmp(public, mib-2.43.10.2.1.4.1.1)342 # are equivalent343 #344 #################################################345 # NB : the 'snmp()' requester is now deprecated #346 # because it has some accuracy problems. #347 # please use 'external()' instead. #348 #################################################349 334 # 350 335 # Another untested example, using npadmin : 336 # 351 337 # requester: external(/usr/bin/npadmin --pagecount %(printer)s) 352 338 # … … 355 341 # pagecount.ps file from untested/netatalk into /etc or any 356 342 # appropriate location) 343 # 357 344 # requester: external(/usr/share/pykota/papwaitprinter.sh "MyPrinter:LaserWriter@*" && /usr/bin/pap -p "MyPrinter:LaserWriter@*" /usr/share/pykota/pagecount.ps 2>/dev/null | /bin/grep -v status | /bin/grep -v Connect | /usr/bin/tail -1) 358 345 # … … 361 348 # requester: external(/bin/cat /usr/share/pykota/pagecount.pjl >/dev/lp0 && /usr/bin/head -2 </dev/lp0 | /usr/bin/tail -1) 362 349 # 363 #364 350 # This value can be set either globally or per printer or both. 365 351 # If both are defined, the printer option has priority. 366 #367 # NB : The SNMP oid mib-2.43.10.2.1.4.1.1 works on HP Laserjet Printers, but it may368 # be different with other brands, refer to your printer's documentation369 # for details. Also you may have to specify -v2c or -v3 depending on your370 # printer's support for different versions of the SNMP specification.371 #372 352 # 373 353 # Some examples and comments provided by Bob Martel from csuohio.edu … … 382 362 # 383 363 # requester: external(/opt/local/net-snmp/bin/snmpwalk -v 1 -Cc -c public -Ov %(printer)s | grep Counter32 | tail -2 | head -1 | cut -d " " -f2) 384 #385 364 # 386 365 # An example using netcat and a preformatted PJL job which you can find … … 390 369 # requester: external(/bin/nc -w 2 %(printer)s 9100 </usr/share/pykota/pagecount.pjl | /usr/bin/tail -2) 391 370 # 392 #393 371 # An example using the contributed pagecount.pl script which does 394 372 # the same as above, but should work on more printers : 395 373 # 396 374 # requester: external(/usr/share/pykota/pagecount.pl %(printer)s 9100) 397 #398 375 # 399 376 # WARNING : In any case, when using an external requester, please test the command line outside … … 404 381 # not yet finished (not all pages are printed, but the complete job is in 405 382 # the printer) 383 # 384 # YOU ABSOLUTELY HAVE TO BE SURE YOU HAVE A SCRIPT WHICH WAITS FOR THE 385 # PRINTER BEING READY BEFORE ASKING FOR ITS INTERNAL PAGE COUNTER. 386 # 387 # PYKOTA INCLUDES SUCH SCRIPTS FOR SNMP AND APPLETALK PRINTERS, MORE TO COME 388 # 389 # default value 406 390 requester: external(/usr/share/pykota/waitprinter.sh %(printer)s && /usr/bin/snmpget -v1 -c public -Ov %(printer)s mib-2.43.10.2.1.4.1.1 | cut -f 2,2 -d " ") 407 391