source: trunk/third/lprng/doc/LPRng-HOWTO-9.html @ 13098

Revision 13098, 2.7 KB checked in by danw, 25 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r13097, which included commits to RCS files with non-trunk default branches.
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
2<HTML>
3<HEAD>
4 <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
5 <TITLE> LPRng-HOWTO: LPRng checkpc Utility</TITLE>
6 <LINK HREF="LPRng-HOWTO-10.html" REL=next>
7 <LINK HREF="LPRng-HOWTO-8.html" REL=previous>
8 <LINK HREF="LPRng-HOWTO.html#toc9" REL=contents>
9</HEAD>
10<BODY>
11<A HREF="LPRng-HOWTO-10.html">Next</A>
12<A HREF="LPRng-HOWTO-8.html">Previous</A>
13<A HREF="LPRng-HOWTO.html#toc9">Contents</A>
14<HR>
15<H2><A NAME="checkpc"></A> <A NAME="s9">9. LPRng checkpc Utility</A></H2>
16
17<P>The <CODE>checkpc</CODE> (check printcap file) is one of the most
18useful utilities in the LPRng package.
19<P>It will read all the configuration files, printcap files and tests
20whether devices are set up correctly. Optionally, it will also set the
21permissions for spool directories and device files. Additionally, it
22will truncate the accounting and log files to a maximum size. Another
23use for <CODE>checkpc</CODE> is to remove old entries from queue
24directories.
25<P>For a new installation, you will want to run
26<BLOCKQUOTE><CODE>
27<PRE>
28checkpc -f -V
29</PRE>
30</CODE></BLOCKQUOTE>
31
32to set the permissions right. The <CODE>-f</CODE> flag instructs the
33program to correct file permissions. If you don't run this as
34<CODE>root</CODE>, you'll receive a warning about that fact and any
35<B>chown(2)</B> calls will (most likely) fail.
36<P>The program reports everything it changes. Since it isn't too clever
37about some things (visit the man page), you should keep an eye on the
38output, and run it again if needed. If it keeps failing, change the
39permissions yourself.
40<H2><A NAME="ss9.1">9.1 Maintenance</A>
41</H2>
42
43<P>Later, you will want to use <CODE>checkpc</CODE> for the daily
44maintenance of your system. I have this line in user <CODE>lp</CODE>'s
45crontab:
46<BLOCKQUOTE><CODE>
47<PRE>
4832 5 * * * checkpc -t 10K -A3 -r &gt;/dev/null 2&gt;&amp;1
49</PRE>
50</CODE></BLOCKQUOTE>
51
52This job will:
53<OL>
54<LI>truncate all log and accounting files to 10KB (<CODE>-t 10K</CODE>).
55Actually, it will keep the last 10K from the file, starting on a
56complete line.</LI>
57<LI>remove all stale files older than three days (<CODE>-A3 -r</CODE>).</LI>
58</OL>
59
60I'm redirecting output to <CODE>/dev/null</CODE>, because <CODE>checkpc</CODE>
61is a little noisy to my taste. (But too noisy is better than too
62silent :)
63<H2><A NAME="ss9.2">9.2 Printcap Information</A>
64</H2>
65
66<P>You can use <CODE>checkpc -V -P</CODE>
67to examine printcaps and tell you what
68they contain.
69This is identical to the <CODE>lpc server all</CODE> operation,
70but with a higher level of verbosity.
71<HR>
72<A HREF="LPRng-HOWTO-10.html">Next</A>
73<A HREF="LPRng-HOWTO-8.html">Previous</A>
74<A HREF="LPRng-HOWTO.html#toc9">Contents</A>
75</BODY>
76</HTML>
Note: See TracBrowser for help on using the repository browser.