How do you manage the contents of the InfoPrint server accounting logs?

Once you specify log-accounting-data=true on either an InfoPrint server or an actual destination, these accounting logs start growing without bound. The accounting logs must be managed carefully to avoid potential performance problems. Periodically, the log files must be either purged or moved to a different directory. If you do not do either of these tasks, your installation will run out of space on the file system, preventing you from printing any more jobs. To avoid this problem, you should purge or move the accounting and audit logs as part of your system maintenance.

The accounting logs reside in a subdirectory of the server's directory. This is a description of the names and location of the files, as well as their default permissions:

$PDBASE/ servername/accounting.logs
where servername indicates the name of your InfoPrint server. InfoPrint provides two accounting logs for each destination:
  • actual_destination_name.accounting.log.v1 storing accounting information for successful jobs
  • actual_destination_name.accounting.log.error storing accounting information for error jobs
where actual_destination_name specifies the actual destination where the job is processed. Locating them in a separate directory makes them easier for you to manage.

InfoPrint restricts direct access to the logs by setting the permissions on the accounting.log directory to rwx (read, write, execute) for root and the system group. The logs themselves will be created with root having read and write access and the system group having read access.

To retain a record of InfoPrint server accounting data, you need to move the existing log files to a new directory. Use this procedure:

  1. Go to the directory where the log files are located by specifying:
    cd $PDBASE/server1/accounting.logs
  2. Move the prt1.accounting.log.* files to a directory named 1qrt2000 by specifying:
    mv prt1.accounting.log.* /1qrt2000
    This command moves the existing files to the new directory and removes them from the $PDBASE/server1/accounting.logs directory. When the next job is processed on prt1, InfoPrint creates a new accounting log file.

We recommend you move the data to another file system rather than deleting it from the system. This lets you store accounting data and delete it from the system when you no longer need to refer to it. To delete the files without storing the data in another directory,

  1. Specify
    cd $PDBASE/server1/accounting.logs
    This command moves you into the correct path.
  2. Enter
    rm prt1.accounting.log.*
    When the command-line prompt returns, you know that the files have been deleted from the system.
  3. Enter
    ls
    This command displays the contents of your directory for you to verify that the files have been deleted. When the next job is submitted for printing, InfoPrint creates a new accounting log file and writes the data into that file.

The pdaccount command only finds and processes the information in the original files. Once you move or rename the files, you cannot use the pdaccount command to summarize the data. You might want to use the pdaccount command to find and process the information and summarize it, store the summaries in a different location, and then delete the logs.

Important: Requesting information for all or error accounting records can consume a lot of the server’s memory since all the data is read into memory to be sent to you. If you have a lot of data to retrieve, you should consider requesting it for smaller time periods and concatenating the returned data.

For example, to retrieve all the accounting records for a one month period, you could issue four pdaccount commands like this:

  • pdaccount -t all -s '00:00:00 AM 03/01/00' -e '00:00:00 AM 03/08/00' Server A >March1.accting.data
  • pdaccount -t all -s '00:00:00 AM 03/08/00' -e '00:00:00 AM 03/15/00' Server A >March2.accting.data
  • pdaccount -t all -s '00:00:00 AM 03/15/00' -e '00:00:00 AM 03/22/00' Server A >March3.accting.data
  • pdaccount -t all -s '00:00:00 AM 03/22/00' -e '00:00:00 AM 03/31/00' Server A >March4.accting.data