This is a read-only archive. Find the latest Linux articles, documentation, and answers at the new Linux.com!

Linux.com

Feature: Enterprise Applications

Tracking and charging for printing with PyKota

By Frank Tuzi on September 06, 2006 (8:00:00 AM)

Share    Print    Comments   

PyKota is a robust Linux-based open source print quota and print accounting system that runs via LDAP, MySQL, or PostgreSQL on the back end and CUPS and Samba on the front end. At our school, we have found it to be a powerful application capable of managing printers, users, groups, and accounting information using any currency.

In the spring of last year, the technology committee at Tokyo Christian University, where I work, investigated the possibility of managing the printing system of the college's computer labs. The committee hoped to capture usage data and also begin charging students for the printing services. After investigating the possible options, we decided upon the GPL-licensed PyKota.

As with any application, it is wise to have a well-thought-out plan for implementation. If you plan on incorporating PyKota into your system, I recommend you plan your implementation and do a pilot installation before the live installation

The installation process is by far the most difficult part of using PyKota. You can get access to the official, stable release only by purchasing a pass to the Web site for a $25 or €25 fee, or you can download the development release via CVS for free. I began with the CVS version, but because I needed assistance, I opted to purchase an account, and downloaded the stable ISO.

With PyKota, you need to install three main components:

  • The back end. You can use LDAP, MySQL or PostgreSQL.
  • The dependencies. PyKota depends on 17 other packages.
  • The PyKota application itself.

While the PyKota package comes bundled as RPM or DEB packages, the binary packages install only the PyKota Python scripts, and do not test to ensure all the dependency packages are installed. Installing the 17 dependencies did not go well on our Fedora Core 5 system. PyKota provide all the dependencies in an ISO file, but since all distributions tweak file and package names and locations, some of packages that PyKota provided would not install. It took me several hours to track down and install the Fedora versions of these packages.

After installing the dependencies, PyKota installed without incident. We chose PostgreSQL as our back end and CUPS as our print server. PyKota provided scripts to set up the database and instructions for connecting CUPS to PostgreSQL. The final step was to initialize the system and populate it with users and printers, which is completed with a few command-line instructions.

Setting up and using the system

Before using PyKota, you need to specify a number of options. For example, PyKota can be set to force users to prepay for a given number of printed pages at the beginning of the semester. When their quota gets close to zero pages, PyKota can warn the users. PyKota can charge per page and per job for each printer. PyKota can also set limitations based on users and groups, and can charge some users more or charge nothing at all. PyKota can also limit who has access to specific printers it manages.

We chose to bill students at the end of the school year, so we set up PyKota to keep an accounting of the pages each student printed, and send a usage report to the business office for billing purposes. Faculty and staff were not charged for printing, but we used PyKota to track the number of pages each non-paying person printed for later analysis.

PyKota does not operate via a GUI; all commands are entered via the command line. By using about seven different commands, PyKota administrators can manage printers and users, monitor the system, export data to the business office, and even print invoices. For example, to generate an on-screen usage report for all users, I enter repykota. By using command-line arguments, I can limit the report by printer, user, and group. I can manage printers with pkprinters and users with pkusers. PyKota is extremely powerful, and has a large number of options for each command. Each command has a man page and a help screen to assist users in using the commands, though I found them to be cryptic at times. Still, management of the system is a relatively easy process. There was a small learning curve for the command-line options, but after spending time deciphering the documentation and trying the commands, I now have no problems with the system.

In addition to the standard commands to monitor and manage printers and users, PyKota allows users to monitor their own print usage. Users can see reports of their printing activities while in the lab or from the Internet. They can also determine the cost of a print job before they print it. These simple commands are also available via the command prompt.

All systems have flaws, and PyKota is no exception. For example, at one point last spring, the print server stopped authorizing users to print. Because there is no PyKota GUI, I needed to go log file diving. I reset the CUPS log level to debug and discovered that access to the PostgreSQL server was denied. I submitted a request for information on the PyKota mailing list. The responses I received indicated that the problem was not a PyKota problem, but a PostgreSQL one. They pointed me in the right direction, and I fixed the problem, but I learned that PyKota must work in tandem with a variety of other applications to work successfully.

We have encountered few problems with PyKota; it works well and we are happy with its capabilities. But PyKota requires having people on staff with knowledge of the back end and the print server. We chose PostgreSQL as our back end even though no one here had used it before.

Conclusion

PyKota, with its ability to manage printers and users, has filled a gap for us. The college now has a way to monitor its printer and paper usage, equitably bill students for paper, and manage printers throughout the campus. In the future, we will integrate PyKota and CUPS with Samba to allow our Windows and Apple users access to the printing system. We would recommend PyKota to anyone interested in monitoring or charging for printer usage.

Frank Tuzi is an associate professor of linguistics and technology.

Share    Print    Comments   

Comments

on Tracking and charging for printing with PyKota

Note: Comments are owned by the poster. We are not responsible for their content.

Silly

Posted by: Anonymous Coward on September 07, 2006 09:14 AM
I don't get it... it's GPLed software, but they make you pay if you want to download it?

#

Re:Silly

Posted by: Anonymous Coward on September 07, 2006 10:39 AM

I don't get it... it's GPLed software, but they make you pay if you want to download it?



Even the FSF says that is perfectly OK. From the GPL FAQ:




Does the GPL allow me to charge a fee for downloading the program from my site?


Yes. You can charge any fee you wish for distributing a copy of the program. If you distribute binaries by download, you must provide "equivalent access" to download the source--therefore, the fee to download source may not be greater than the fee to download the binary.


The entire FAQ is at:


<a href="http://www.gnu.org/licenses/gpl-faq.html" title="gnu.org">http://www.gnu.org/licenses/gpl-faq.html</a gnu.org>

#

Re:Silly

Posted by: Anonymous Coward on September 07, 2006 12:26 PM
Just download from subversion (aka svn), it's free of charge.

#

(Not) Silly You!

Posted by: Anonymous Coward on September 08, 2006 06:03 AM
Where in its clauses does the GPL say that you MUST NOT ask for payment for downloading the software? Where does it prohibit money and payment in exchange for getting the GPLed software? Where? Where?

#

Tracking and charging for printing with PyKota

Posted by: Anonymous [ip: 10.72.22.19] on December 16, 2007 11:26 AM
yes

#

This story has been archived. Comments can no longer be posted.



 
Tableless layout Validate XHTML 1.0 Strict Validate CSS Powered by Xaraya