PyKota's FAQ : # $Id$ * How can I diagnose the problem when something goes wrong ? Put "LogLevel debug2" in cupsd.conf (usually in /etc/cups/). Then put "logger: stderr", "debug: yes" and "crashrecipient: youremailaddress" in /etc/pykota/pykota.conf. Finally restart CUPS. CUPS' error_log file will now contain many informations which will help diagnose your problem. You will receive failure notices by email, and you can send all this to us for diagnostic. Please send complete files and not some sparse parts of them. Also please send the log files as gzipped (or bzip2-ed) attachments. For LPRng, better to put "logger: system" in pykota.conf so that all debug messages for PyKota will go to syslog's destination for the LPR syslog facility. IMPORTANT : please don't send log files to the mailing list unless they are very small of unless someone asked for this. * Some commands tell me I'm not allowed to use them, why ? Some commands refuse to work when launched as a normal user, and output a message saying "You're not allowed to use this command." This is because their use is reserved to PyKota Administrators. A PyKota Administrator is any user allowed to read the pykotadmin.conf file. Beware : any user who can read this file can connect to PyKota's database in read+write mode, so take care of not opening a breach when modifying the permissions on this file. * What permissions should I use on PyKota's configuration files ? It's probably best to do this : $ chown pykota.pykota pykota.conf pykotadmin.conf $ chmod 640 pykota.conf $ chmod 600 pykotadmin.conf Then the user 'pykota' will be the only PyKota Administrator (with user 'root' of course), but all members of the 'pykota' group will be allowed to use unrestricted PyKota commands like repykota. * How can I limit my users to N pages per day (month/year) ? The easiest way to do this is to create their print quota entries using something like : $ edpykota --add -S 30 -H 30 user1 user2 user3 ... this would limit users to 30 pages on each printer. Then in a crontab launched every day (month/year) you could do : 00 23 * * * /usr/bin/edpykota --reset this would reset every user's page counter to 0 on each printer at 23h00 every day. * How can I tell PyKota to allow some users to print without limitation ? Just create these users' print quota entries this way : $ edpykota --add --limitby quota --noquota user1 user2 ... This would effectively put these users in "no limit" mode on each printer. If you want to do this only on some printers, just use the --printer command line argument as well. See edpykota's documentation for details. Another way to do this when you limit your users by balance, is to set an overcharging factor of zero for every user you want to print with no limitation : $ edpykota --add --limitby balance --overcharge 0 user1 user2 ... * Nothing prints when my printer is in PowerSave mode, what can I do ? This happens if you use hardware accounting with SNMP, because some (all ?) printers don't say they are idle when they are in PowerSave mode. For now your best bet is to disable PowerSave mode in your printer. In the future, PyKota will modified to handle such problems. * I've installed all correctly, I've created users and printers, but when printing nothing works. What is the problem ? The most probable cause for this is that you didn't adapt /etc/pykota/pykota.conf to your own configuration. The file installed by default is just an example, you have to modify it. See the rest of this document to learn how to really diagnose what went wrong. * I've downloaded PyKota from CVS using a Windows based CVS tool, and now nothing works at all. What happened ? Some (all?) Windows based CVS tools translate *nix line endings (character Line Feed, ASCII code 10) into Windows line endings (character Carriage Return, ASCII code 13, followed with character Line Feed). This breaks the software which has to run under *nix compatible systems. Set correct options in your CVS software so that it doesn't do any translation, or use an Unix-like version of CVS, download again and reinstall the software. It should work. * Why doesn't CUPS under Debian Woody automatically detects PyKota managed devices ? The CUPS version in Debian Woody is 1.1.14 which is a bit too old. To use PyKota with this version, just install your printers as usual in CUPS web interface, and ensure they work fine, then save your changes, and modify /etc/cups/printers.conf manually as explained in PyKota's toplevel README file. Finally restart CUPS, and your printers should be managed by PyKota. Another solution is to install a newer CUPS release. * Is print accounting ever exact ? No. Print accounting is **never** exact, because it depends on external factors like the presence of paper in the printer, the quantity of remaining ink in the print cartridge, paper jams, etc... All these things are very difficult to account for correctly, and no print accounting package deals with these artefacts correctly in all situations. We are however confident that PyKota is one of the more exact print accounting software, because by default it asks the printers for how many pages they have really printed. * Can PyKota account for ink usage ? No. Actually PyKota doesn't account for ink usage, but this may come in a future release. PyKota only accounts for pages printed and/or money spent. If ink accounting is a necessity for you, PrintBill is recommended instead of PyKota. PrintBill allows you to bill differently per color, and to bill depending on the percent of the ink covered part of the pages. * What is a 'dumb printer' ? In PyKota, the term 'dumb printer' defines a printer which doesn't natively understand PostScript, PCL5 (up to), PCLXL (aka PCL6), PDF or ESC/P2 and doesn't have an internal page counter, and for which you don't know how to compute a job's size in number of pages by analyzing its content. Any printer which is not a 'dumb printer' according to the above definition is supported by PyKota. * How can I make PyKota work with my non-postscript printer under CUPS ? From version 1.16alpha7, PyKota includes a CUPS backend which allows you to use any type of printer and any driver, provided your printer is not a 'dumb printer' (see above). * How can I use my 'dumb printer' with CUPS and PyKota. You have to use a software accounter directive, and create a script which understands your printer's Page Description Language. PyKota natively understands DSC compliant PostScript, PCL3, PCL4, PCL5, PCLXL (aka PCL6), PDF and ESC/P2. Support for Binary PostScript is done through GhostScript. More PDLs will be added in the future. However you can always plug your own PDL analyzer in PyKota. * I've got a great number of users. How can I automatically set an initial print quota for them on first print ? You have to define an external policy for unknown users, to automatically add them to the Print Quota database. The sample configuration file contains examples to do this. * What does the --prototype command line option to edpykota do ? This option allows you to use an existing user or group as a template when creating or modifying other accounts. * How can I share print quota between some printers only (not all) ? To do this you have to put the printers into a printers group, and set quota on the printer group, instead of (or in addition to) the printers themselves. * What is a printer group ? A printer group is exactly like a normal printer, but is unknown by the printing system. You can use printer groups to share print quota between printers. * How can I create a printer group ? Just use pkprinters, like for normal printers, then create quota entries for users or users groups on it using the edpykota command * How can I put a printer into a printer group ? Use the pkprinters command to do this. $ pkprinters --help Will print the complete help and tell you how to do. * How quota checking and update is done with printer groups ? Print accounting and quota checking is done for a printer and all the printers groups it belongs to, recursively. If quota is reached on ANY of these printers for the current user, printing is denied. * Is this feature robust ? It should be. However, beware of integrity problems. LDAP has no sense of database integrity, and PostgreSQL constraints have not yet been fully implemented. The code actually *tries* to forbid circular printers groups, but if you create printer groups with another tool (e.g. psql or gq), then you are mostly on you own to not create infinite loops. * How is computed the job's price ? A job's price is computed with this formula : SUM((NbPages * PricePerPage) + PricePerJob) For current printer and all the printers groups it is a member of, if any, recursively. This may be difficult to grasp, but offers unprecedented flexibility. * My question isn't answered there, can you help ? Sure. Ask your question to the mailing list. If this is a frequently asked question, or if your problem is on the contrary very specific, it will probably be added to this document. You can also ask questions by IRC : /server irc.freenode.net /join #pykota Send any new questions to Jerome Alet -