root / pykota / trunk / README @ 805

Revision 794, 6.9 kB (checked in by jalet, 22 years ago)

repykota cgi script added.
cleaner doc.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1# $Id$
2
3PyKota - Print Quota for CUPS
4
5(c) 2003 Jerome Alet <alet@librelogiciel.com>
6You're welcome to redistribute this software under the
7terms of the GNU General Public Licence version 2.0
8or, at your option, any higher version.
9
10You can read the complete GNU GPL in the file COPYING
11which should come along with this software, or visit
12the Free Software Foundation's WEB site http://www.fsf.org
13
14====================================================================
15
16READ SPECIAL LICENSING AND REDISTRBUTION TERMS IN THE FILE 'LICENSE'
17
18====================================================================
19
20PyKota is a complete Print Quota system for the Common Unix Printing
21System (aka CUPS), which works by directly querying the printers
22for the number of pages they have printed.
23
24Actual working features :
25
26        - Per printer user quotas.
27       
28        - Automated email warning of users above quota to the
29          user himself and to the print quota administrator.
30       
31        - CUPS filter for quota accounting : pykota
32       
33        - Command line print quota editor : edpykota
34       
35        - Command line print quota report generator : repykota
36       
37        - Command line print quota automated warning sender : warnpykota
38       
39        - Command line tools mimic the disk quota utilities for
40          easier mastering.
41       
42        - Centralized storage of quotas : you can manage quotas for
43          different printers on different print servers and store them all
44          on the same quota storage server.
45          WARNING : actually all your printers must have an unique name,
46                    but this may change in a future version.
47                   
48        - SNMP querying of any networked SNMP-enabled printer.
49       
50        - External command querying of any printer : you can use
51          you own querying command, e.g. to query a printer via
52          the serial port, sending it a special PJL job and
53          reading the result.
54       
55        - Special scripts included for a seamless integration of
56          PyKota on Debian machines.
57         
58All the command line tools accept the -h | --help command line option
59which prints all the available options and show usage examples.
60       
61Planned features are described in the TODO file.
62
63Actually only the lazy quota method is implemented. What do I call
64lazy method ?
65
66  The lazy method consists in querying the printer (actually via SNMP)
67  for its total pages counter, just before the beginning of a job, and
68  use this to modify the *preceding* user's quota. So you're
69  always late of one print job, but this is generally ok, especially
70  because a check is also done to see if the current user is allowed
71  or not to print.
72 
73  Problem may arise however in batches on successive print jobs
74  by different users when there's no sleep time between two jobs :
75  the used pages may be attributed to incorrect user. This
76  depends on the printer speed and time between jobs.
77 
78  Other querying methods which won't suffer from this problem,
79  but probably from other ones ;-) will be implemented in the
80  future.
81 
82PyKota is known to work fine with HP Laserjet 2100 and 2200   
83networked printers, and should work with any SNMP-enabled
84network printer capable of outputing its lifetime printed pages
85number.
86
87============================================================
88
89INSTALLATION:
90=============
91
92Prerequisite :
93--------------
94   
95  You need to have the following tools installed on the CUPS Server :
96 
97    - CUPS
98    - Python
99    - eGenix' mxDateTime Python extension
100    - PostgreSQL's PygreSQL Python extension and the PostgreSQL client
101      libraries.
102    - SNMP tools (specifically the snmpget command)
103   
104  You need to have the following tools installed on the Quota Storage 
105  Server :
106 
107    - PostgreSQL
108   
109  PygreSQL and the PostgreSQL client libraries's versions on the CUPS
110  Server must match the PostgreSQL version used on the Quota Storage
111  Server.
112 
113  Of course the CUPS Server and the Quota Storage Server can be the 
114  very same machine.
115 
116  This list of prerequisite software may change in the future, when
117  PyKota will support more functionnalities you will be given
118  alternatives.
119 
120Then :   
121------
122 
123Download the latest PyKota version from the CVS tree on :
124
125    http://savannah.nongnu.org/projects/pykota
126
127Just type :
128
129    python setup.py install
130
131You may need to be logged in with sufficient privileges (e.g. root)
132
133Go to the initscripts subdirectory of PyKota's sources, and choose
134the appropriate storage backend for your configuration. Read
135the associated README file and execute the initialization script
136to create an empty PyKota Storage.
137
138Copy the conf/pykota.conf.sample sample configuration file to
139CUPS' configuration directory, usually /etc/cups, under the
140name pykota.conf, and adapt this file to your own needs and
141configuration.
142
143Modify the PPD files for each printer on which you want to manage
144print quotas, for example /etc/cups/ppd/lp.ppd :
145
146--- Add the line below exactly as-is somewhere near the top ---
147*cupsFilter:  "application/vnd.cups-postscript 0 /usr/bin/pykota"
148--- Add the line above exactly as-is somewhere near the top  ---
149
150Modify the path to the pykota executable if needed, unfortunately
151you have to supply the correct absolute path here due to CUPS
152internals, or put the pykota executable into /usr/lib/cups/filter
153instead of into /usr/bin.
154
155Do this for each ppd file present in this directory if you want
156to enable quota on every printer.
157         
158Add printers and users to the quota system and set their quota values :
159
160    $ edpykota --add -P printer -S softlimit -H hardlimit user1 ... userN
161       
162    launching edpykota without any argument or with the --help
163    command line option will show you all the possibilities.
164
165Restart CUPS, for example under Debian GNU/Linux systems :         
166
167    $ /etc/init.d/cupsys restart
168       
169Your users now should be able to print but not exceed their
170printing quota.
171
172To see printer command usage, you can use :
173
174    $ repykota --printer lp
175   
176or :
177
178    $ repykota
179   
180    which will print quota usage for all users on all printers,
181    along with totals.
182   
183WARNING : as of today, 2003-02-06, group quotas are not
184implemented.
185
186SECURITY : You should ensure that only the print quota administrator
187           can run the warnpykota command, but this is actually not
188           enforced in the program. Any user able to launch warnpykota
189           could flood over-quota users' email boxes.
190           
191           You should ensure that only the print quota administrator
192           can run the edpykota command, but this is actually not
193           enforced in the program. Any user could modify his/her
194           or other people's print quota.
195         
196           launching : chmod 750 /usr/bin/warnpykota /usr/bin/edpykota
197           should make you reasonably safe.
198           
199============================================================
200
201Please e-mail bugs to: alet@librelogiciel.com (Jerome Alet)
Note: See TracBrowser for help on using the browser.