[1175] | 1 | PyKota's FAQ : |
---|
| 2 | |
---|
| 3 | # $Id$ |
---|
| 4 | |
---|
[2045] | 5 | * How can I diagnose the problem when something goes wrong ? |
---|
| 6 | |
---|
| 7 | Put "LogLevel debug2" in cupsd.conf (usually in /etc/cups/). |
---|
| 8 | Then put "logger: stderr", "debug: yes" and |
---|
| 9 | "crashrecipient: youremailaddress" in /etc/pykota/pykota.conf. |
---|
| 10 | Finally restart CUPS. |
---|
| 11 | CUPS' error_log file will now contain many informations which |
---|
| 12 | will help diagnose your problem. You will receive failure |
---|
| 13 | notices by email, and you can send all this to us for |
---|
[2046] | 14 | diagnostic. Please send complete files and not some sparse |
---|
| 15 | parts of them. Also please send the log files as gzipped |
---|
| 16 | (or bzip2-ed) attachments. |
---|
[2045] | 17 | |
---|
| 18 | For LPRng, better to put "logger: system" in pykota.conf so |
---|
[2046] | 19 | that all debug messages for PyKota will go to syslog's |
---|
| 20 | destination for the LPR syslog facility. |
---|
[2054] | 21 | |
---|
| 22 | IMPORTANT : please don't send log files to the mailing list |
---|
| 23 | unless they are very small of unless someone asked for this. |
---|
[2045] | 24 | |
---|
[2068] | 25 | * Some commands tell me I'm not allowed to use them, why ? |
---|
| 26 | |
---|
| 27 | Some commands refuse to work when launched as a normal user, |
---|
| 28 | and output a message saying "You're not allowed to use this |
---|
| 29 | command." This is because their use is reserved to PyKota |
---|
| 30 | Administrators. A PyKota Administrator is any user allowed |
---|
| 31 | to read the pykotadmin.conf file. Beware : any user who can |
---|
| 32 | read this file can connect to PyKota's database in read+write |
---|
| 33 | mode, so take care of not opening a breach when modifying |
---|
| 34 | the permissions on this file. |
---|
| 35 | |
---|
| 36 | * What permissions should I use on PyKota's configuration files ? |
---|
| 37 | |
---|
| 38 | It's probably best to do this : |
---|
| 39 | |
---|
| 40 | $ chown pykota.pykota pykota.conf pykotadmin.conf |
---|
| 41 | $ chmod 640 pykota.conf |
---|
| 42 | $ chmod 600 pykotadmin.conf |
---|
| 43 | |
---|
| 44 | Then the user 'pykota' will be the only PyKota Administrator |
---|
| 45 | (with user 'root' of course), but all members of the 'pykota' |
---|
| 46 | group will be allowed to use unrestricted PyKota commands |
---|
| 47 | like repykota. |
---|
| 48 | |
---|
[2047] | 49 | * How can I limit my users to N pages per day (month/year) ? |
---|
| 50 | |
---|
| 51 | The easiest way to do this is to create their print quota |
---|
| 52 | entries using something like : |
---|
| 53 | |
---|
| 54 | $ edpykota --add -S 30 -H 30 user1 user2 user3 ... |
---|
| 55 | |
---|
| 56 | this would limit users to 30 pages on each printer. |
---|
| 57 | |
---|
| 58 | Then in a crontab launched every day (month/year) you could |
---|
| 59 | do : |
---|
| 60 | |
---|
| 61 | 00 23 * * * /usr/bin/edpykota --reset |
---|
| 62 | |
---|
| 63 | this would reset every user's page counter to 0 on each printer |
---|
| 64 | at 23h00 every day. |
---|
| 65 | |
---|
| 66 | * How can I tell PyKota to allow some users to print without limitation ? |
---|
| 67 | |
---|
| 68 | Just create these users' print quota entries this way : |
---|
| 69 | |
---|
| 70 | $ edpykota --add --limitby quota --noquota user1 user2 ... |
---|
| 71 | |
---|
| 72 | This would effectively put these users in "no limit" mode on |
---|
| 73 | each printer. If you want to do this only on some printers, just |
---|
| 74 | use the --printer command line argument as well. See |
---|
| 75 | edpykota's documentation for details. |
---|
[2054] | 76 | |
---|
| 77 | Another way to do this when you limit your users by balance, is |
---|
| 78 | to set an overcharging factor of zero for every user you want to |
---|
| 79 | print with no limitation : |
---|
| 80 | |
---|
| 81 | $ edpykota --add --limitby balance --overcharge 0 user1 user2 ... |
---|
[2047] | 82 | |
---|
[1947] | 83 | * Nothing prints when my printer is in PowerSave mode, what |
---|
| 84 | can I do ? |
---|
[2047] | 85 | |
---|
[1947] | 86 | This happens if you use hardware accounting with SNMP, because |
---|
| 87 | some (all ?) printers don't say they are idle when they are |
---|
| 88 | in PowerSave mode. |
---|
| 89 | For now your best bet is to disable PowerSave mode in |
---|
| 90 | your printer. In the future, PyKota will modified to |
---|
| 91 | handle such problems. |
---|
| 92 | |
---|
[1412] | 93 | * I've installed all correctly, I've created users |
---|
| 94 | and printers, but when printing nothing works. |
---|
| 95 | What is the problem ? |
---|
| 96 | The most probable cause for this is that you didn't |
---|
| 97 | adapt /etc/pykota/pykota.conf to your own configuration. |
---|
| 98 | The file installed by default is just an example, you |
---|
| 99 | have to modify it. See the rest of this document to |
---|
| 100 | learn how to really diagnose what went wrong. |
---|
[1538] | 101 | |
---|
[1708] | 102 | * I've downloaded PyKota from CVS using a Windows based CVS |
---|
| 103 | tool, and now nothing works at all. What happened ? |
---|
| 104 | |
---|
| 105 | Some (all?) Windows based CVS tools translate *nix line endings |
---|
| 106 | (character Line Feed, ASCII code 10) into Windows line endings |
---|
| 107 | (character Carriage Return, ASCII code 13, followed with |
---|
| 108 | character Line Feed). This breaks the software which has |
---|
| 109 | to run under *nix compatible systems. Set correct options |
---|
| 110 | in your CVS software so that it doesn't do any translation, |
---|
| 111 | or use an Unix-like version of CVS, download again and |
---|
| 112 | reinstall the software. It should work. |
---|
| 113 | |
---|
[1388] | 114 | * Why doesn't CUPS under Debian Woody automatically |
---|
| 115 | detects PyKota managed devices ? |
---|
| 116 | |
---|
| 117 | The CUPS version in Debian Woody is 1.1.14 which is a bit |
---|
| 118 | too old. To use PyKota with this version, just install |
---|
| 119 | your printers as usual in CUPS web interface, and ensure |
---|
| 120 | they work fine, then save your changes, and modify |
---|
| 121 | /etc/cups/printers.conf manually as explained in |
---|
| 122 | PyKota's toplevel README file. Finally restart CUPS, |
---|
| 123 | and your printers should be managed by PyKota. |
---|
[1389] | 124 | Another solution is to install a newer CUPS release. |
---|
[1388] | 125 | |
---|
[1175] | 126 | * Is print accounting ever exact ? |
---|
| 127 | |
---|
| 128 | No. Print accounting is **never** exact, because it depends |
---|
| 129 | on external factors like the presence of paper in the printer, |
---|
| 130 | the quantity of remaining ink in the print cartridge, paper |
---|
| 131 | jams, etc... All these things are very difficult to account |
---|
| 132 | for correctly, and no print accounting package deals with |
---|
| 133 | these artefacts correctly in all situations. |
---|
| 134 | We are however confident that PyKota is one of the more |
---|
| 135 | exact print accounting software, because by default it |
---|
| 136 | asks the printers for how many pages they have really printed. |
---|
| 137 | |
---|
| 138 | * Can PyKota account for ink usage ? |
---|
| 139 | |
---|
| 140 | No. Actually PyKota doesn't account for ink usage, but this |
---|
| 141 | may come in a future release. PyKota only accounts for pages |
---|
| 142 | printed and/or money spent. If ink accounting is a necessity |
---|
| 143 | for you, PrintBill is recommended instead of PyKota. PrintBill |
---|
| 144 | allows you to bill differently per color, and to bill depending |
---|
| 145 | on the percent of the ink covered part of the pages. |
---|
| 146 | |
---|
[1198] | 147 | * What is a 'dumb printer' ? |
---|
| 148 | |
---|
| 149 | In PyKota, the term 'dumb printer' defines a printer which doesn't |
---|
[1701] | 150 | natively understand PostScript, PCL5 (up to), PCLXL (aka PCL6), PDF |
---|
| 151 | or ESC/P2 and doesn't have an internal page counter, and for which |
---|
| 152 | you don't know how to compute a job's size in number of pages by |
---|
| 153 | analyzing its content. |
---|
[1578] | 154 | Any printer which is not a 'dumb printer' according to the above |
---|
[1701] | 155 | definition is supported by PyKota. |
---|
[1198] | 156 | |
---|
[1175] | 157 | * How can I make PyKota work with my non-postscript printer under |
---|
| 158 | CUPS ? |
---|
| 159 | |
---|
[1186] | 160 | From version 1.16alpha7, PyKota includes a CUPS backend which |
---|
[1198] | 161 | allows you to use any type of printer and any driver, provided |
---|
| 162 | your printer is not a 'dumb printer' (see above). |
---|
[1175] | 163 | |
---|
[1198] | 164 | * How can I use my 'dumb printer' with CUPS and PyKota. |
---|
[1175] | 165 | |
---|
[1500] | 166 | You have to use a software accounter directive, and |
---|
| 167 | create a script which understands your printer's |
---|
| 168 | Page Description Language. |
---|
[1198] | 169 | |
---|
[1887] | 170 | PyKota natively understands DSC compliant PostScript, |
---|
| 171 | PCL3, PCL4, PCL5, PCLXL (aka PCL6), PDF and ESC/P2. Support |
---|
| 172 | for Binary PostScript is done through GhostScript. More PDLs |
---|
| 173 | will be added in the future. |
---|
[1622] | 174 | However you can always plug your own PDL analyzer in PyKota. |
---|
[1198] | 175 | |
---|
[1199] | 176 | * I've got a great number of users. How can I automatically |
---|
| 177 | set an initial print quota for them on first print ? |
---|
| 178 | |
---|
| 179 | You have to define an external policy for unknown users, |
---|
| 180 | to automatically add them to the Print Quota database. |
---|
| 181 | The sample configuration file contains examples to do this. |
---|
| 182 | |
---|
[1334] | 183 | * What does the --prototype command line option to edpykota do ? |
---|
| 184 | |
---|
[2122] | 185 | This option allows you to use an existing user or group |
---|
| 186 | as a template when creating or modifying other accounts. |
---|
[1334] | 187 | |
---|
[1268] | 188 | * How can I share print quota between some printers only (not all) ? |
---|
| 189 | |
---|
| 190 | To do this you have to put the printers into a printers group, and |
---|
[1282] | 191 | set quota on the printer group, instead of (or in addition to) |
---|
| 192 | the printers themselves. |
---|
[1268] | 193 | |
---|
| 194 | * What is a printer group ? |
---|
| 195 | |
---|
| 196 | A printer group is exactly like a normal printer, but is |
---|
| 197 | unknown by the printing system. You can use printer groups |
---|
| 198 | to share print quota between printers. |
---|
| 199 | |
---|
| 200 | * How can I create a printer group ? |
---|
| 201 | |
---|
[1441] | 202 | Just use pkprinters, like for normal printers, then create |
---|
| 203 | quota entries for users or users groups on it using the |
---|
| 204 | edpykota command |
---|
[1268] | 205 | |
---|
| 206 | * How can I put a printer into a printer group ? |
---|
| 207 | |
---|
[1441] | 208 | Use the pkprinters command to do this. |
---|
[1268] | 209 | |
---|
[1441] | 210 | $ pkprinters --help |
---|
| 211 | |
---|
| 212 | Will print the complete help and tell you how to do. |
---|
[1268] | 213 | |
---|
| 214 | * How quota checking and update is done with printer groups ? |
---|
| 215 | |
---|
| 216 | Print accounting and quota checking is done for a printer and |
---|
| 217 | all the printers groups it belongs to, recursively. |
---|
| 218 | If quota is reached on ANY of these printers for the current user, |
---|
| 219 | printing is denied. |
---|
[1286] | 220 | |
---|
[1268] | 221 | * Is this feature robust ? |
---|
| 222 | |
---|
| 223 | It should be. However, beware of integrity problems. LDAP has no |
---|
| 224 | sense of database integrity, and PostgreSQL constraints have not |
---|
| 225 | yet been fully implemented. The code actually *tries* to forbid |
---|
| 226 | circular printers groups, but if you create printer groups with |
---|
| 227 | another tool (e.g. psql or gq), then you are mostly on you |
---|
| 228 | own to not create infinite loops. |
---|
| 229 | |
---|
[1286] | 230 | * How is computed the job's price ? |
---|
| 231 | |
---|
| 232 | A job's price is computed with this formula : |
---|
| 233 | |
---|
| 234 | SUM((NbPages * PricePerPage) + PricePerJob) |
---|
| 235 | |
---|
| 236 | For current printer and all the printers groups it is |
---|
[1500] | 237 | a member of, if any, recursively. |
---|
[1286] | 238 | This may be difficult to grasp, but offers unprecedented |
---|
| 239 | flexibility. |
---|
| 240 | |
---|
[1175] | 241 | * My question isn't answered there, can you help ? |
---|
| 242 | |
---|
| 243 | Sure. Ask your question to the mailing list. If this is a |
---|
| 244 | frequently asked question, or if your problem is on the contrary |
---|
| 245 | very specific, it will probably be added to this document. |
---|
| 246 | |
---|
[1186] | 247 | You can also ask questions by IRC : |
---|
| 248 | |
---|
| 249 | /server irc.freenode.net |
---|
| 250 | /join #pykota |
---|
| 251 | |
---|
[1216] | 252 | Send any new questions to Jerome Alet - <alet@librelogiciel.com> |
---|