1 | .TH NEWSYSLOG 8 "November 30, 1995" "MIT Athena" |
---|
2 | .SH NAME |
---|
3 | newsyslog \- maintain system log files to manageable sizes |
---|
4 | .SH SYNOPSIS |
---|
5 | .B /etc/athena/newsyslog |
---|
6 | .RB [ \-vnr ] |
---|
7 | [\fB\-f \fIconfig-file\fR] [\fB\-t \fIsleep\fR] |
---|
8 | .SH DESCRIPTION |
---|
9 | .I Newsyslog |
---|
10 | is a program that should be scheduled to run periodically by |
---|
11 | .IR crontab . |
---|
12 | When it is executed, it archives and processes log files if necessary. |
---|
13 | Processes writing to the log file (usually |
---|
14 | .IR syslogd ) |
---|
15 | are signalled so they can start using the new log file. |
---|
16 | .PP |
---|
17 | There are two possible conditions for |
---|
18 | .I newsyslog |
---|
19 | to turn over the log file: the file may have grown bigger than a |
---|
20 | preset size in kilobytes, or a preset number of hours may have elapsed |
---|
21 | since the last log archive. The granularity of |
---|
22 | .I newsyslog |
---|
23 | is dependent on how often it is scheduled to run in crontab. Since |
---|
24 | the program is quite fast, it may be scheduled to run every hour |
---|
25 | without any ill effects. |
---|
26 | .PP |
---|
27 | If a log file is determined to require archiving, |
---|
28 | .I newsyslog |
---|
29 | usually rearranges the files so that ``logfile'' is empty, |
---|
30 | ``logfile.0'' has the last period's logs in it, ``logfile.1'' has the |
---|
31 | next to last period's logs in it, and so on, up to a user-specified |
---|
32 | number of archived logs. |
---|
33 | If the log files are to be archived indefinitely, it is sometimes more |
---|
34 | convenient to label the filenames with the date when the file was |
---|
35 | turned over. In this case, the files will be named |
---|
36 | ``logfile.YYYYMMDD'' instead of ``logfile.N'', but the number of |
---|
37 | log files stored can still be specified by the user. |
---|
38 | .PP |
---|
39 | When starting up, |
---|
40 | .I newsyslog |
---|
41 | reads in a configuration file to determine which logs should be looked |
---|
42 | at. By default, this configuration file is |
---|
43 | .IR /etc/athena/newsyslog.conf . |
---|
44 | The syntax of this file is described in a separate manpage. |
---|
45 | .PP |
---|
46 | .SH OPTIONS |
---|
47 | The following options can be used with newsyslog: |
---|
48 | .TP |
---|
49 | .B \-f \fIconfig-file |
---|
50 | instructs newsyslog to use |
---|
51 | .I config-file |
---|
52 | instead of /etc/athena/newsyslog.conf for its configuration file. |
---|
53 | .TP |
---|
54 | .B \-t \fIsleep |
---|
55 | tells newsyslog to sleep for the specified number of seconds after |
---|
56 | sending a signal to a process, in order to give it time to clean up. |
---|
57 | (The default is 1.) |
---|
58 | .TP |
---|
59 | .B \-v |
---|
60 | places |
---|
61 | .I newsyslog |
---|
62 | in verbose mode. In this mode it will print out each log and its |
---|
63 | reasons for either trimming that log or skipping it. |
---|
64 | .TP |
---|
65 | .B \-n |
---|
66 | causes |
---|
67 | .I newsyslog |
---|
68 | not to trim the logs, but to print out what it would do if this option |
---|
69 | were not specified. |
---|
70 | .TP |
---|
71 | .B \-r |
---|
72 | removes the restriction that |
---|
73 | .I newsyslog |
---|
74 | must be running as root. Of course, |
---|
75 | .I newsyslog |
---|
76 | will not be able to send a signal to the processes controlling |
---|
77 | the log files (such as |
---|
78 | .IR syslogd ) |
---|
79 | if they were started by a different user, so this option is probably |
---|
80 | most useful in debugging. |
---|
81 | .SH FILES |
---|
82 | /etc/athena/newsyslog.conf |
---|
83 | .SH BUGS |
---|
84 | Doesn't yet automatically read the logs to find security breaches. |
---|
85 | .SH AUTHORS |
---|
86 | Newsyslog was written by Theodore Ts'o, MIT Project Athena. |
---|
87 | .br |
---|
88 | bert Dvornik, MIT IS/DCNS-Dev, added some new features. |
---|
89 | .br |
---|
90 | Copyright 1987,1995 Massachusetts Institute of Technology |
---|
91 | .SH "SEE ALSO" |
---|
92 | newsyslog.conf(5), syslogd(8), compress(1) |
---|