<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
  <head>
    <meta name="generator" content="HTML Tidy, see www.w3.org">
    <title>checkpc - Configuration Validation Utility</title>
    <meta name="GENERATOR" content=
    "Modular DocBook HTML Stylesheet Version 1.7">
    <link rel="HOME" title=" LPRng Reference Manual" href=
    "index.htm">
    <link rel="PREVIOUS" title=
    "Queue Management - class, redirect, move " href=
    "lpcredirect.htm">
    <link rel="NEXT" title="Printcap Information" href="x4865.htm">
  </head>

  <body class="CHAPTER" bgcolor="#FFFFFF" text="#000000" link=
  "#0000FF" vlink="#840084" alink="#0000FF">
    <div class="NAVHEADER">
      <table summary="Header navigation table" width="100%" border=
      "0" cellpadding="0" cellspacing="0">
        <tr>
          <th colspan="3" align="center">LPRng Reference Manual: 24
          Sep 2004 (For LPRng-3.8.28)</th>
        </tr>

        <tr>
          <td width="10%" align="left" valign="bottom"><a href=
          "lpcredirect.htm" accesskey="P">Prev</a></td>

          <td width="80%" align="center" valign="bottom">
          </td>

          <td width="10%" align="right" valign="bottom"><a href=
          "x4865.htm" accesskey="N">Next</a></td>
        </tr>
      </table>
      <hr align="LEFT" width="100%">
    </div>

    <div class="CHAPTER">
      <h1><a name="CHECKPC"></a>Chapter 10. <b class=
      "APPLICATION">checkpc</b> - Configuration Validation
      Utility</h1>

      <div class="TOC">
        <dl>
          <dt><b>Table of Contents</b></dt>

          <dt>10.1. <a href=
          "checkpc.htm#AEN4849">Maintenance</a></dt>

          <dt>10.2. <a href="x4865.htm">Printcap
          Information</a></dt>
        </dl>
      </div>

      <p>The <b class="APPLICATION">checkpc</b> (check printcap
      file) is one of the most useful utilities in the <b class=
      "APPLICATION">LPRng</b> package.</p>

      <p>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 <b class=
      "APPLICATION">checkpc</b> is to remove old entries from queue
      directories.</p>

      <p>For a new installation, you will want to run</p>

      <div class="INFORMALEXAMPLE">
        <a name="AEN4843"></a>
<pre class="SCREEN">
    checkpc -f -V
</pre>
      </div>
      to set the permissions right. The <var class=
      "LITERAL">-f</var> flag instructs the program to correct file
      permissions. If you don't run this as <var class=
      "LITERAL">ROOT</var>, you'll receive a warning about that
      fact and any <code class="FUNCTION">chown(2)</code> calls
      will (most likely) fail.<br>
      <br>

      <p>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.</p>

      <div class="SECT1">
        <h1 class="SECT1"><a name="AEN4849">10.1.
        Maintenance</a></h1>

        <p>Later, you will want to use <b class=
        "APPLICATION">checkpc</b> for the daily maintenance of your
        system. I have this line in user <var class=
        "LITERAL">lp</var>'s crontab:</p>

        <div class="INFORMALEXAMPLE">
          <a name="AEN4854"></a>
<pre class="SCREEN">
    32 5 * * * checkpc -t 10K -A3 -r &gt;/dev/null 2&gt;&amp;1
</pre>
        </div>
        This job will: 

        <ol type="1">
          <li>
            <p>truncate all log and accounting files to 10KB (<var
            class="LITERAL">-t 10K</var>). Actually, it will keep
            the last 10K from the file, starting on a complete
            line.</p>
          </li>

          <li>
            <p>remove all stale files older than three days (<var
            class="LITERAL">-A3 -r</var>).</p>
          </li>
        </ol>
        I'm redirecting output to <tt class=
        "FILENAME">/dev/null</tt>, because <b class=
        "APPLICATION">checkpc</b> is a little noisy to my taste.
        (But too noisy is better than too silent :)<br>
        <br>
      </div>
    </div>

    <div class="NAVFOOTER">
      <hr align="LEFT" width="100%">

      <table summary="Footer navigation table" width="100%" border=
      "0" cellpadding="0" cellspacing="0">
        <tr>
          <td width="33%" align="left" valign="top"><a href=
          "lpcredirect.htm" accesskey="P">Prev</a></td>

          <td width="34%" align="center" valign="top"><a href=
          "index.htm" accesskey="H">Home</a></td>

          <td width="33%" align="right" valign="top"><a href=
          "x4865.htm" accesskey="N">Next</a></td>
        </tr>

        <tr>
          <td width="33%" align="left" valign="top">Queue
          Management - class, redirect, move</td>

          <td width="34%" align="center" valign="top">&nbsp;</td>

          <td width="33%" align="right" valign="top">Printcap
          Information</td>
        </tr>
      </table>
    </div>
  </body>
</html>



syntax highlighted by Code2HTML, v. 0.9.1