root / pykota / trunk / FAQ @ 2260

Revision 2260, 10.3 kB (checked in by jerome, 19 years ago)

Added some informations wrt systems on which CUPS doesn't run as root

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