Changeset b1532549 for general/sysutils/logrotate.xml
- Timestamp:
- 03/19/2020 10:00:16 AM (4 years ago)
- Branches:
- 10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, lazarus, lxqt, plabs/newcss, plabs/python-mods, python3.11, qt5new, rahul/power-profiles-daemon, renodr/vulkan-addition, trunk, upgradedb, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/test-20220226, xry111/xf86-video-removal
- Children:
- e68b588
- Parents:
- 09f0998
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
general/sysutils/logrotate.xml
r09f0998 rb1532549 31 31 32 32 <para> 33 The <application>logrotate</application> package allows automatic rotation,34 compression, removal, and mailing of log files.33 The <application>logrotate</application> package allows automatic 34 rotation, compression, removal, and mailing of log files. 35 35 </para> 36 36 … … 119 119 120 120 <sect2 role="configuration"> 121 <title>Configuring Logrotate</title> 122 123 <para><application>Logrotate</application> needs a configuration file, 124 which must be passed as an argument to the command when executed. Create 125 the file as the <systemitem class="username">root</systemitem> user:</para> 121 <title>Configuring Logrotate</title> 122 123 <para> 124 <application>Logrotate</application> needs a configuration file, 125 which must be passed as an argument to the command when executed. Create 126 the file as the <systemitem class="username">root</systemitem> user: 127 </para> 126 128 127 129 <screen role="root"><userinput>cat > /etc/logrotate.conf << EOF … … 170 172 chmod -v 0644 /etc/logrotate.conf</userinput></screen> 171 173 172 <para>Now create the <filename class='directory'>/etc/logrotate.d</filename> 173 directory as the <systemitem class="username">root</systemitem> user:</para> 174 <para> 175 Now create the <filename class='directory'>/etc/logrotate.d</filename> 176 directory as the <systemitem class="username">root</systemitem> user: 177 </para> 174 178 175 179 <screen role="root"><userinput>mkdir -p /etc/logrotate.d</userinput></screen> 176 180 177 <para>At this point additional log rotation commands can be entered, typically 178 in the <filename class='directory'>/etc/logrotate.d</filename> directory. 179 For example:</para> 181 <para> 182 At this point additional log rotation commands can be entered, typically 183 in the <filename class='directory'>/etc/logrotate.d</filename> directory. 184 For example: 185 </para> 180 186 181 187 <screen role="nodump"><userinput>cat > /etc/logrotate.d/sys.log << EOF … … 193 199 chmod -v 0644 /etc/logrotate.d/sys.log</userinput></screen> 194 200 195 <para>You can designate multiple files in one entry:</para> 201 <para> 202 You can designate multiple files in one entry: 203 </para> 196 204 197 205 <screen role="nodump"><userinput>cat > /etc/logrotate.d/example.log << EOF … … 208 216 chmod -v 0644 /etc/logrotate.d/example.log</userinput></screen> 209 217 210 <para>You can use in the same line the list of files: file1 file2 file3. 211 See the logrotate man page or 212 <ulink url='http://www.techrepublic.com/article/manage-linux-log-files-with-logrotate/'/> 213 for more examples.</para> 214 215 <para>The command <command>logrotate /etc/logrotate.conf</command> can be 216 run manually, however, the command should be run daily. 217 Other useful commands are <command>logrotate -d /etc/logrotate.conf</command> 218 for debugging purposes and <command>logrotate -f /etc/logrotate.conf</command> 219 forcing the logrotate commands to be run immediately. Combining the previous 220 options <option>-df</option>, you can debug the effect of the force command. 221 When debugging, the command is only simulated, not really run, thus, eventual 222 non-existing errors appear, when some intermediate files are expected, 223 because they are not actually created.</para> 218 <para> 219 You can use in the same line the list of files: file1 file2 file3. 220 See the logrotate man page or <ulink 221 url='http://www.techrepublic.com/article/manage-linux-log-files-with-logrotate/'/> 222 for more examples. 223 </para> 224 225 <para> 226 The command <command>logrotate /etc/logrotate.conf</command> can be 227 run manually, however, the command should be run daily. 228 Other useful commands are <command>logrotate -d 229 /etc/logrotate.conf</command> for debugging purposes and 230 <command>logrotate -f /etc/logrotate.conf</command> forcing the 231 logrotate commands to be run immediately. Combining the previous options 232 <option>-df</option>, you can debug the effect of the force command. 233 When debugging, the command is only simulated, not really run, thus, 234 eventual non-existing errors appear, when some intermediate files are 235 expected, because they are not actually created. 236 </para> 224 237 225 238 <para>
Note:
See TracChangeset
for help on using the changeset viewer.