]> git.saurik.com Git - apple/syslog.git/blame - aslmanager.tproj/aslmanager.8
syslog-356.1.1.tar.gz
[apple/syslog.git] / aslmanager.tproj / aslmanager.8
CommitLineData
c4fdb7d1 1.\"Copyright (c) 2004-2009 Apple Inc. All rights reserved.
57b0aad2
A
2.\"
3.\"@APPLE_LICENSE_HEADER_START@
4.\"
5.\"This file contains Original Code and/or Modifications of Original Code
6.\"as defined in and that are subject to the Apple Public Source License
7.\"Version 2.0 (the 'License'). You may not use this file except in
8.\"compliance with the License. Please obtain a copy of the License at
9.\"http://www.opensource.apple.com/apsl/ and read it before using this
10.\"file.
11.\"
12.\"The Original Code and all software distributed under the License are
13.\"distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14.\"EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15.\"INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16.\"FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
17.\"Please see the License for the specific language governing rights and
18.\"limitations under the License.
19.\"
20.\"@APPLE_LICENSE_HEADER_END@
21.\"
22.Dd December 7, 2007
23.Dt ASLMANAGER 8
24.Os "Mac OS X"
25.Sh NAME
26.Nm aslmanager
81582353 27.Nd Apple System Log data life-cycle manager
57b0aad2
A
28.Sh SYNOPSIS
29.Nm
30.Op Fl s Ar store_dir
31.Op Fl a Op Ar archive_dir
32.Op Fl ttl Ar days
81582353
A
33.Op Fl store_ttl Ar days
34.Op Fl module_ttl Ar days
57b0aad2 35.Op Fl size Ar max_size
81582353
A
36.Op Fl asldb
37.Op Fl module Op Ar name
38.Op Fl checkpoint
39.Op Fl d Op level
40.Op Fl dd Op level
57b0aad2 41.Sh DESCRIPTION
81582353
A
42.Nm aslmanager
43manages rotated files and ASL data written by the
57b0aad2
A
44.Nm syslogd
45server.
81582353
A
46It is started automatically at various times by
47.Nm syslogd .
48It may also be invoked from the command line by the superuser (root).
49It manages the life-cycle of data in the ASL database, rotated log files,
50and ASL directory data stores.
51Configuration information for
52.Nm aslmanager
53comes from the /etc/asl.conf configuration file,
54any ASL output module configuration files in the /etc/asl directory,
55and from command-line options that may be specified to override some settings
56found in the configuration files.
57In normal operation, it first checks the ASL database in /var/log/asl,
58then it checks the files and directories specified by /etc/asl.conf and each ASL output module.
57b0aad2 59.Pp
81582353
A
60If the
61.Fl asldb
62flag is specified, then only the ASL database will be processed.
57b0aad2 63.Pp
81582353
A
64If the
65.Fl module
66flag is specified, then the ASL database will not be processed.
67All ASL output modules, or a single module if
68.Ar name
69is specified, will be processed.
70.Pp
71If
72.Fl checkpoint
73is specified, then
74.Nm aslmanager
75will signal
76.Nm syslogd
77to checkpoint files for all modules, or for a single named module, before processing.
c4fdb7d1 78.Pp
81582353
A
79The
80.Fl d
81flag causes
57b0aad2 82.Nm
81582353
A
83to print debug messages tracing it's actions as they are performed.
84An integer value (1, 2, or 3) may follow the
85.Fl d
86flag.
87Higher values cause more fine-grained messages to be printed.
88The default value is 1.
89The
90.Fl dd
91flag directs
92.Nm
93to do a
94.Dq dry run .
95Debug messages are printed as with
96.Fl d ,
97but no actions are actually performed.
98An optional debug level may follow the
99.Fl dd
100flag.
101.Ss ASL DATABASE MANAGEMENT
102.Nm aslmanager
103scans the ASL database in /var/log/asl, or some other path specified by the setting of the
104.Dq store_path
105parameter in asl.conf, or by the path supplied following the
57b0aad2 106.Fl s
81582353
A
107flag.
108Data files that are older than the time-to-live for the database are either archived or removed.
109Files that contain messages with explicit expire times are removed or archived monthly after all their contents expire.
110The default 7 day time-to-live value may be overridden by the setting of the
111.Dq store_ttl
112parameter in asl.conf or by supplying a value following the
113.Fl store_ttl
114flag or the
115.Fl ttl
116flag (which overrides the time-to-live for both the ASL database and for all ASL modules).
117A time-to-live value of zero allows files to remain in the store with no time limit.
57b0aad2 118.Pp
81582353
A
119A maximum size for the entire database is provided by the setting of the
120.Dq max_store_size
121parameter in asl.conf, or as a value following the
57b0aad2 122.Fl size
81582353 123flag.
57b0aad2
A
124This will cause
125.Nm
81582353 126to archive (if enabled) and remove files to keep the database size below the specified limit.
c4fdb7d1
A
127The default value is 150000000 bytes.
128A value of zero means the size is unlimited.
129An unlimited size specification should be used with great caution,
130since a runaway process could quickly fill all available disk space.
57b0aad2 131Files are removed in order starting from oldest to newest.
81582353 132Files with the same date are removed in standard lexicographic sort order by file name.
57b0aad2
A
133.Pp
134Files are either removed entirely or copied to an archive directory.
135If the
136.Fl a
137flag is specified with no argument, files are copied to the /var/log/asl.archive directory.
138An alternate directory path may be specified following the
139.Fl a
140flag.
c4fdb7d1
A
141The archive parameter setting in asl.conf enables or disables archiving.
142The archive parameter requires a value of "1" to enable archiving, or a value of "0" to disable it.
143An option archive directory path may follow the "0" or "1".
81582353
A
144.Pp
145.Ss ASL OUTPUT MODULE MANAGEMENT
146For each ASL output module, or a single module specified as an argument following
147.Fl module ,
148.Nm aslmanager
149first locates all checkpoint files produced by
150.Nm syslogd
151for that module.
152.Nm aslmanager
153checks all ASL directory data stores and all rotated log files - those with a
154.Dq rotate
155option in the module's configuration rules.
156Checkpoint files are renamed if necessary to conform to the naming style specified for the file by a
157.Dq style
158option in the module's configuration file.
159.Nm aslmanager
160will compress the file if directed by a
161.Dq compress
162option, and it will move the file to a destination directory if a
163.Dq dest
164option is specified for the file.
165Following this,
166.Nm
167will delete expired files.
168The time-to-live for files is 7 days by default, but may be specified using the
169.Dq ttl
170option for the file in the module's configuration rules.
171If
172.Fl module_ttl
173or
174.Fl ttl
175are specified command line, then value specified as an argument is used as a time-to-live instead.
176.Fl module_ttl
177specifies time-to-live for module processing.
178.Fl ttl
179specifies time-to-live for both the ASL database and for modules.
180.Pp
181Finally, if the
182.Dq all_max
183option is specified for the output file,
184.Nm
185checks the total size of all the rotated versions,
186and will delete them, (oldest first) to limit the total size as specified by
187.Dq all_max .
188When processing ASL directory data stores,
189.Nm
190will similarly delete data files after the expiry of their time-to-live,
191and will delete data files (oldest first) to limit the total size as specified by
192.Dq all_max .
193.Pp
57b0aad2
A
194.Sh SEE ALSO
195.Xr syslogd 8 ,
196.Xr syslog 1 ,
197.Xr asl 3 ,
c4fdb7d1
A
198.Xr asl.conf 5 ,
199.Xr syslog 3 .
57b0aad2
A
200.Sh HISTORY
201The
202.Nm
c4fdb7d1 203utility appeared in Mac OS X 10.6.
81582353 204Support for log file and ASL directory life-cycle management was added in OS X 10.9.