Internet Charging Transaction Logs

KB Home   |   Internet Charging Transaction Logs

PaperCut Internet Charging works by monitoring internet usage proxy and periodically reporting the usage information back to the PaperCut server. The server then calculates the cost of the usage and deducts the credit from a user’s account. Each time a user’s balance is adjusted a transaction record is created in the PaperCut database. This allows the administrator and user’s to see exactly where their credit is being used (just like a bank account statement).

PaperCut can produce a lot of transaction records, because it reports Internet usage back to the server once a minute by default. This means that if a user is accessing the Internet continuously, then a transaction record will be created once a minute for that user. This is the correct approach to take because it provides full information to the user and administrators, however it can produce a large number of transaction records. This is not a problem in itself if there is plenty of disk space available.

There are a couple of options for reducing the transaction logs recorded in the database. These options are discussed below.

Delete old transaction logs

PaperCut can be configured to automatically delete old transaction logs. This allows the administrator to keep the transaction logs for a specified period of time before they are deleted by PaperCut. This provides a good compromise between displaying all transaction information to users without filling up the database with too many transactions. This is the recommended approach.

To enable the deletion of old transaction logs:

  1. Login to PaperCut
  2. Go to the Options→Backups tab
  3. Ensure that the “Enable automatic weekly backups” option is enabled
  4. Enable the “Delete account transaction logs older than” option
  5. Enter the number of days to keep the transaction logs for. For example, to keep transaction logs for a month, then enter 30 days.
  6. Press the “Apply” button.

Now after the weekly backup is run, the transaction logs more than 30 days old will be permanently deleted by PaperCut.

Change how often the Internet usage data is sent to the PaperCut server

An alternative is to reduce how often the Internet service sends information to the PaperCut server. If it only sends usage information every 5 minutes instead of the default 1 minute, the there will be 5 times less transaction logs in PaperCut.

However there are disadvantages to reducing this time period. The main issue is that it will take longer to lock users out of the Internet once they have no available credit. For example, when a user is using the Internet an they download something that would cause them to use up their credit, but that information isn’t sent to PaperCut for another 4–5 minutes, then they will continue to be able to use the Internet for this time.

Changing this reporting period is a trade-off between the number of transaction logs and how fast users are denied Internet access. If you decide to reduce this period, this can be done as follows:

  1. Stop the “PaperCut Internet Provider” service (Control Panel→Admin Tools→Services)
  2. In a text editor, pen the file [app-dir]\providers\net\
  3. Change the save-to-server-period-secs= value from 60 to the number of seconds you want to wait between sending data to the PaperCut server. e.g. 300 is 5 minutes.
  4. Restart the “PaperCut Internet Provider” service.


Share your findings and experience with other PaperCut users. Feel free to add comments and suggestions about this Knowledge Base article. Please don't use this for support requests.

Article last modified on August 01, 2007, at 02:00 AM
Printable View   |   Article History   |   Edit Article