1 .\"Copyright (c) 2004-2009 Apple Inc. All rights reserved.
3 .\"@APPLE_LICENSE_HEADER_START@
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
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.
20 .\"@APPLE_LICENSE_HEADER_END@
27 .Nd Apple System Log data life-cycle manager
31 .Op Fl a Op Ar archive_dir
33 .Op Fl store_ttl Ar days
34 .Op Fl module_ttl Ar days
35 .Op Fl size Ar max_size
37 .Op Fl module Op Ar name
43 manages rotated files and ASL data written by the
46 It is started automatically at various times by
48 It may also be invoked from the command line by the superuser (root).
49 It manages the life-cycle of data in the ASL database, rotated log files,
50 and ASL directory data stores.
51 Configuration information for
53 comes from the /etc/asl.conf configuration file,
54 any ASL output module configuration files in the /etc/asl directory,
55 and from command-line options that may be specified to override some settings
56 found in the configuration files.
57 In normal operation, it first checks the ASL database in /var/log/asl,
58 then it checks the files and directories specified by /etc/asl.conf and each ASL output module.
62 flag is specified, then only the ASL database will be processed.
66 flag is specified, then the ASL database will not be processed.
67 All ASL output modules, or a single module if
69 is specified, will be processed.
77 to checkpoint files for all modules, or for a single named module, before processing.
83 to print debug messages tracing it's actions as they are performed.
84 An integer value (1, 2, or 3) may follow the
87 Higher values cause more fine-grained messages to be printed.
88 The default value is 1.
95 Debug messages are printed as with
97 but no actions are actually performed.
98 An optional debug level may follow the
101 .Ss ASL DATABASE MANAGEMENT
103 scans the ASL database in /var/log/asl, or some other path specified by the setting of the
105 parameter in asl.conf, or by the path supplied following the
108 Data files that are older than the time-to-live for the database are either archived or removed.
109 Files that contain messages with explicit expire times are removed or archived monthly after all their contents expire.
110 The default 7 day time-to-live value may be overridden by the setting of the
112 parameter in asl.conf or by supplying a value following the
116 flag (which overrides the time-to-live for both the ASL database and for all ASL modules).
117 A time-to-live value of zero allows files to remain in the store with no time limit.
119 A maximum size for the entire database is provided by the setting of the
121 parameter in asl.conf, or as a value following the
126 to archive (if enabled) and remove files to keep the database size below the specified limit.
127 The default value is 150000000 bytes.
128 A value of zero means the size is unlimited.
129 An unlimited size specification should be used with great caution,
130 since a runaway process could quickly fill all available disk space.
131 Files are removed in order starting from oldest to newest.
132 Files with the same date are removed in standard lexicographic sort order by file name.
134 Files are either removed entirely or copied to an archive directory.
137 flag is specified with no argument, files are copied to the /var/log/asl.archive directory.
138 An alternate directory path may be specified following the
141 The archive parameter setting in asl.conf enables or disables archiving.
142 The archive parameter requires a value of "1" to enable archiving, or a value of "0" to disable it.
143 An option archive directory path may follow the "0" or "1".
145 .Ss ASL OUTPUT MODULE MANAGEMENT
146 For each ASL output module, or a single module specified as an argument following
149 first locates all checkpoint files produced by
153 checks all ASL directory data stores and all rotated log files - those with a
155 option in the module's configuration rules.
156 Checkpoint files are renamed if necessary to conform to the naming style specified for the file by a
158 option in the module's configuration file.
160 will compress the file if directed by a
162 option, and it will move the file to a destination directory if a
164 option is specified for the file.
167 will delete expired files.
168 The time-to-live for files is 7 days by default, but may be specified using the
170 option for the file in the module's configuration rules.
175 are specified command line, then value specified as an argument is used as a time-to-live instead.
177 specifies time-to-live for module processing.
179 specifies time-to-live for both the ASL database and for modules.
183 option is specified for the output file,
185 checks the total size of all the rotated versions,
186 and will delete them, (oldest first) to limit the total size as specified by
188 When processing ASL directory data stores,
190 will similarly delete data files after the expiry of their time-to-live,
191 and will delete data files (oldest first) to limit the total size as specified by
203 utility appeared in Mac OS X 10.6.
204 Support for log file and ASL directory life-cycle management was added in OS X 10.9.