LPRng Reference Manual: 3 May 2004 (For LPRng-3.8.27)
Prev |  | Next

# Chapter 10. checkpc - Configuration Validation Utility

The checkpc (check printcap file) is one of the most useful utilities in the LPRng package.

It will read all the configuration files, printcap files and tests whether devices are set up correctly. Optionally, it will also set the permissions for spool directories and device files. Additionally, it will truncate the accounting and log files to a maximum size. Another use for checkpc is to remove old entries from queue directories.

For a new installation, you will want to run

        checkpc -f -V

to set the permissions right. The -f flag instructs the program to correct file permissions. If you don't run this as ROOT, you'll receive a warning about that fact and any `chown(2)` calls will (most likely) fail.

The program reports everything it changes. Since it isn't too clever about some things (visit the man page), you should keep an eye on the output, and run it again if needed. If it keeps failing, change the permissions yourself.

# 10.1. Maintenance

Later, you will want to use checkpc for the daily maintenance of your system. I have this line in user lp's crontab:

        32 5 * * * checkpc -t 10K -A3 -r >/dev/null 2>&1

This job will:

1. truncate all log and accounting files to 10KB (-t 10K). Actually, it will keep the last 10K from the file, starting on a complete line.

2. remove all stale files older than three days (-A3 -r).

I'm redirecting output to `/dev/null`, because checkpc is a little noisy to my taste. (But too noisy is better than too silent :)

Prev | Home | Next
Queue Management - class, redirect, move |  | Printcap Information