Oi pessoal, estou precisando de ajuda pra imprementar quotas de impressão, jÃ&iexl; estou tentando fazer isso hÃ&iexl; um bom tempo e ele estÃ&iexl; se esgotando e estou desesperado . JÃ&iexl; estudei a documentação antes que me sugiram isso.
JÃ&iexl; tentei cups + pykota , lprng + printbill estava até com a ideia de fazer um programa que lesse o log do cups mas ele estÃ&iexl; sendo gerado errado. Uso o cups-1.1.17-13.3 no RedHat 9, e lendo na documentação dele (cups) descobri o page_log. O problema é que ele armazena o numero de paginas errado. Quaquer que seja a quantidade o CUPS coloca lÃ&iexl; no arquivo como se fosse só uma pagina. Ultimas linhas do page_log: laserjet flavia 1 [01/Sep/2003:16:17:45 -0300] 1 1 laserjet flavia 2 [01/Sep/2003:16:31:41 -0300] 1 1 laserjet jean 3 [01/Sep/2003:12:27:49 -0300] 1 1 laserjet jean 4 [01/Sep/2003:12:28:32 -0300] 1 1 laserjet jean 5 [01/Sep/2003:12:29:05 -0300] 1 1 laserjet jean 6 [01/Sep/2003:12:29:27 -0300] 1 1 laserjet jean 8 [01/Sep/2003:12:30:37 -0300] 1 1 laserjet jean 9 [01/Sep/2003:12:31:04 -0300] 1 1 laserjet jean 10 [01/Sep/2003:12:32:04 -0300] 1 1 laserjet jean 11 [01/Sep/2003:12:32:34 -0300] 1 1 laserjet suporte 12 [01/Sep/2003:12:44:04 -0300] 1 1 laserjet suporte 13 [01/Sep/2003:12:49:47 -0300] 1 1 laserjet suporte 14 [01/Sep/2003:14:06:52 -0300] 1 1 laserjet flavia 15 [01/Sep/2003:16:48:10 -0300] 1 1 laserjet flavia 16 [01/Sep/2003:16:50:21 -0300] 1 1 laserjet flavia 17 [01/Sep/2003:16:53:07 -0300] 1 1 laserjet flavia 18 [01/Sep/2003:16:54:27 -0300] 1 1 laserjet flavia 19 [01/Sep/2003:16:57:39 -0300] 1 1 Tentei utilizar o pykota mas não consegui fazer o ldap funcionar. Tentei utilizar a dobradinha LPRng + printbill mas o printbill sempre dÃ&iexl; um erro na função gettext do perl. Samba-HOWTO-Collection-3.0-PrintingChapter-11th-draft.pdf The page_log File Syntax These are the items CUPS logs in the "page_log" for every single *page* of a job: * Printer name * User name * Job ID * Time of printing * the page number * the number of copies * a billing info string (optional) * the host which sent the job (included since version 1.1.19) Here is an extract of my CUPS server's page_log file to illustrate the format and included items: infotec_IS2027 kurt 401 [22/Apr/2003:10:28:43 +0100] 1 3 #marketing 10.160.50.13 infotec_IS2027 kurt 401 [22/Apr/2003:10:28:43 +0100] 2 3 #marketing 10.160.50.13 infotec_IS2027 kurt 401 [22/Apr/2003:10:28:43 +0100] 3 3 #marketing 10.160.50.13 infotec_IS2027 kurt 401 [22/Apr/2003:10:28:43 +0100] 4 3 #marketing 10.160.50.13 DigiMaster9110 boss 402 [22/Apr/2003:10:33:22 +0100] 1 440 finance-dep 10.160.51.33 This was job ID "401", printed on "infotec_IS2027" by user "kurt", a 64-page job printed in 3 copies and billed to "#marketing"..., sent from IP address 10.160.50.13. The next job had ID "402", was sent by user "boss" from IP address 10.160.51.33,printed from one page 440 copies and is set to be billed to "finance-dep" Printing Support in SAMBA 3.0 73 sam.pdf The page_log File The page_log file lists each page that is sent to a printer. Each line contains the following information: printer user job-id date-time page-number num-copies job-billing hostname DeskJet root 2 [20/May/1999:19:21:05 +0000] 1 0 acme-123 localhost The printer field contains the name of the printer that printed the page. If you send a job to a printer class, this field will contain the name of the printer that was assigned the job. The user field contains the name of the user (the IPP requesting-user-name attribute) that submitted this file for printing. The job-id field contains the job number of the page being printed. Job numbers are reset to 1 whenever the CUPS server is started, so don't depend on this number being unique! The date-time field contains the date and time of when the page started printing. The format of this field is identical to the data-time field in the access_log file. The page-number and num-pages fields contain the page number and number of copies being printed of that page. For printer that can not produce copies on their own, the num-pages field will always be 1. The job-billing field contains a copy of the job-billing attribute provided with the IPP create-job or print-job requests or "-" if none was provided. The hostname field contains the name of the host (the IPP job-originating-host-name attribute) that originated the print job. até mais, Jeferson __________________________________________________________________________ Acabe com aquelas janelinhas que pulam na sua tela. AntiPop-up UOL - � gr�tis! http://antipopup.uol.com.br/ --------------------------------------------------------------------------- Esta lista � patrocinada pela Conectiva S.A. Visite http://www.conectiva.com.br Arquivo: http://bazar2.conectiva.com.br/mailman/listinfo/linux-br Regras de utiliza��o da lista: http://linux-br.conectiva.com.br FAQ: http://www.zago.eti.br/menu.html
