2 .\" Copyright (c) 2000 Brian Somers <brian@Awfulhak.org>
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 .\" $FreeBSD: head/share/man/man5/periodic.conf.5 323550 2017-09-13 16:35:16Z gordon $
33 .Nd periodic job configuration information
37 contains a description of how daily, weekly and monthly system maintenance
41 directory and parts may be overridden by a file of the same name in
43 which itself may be overridden by the
44 .Pa /etc/periodic.conf.local
50 is actually sourced as a shell script from each of the periodic scripts
51 and is intended to simply provide default configuration variables.
53 The following variables are used by
56 .Bl -tag -offset 4n -width 2n
59 List of directories to search for periodic scripts.
60 This list is always prefixed with
62 and is only used when an argument to
64 is not an absolute directory name.
65 .It Ao Ar dir Ac Ns Va _output
66 .Pq Vt path No or Vt list
67 What to do with the output of the scripts executed from
70 If this variable is set to an absolute path name, output is logged to
71 that file, otherwise it is taken as one or more space separated email
72 addresses and mailed to those users.
73 If this variable is not set or is empty, output is sent to standard output.
75 For an unattended machine, suitable values for
81 .Dq Li /var/log/daily.log ,
82 .Dq Li /var/log/weekly.log ,
84 .Dq Li /var/log/monthly.log
87 will rotate these files (if they exists) at the appropriate times.
88 .It Ao Ar dir Ac Ns Va _show_success
89 .It Ao Ar dir Ac Ns Va _show_info
90 .It Ao Ar dir Ac Ns Va _show_badconfig
92 These variables control whether
94 will mask the output of the executed scripts based on their return code
97 is the base directory name in which each script resides).
98 If the return code of a script is
101 .Ao Ar dir Ac Ns Va _show_success
105 will mask the script's output.
106 If the return code of a script is
109 .Ao Ar dir Ac Ns Va _show_info
113 will mask the script's output.
114 If the return code of a script is
117 .Ao Ar dir Ac Ns Va _show_badconfig
121 will mask the script's output.
122 If these variables are set to neither
135 manual page for how script return codes are interpreted.
136 .It Va anticongestion_sleeptime
138 The maximum number of seconds to randomly sleep in order to smooth bursty loads
139 on a shared resource, such as a download mirror.
142 The following variables are used by the standard scripts that reside in
143 .Pa /etc/periodic/daily :
144 .Bl -tag -offset 4n -width 2n
145 .It Va daily_clean_disks_enable
149 if you want to remove all files matching
150 .Va daily_clean_disks_files
152 .It Va daily_clean_disks_files
154 Set to a list of file names to match.
155 Wild cards are permitted.
156 .It Va daily_clean_disks_days
159 .Va daily_clean_disks_enable
162 this must also be set to the number of days old that a file's access
163 and modification times must be before it is deleted.
164 .It Va daily_clean_disks_verbose
168 if you want the removed files to be reported in your daily output.
169 .It Va daily_clean_tmps_enable
173 if you want to clear temporary directories daily.
174 .It Va daily_clean_tmps_dirs
176 Set to the list of directories to clear if
177 .Va daily_clean_tmps_enable
180 .It Va daily_clean_tmps_days
183 .Va daily_clean_tmps_enable
184 is set, this must also be set to the number of days old that a file's access
185 and modification times must be before it is deleted.
186 .It Va daily_clean_tmps_ignore
188 Set to the list of files that should not be deleted when
189 .Va daily_clean_tmps_enable
192 Wild card characters are permitted.
193 .It Va daily_clean_tmps_verbose
197 if you want the removed files to be reported in your daily output.
198 .It Va daily_clean_preserve_enable
202 if you wish to remove old files from
204 .It Va daily_clean_preserve_days
206 Set to the number of days that files must not have been modified before
208 .It Va daily_clean_preserve_verbose
212 if you want the removed files to be reported in your daily output.
213 .It Va daily_clean_msgs_enable
217 if you wish old system messages to be purged.
218 .It Va daily_clean_msgs_days
220 Set to the number of days that files must not have been modified before
222 If this variable is left blank, the
225 .It Va daily_clean_rwho_enable
229 if you wish old files in
232 .It Va daily_clean_rwho_days
234 Set to the number of days that files must not have been modified before
236 .It Va daily_clean_rwho_verbose
240 if you want the removed files to be reported in your daily output.
241 .It Va daily_clean_hoststat_enable
247 to automatically purge stale entries from
250 Files will be deleted using the same criteria as
252 would normally use when determining whether to believe the cached information,
254 .Pa /etc/mail/sendmail.cf .
255 .It Va daily_clean_hammer_enable
261 file systems to be snapshot, pruned and reblocked.
262 .It Va daily_clean_hammer_verbose
266 if you wish more verbose output.
267 .It Va daily_clean_hammer_pfslist
271 filesystems and pseudo-filesystems to clean.
272 If this variable is left blank, the default
276 .It Va daily_clean_hammer2_enable
288 .It Va daily_clean_hammer2_verbose
292 if you wish more verbose output.
293 .It Va daily_clean_hammer2_pfslist
297 filesystems and pseudo-filesystems to clean.
298 If this variable is left blank, the default
302 .It Va daily_backup_passwd_enable
307 .Pa /etc/master.passwd
310 files backed up and reported on.
311 Reporting consists of checking both files for modifications and running
316 .It Va daily_backup_aliases_enable
321 .Pa /etc/mail/aliases
322 file backed up and modifications to be displayed in your daily output.
323 .It Va daily_calendar_enable
330 .It Va daily_accounting_enable
334 if you want to rotate your daily accounting files.
335 No rotations are necessary unless
336 .Va accounting_enable
339 .It Va daily_accounting_compress
343 if you want your daily accounting files to be compressed using
345 .It Va daily_accounting_save
348 .Va daily_accounting_enable
349 is set, this may also be set to the number of daily accounting files that are
353 .It Va daily_accounting_flags
355 Set to the arguments to pass to the
357 utility (in addition to
360 .Va daily_accounting_enable
365 .It Va daily_news_expire_enable
370 .Pa /etc/news.expire .
371 .It Va daily_status_disks_enable
377 (with the arguments supplied in
378 .Va daily_status_disks_df_flags )
381 .It Va daily_status_disks_df_flags
383 Set to the arguments for the
386 .Va daily_status_disks_enable
389 .It Va daily_status_mfi_enable
394 .Nm mfiutil Cm status
398 .It Va daily_status_network_enable
404 .It Va daily_status_network_netstat_flags
406 Set to additional arguments for the
409 .Va daily_status_network_enable
414 .It Va daily_status_network_usedns
422 option (to do DNS lookups).
423 .It Va daily_status_uptime_enable
437 .It Va daily_status_mailq_enable
443 .It Va daily_status_mailq_shorten
447 if you want to shorten the
450 .Va daily_status_mailq_enable
453 .It Va daily_status_include_submit_mailq
457 if you also want to run
459 on the submit mail queue when
460 .Va daily_status_mailq_enable
463 This may not work with MTAs other than
465 .It Va daily_status_security_enable
469 if you want to run the security check.
470 The security check is another set of
473 The system defaults are in
474 .Pa /etc/periodic/security .
475 Local scripts should be placed in
476 .Pa /usr/local/etc/periodic/security .
479 manual page for more information.
480 .It Va daily_status_security_inline
484 if you want the security check output inline.
485 The default is to either mail or log the output according to the value of
486 .Va daily_status_security_output .
487 .It Va daily_status_security_output
489 Where to send the output of the security check if
490 .Va daily_status_security_inline
493 This variable behaves in the same way as the
495 variables above, namely it can be set either to one or more email addresses
496 or to an absolute file name.
497 .It Va daily_status_mail_rejects_enable
501 if you want to summarise mail rejections logged to
503 for the previous day.
504 .It Va daily_status_mail_rejects_logs
506 Set to the number of maillog files that should be checked
507 for yesterday's mail rejects.
508 .It Va daily_status_mail_rejects_shorten
512 if you want to shorten the mail rejections output.
513 .It Va daily_queuerun_enable
517 if you want to manually run the mail queue at least once a day.
518 .It Va daily_submit_queuerun
522 if you also want to manually run the submit mail queue at least once a day
524 .Va daily_queuerun_enable
529 Set to a list of extra scripts that should be run after all other
531 All scripts must be absolute path names.
534 The following variables are used by the standard scripts that reside in
535 .Pa /etc/periodic/weekly :
536 .Bl -tag -offset 4n -width 2n
537 .It Va weekly_locate_enable
542 .Pa /usr/libexec/locate.updatedb .
543 This script is run using
547 and generates the table used by the
550 .It Va weekly_whatis_enable
555 .Pa /usr/libexec/makewhatis.local .
556 This script regenerates the database used by the
559 .It Va weekly_noid_enable
563 if you want to locate orphaned files on the system.
564 An orphaned file is one with an invalid owner or group.
565 .It Va weekly_noid_dirs
567 A list of directories under which orphaned files are searched for.
568 This would usually be set to
570 .It Va weekly_status_security_enable
572 Weekly counterpart of
573 .Va daily_status_security_enable .
574 .It Va weekly_status_security_inline
576 Weekly counterpart of
577 .Va daily_status_security_inline .
578 .It Va weekly_status_security_output
580 Weekly counterpart of
581 .Va daily_status_security_output .
584 Set to a list of extra scripts that should be run after all other
586 All scripts must be absolute path names.
589 The following variables are used by the standard scripts that reside in
590 .Pa /etc/periodic/monthly :
591 .Bl -tag -offset 4n -width 2n
592 .It Va monthly_accounting_enable
596 if you want to do login accounting using the
599 .It Va monthly_status_security_enable
601 Monthly counterpart of
602 .Va daily_status_security_enable .
603 .It Va monthly_status_security_inline
605 Monthly counterpart of
606 .Va daily_status_security_inline .
607 .It Va monthly_status_security_output
609 Monthly counterpart of
610 .Va daily_status_security_output .
613 Set to a list of extra scripts that should be run after all other
615 All scripts must be absolute path names.
618 The following variables are used by the standard scripts that reside in
619 .Pa /etc/periodic/security .
620 Those scripts are usually run from daily
621 .Pq Va daily_status_security_enable ,
623 .Pq Va weekly_status_security_enable ,
625 .Pq Va monthly_status_security_enable
629 of each script can be configured as
635 Note that when periodic security scripts are run from
637 they will be always run unless their
643 .Bl -tag -offset 4n -width 2n
644 .It Va security_status_logdir
646 The directory where the security scripts expect the system's log files.
649 .It Va security_status_diff_flags
651 Set to the arguments to pass to the
653 utility when generating differences.
656 .It Va security_status_chksetuid_enable
660 to compare the modes and modification times of setuid executables with
661 the previous day's values.
662 .It Va security_status_chksetuid_period
670 .It Va security_status_neggrpperm_enable
674 to check for files where the group of a file has less permissions than
676 When users are in more than 14 supplemental groups these negative
677 permissions may not be enforced via NFS shares.
678 .It Va security_status_neggrpperm_period
686 .It Va security_status_chkmounts_enable
690 to check for changes mounted file systems to the previous day's values.
691 .It Va security_status_chkmounts_period
699 .It Va security_status_nomfs
703 if you want to ignore
705 mounts when comparing against yesterday's file system mounts in the
706 .Va security_status_chkmounts_enable
708 .It Va security_status_chkuid0_enable
713 .Pa /etc/master.passwd
714 for accounts with UID 0.
715 .It Va security_status_chkuid0_period
723 .It Va security_status_passwdless_enable
728 .Pa /etc/master.passwd
729 for accounts with empty passwords.
730 .It Va security_status_passwdless_period
738 .It Va security_status_logincheck_enable
746 for more information.
747 .It Va security_status_logincheck_period
755 .It Va security_status_ipfwdenied_enable
759 to show log entries for packets denied by
761 since yesterday's check.
762 .It Va security_status_ipfwdenied_period
770 .It Va security_status_pfdenied_enable
774 to show log entries for packets denied by
776 since yesterday's check.
777 .It Va security_status_pfdenied_period
785 .It Va security_status_ipfwlimit_enable
791 rules that have reached their verbosity limit.
792 .It Va security_status_ipfwlimit_period
800 .It Va security_status_ip6fwdenied_enable
804 to show log entries for packets denied by
806 since yesterday's check.
807 .It Va security_status_ip6fwdenied_period
815 .It Va security_status_ip6fwlimit_enable
821 rules that have reached their verbosity limit.
822 .It Va security_status_ip6fwlimit_period
830 .It Va security_status_kernelmsg_enable
836 entries since yesterday's check.
837 .It Va security_status_kernelmsg_period
845 .It Va security_status_loginfail_enable
849 to display failed logins from
850 .Pa /var/log/messages
852 .It Va security_status_loginfail_period
860 .It Va security_status_tcpwrap_enable
864 to display connections denied by tcpwrappers (see
867 .Pa /var/log/messages
868 during the previous day.
869 .It Va security_status_tcpwrap_period
879 .Bl -tag -width ".Pa /etc/defaults/periodic.conf"
880 .It Pa /etc/defaults/periodic.conf
881 The default configuration file.
882 This file contains all default variables and values.
883 .It Pa /etc/periodic.conf
884 The usual system specific variable override file.
885 .It Pa /etc/periodic.conf.local
886 An additional override file, useful when
887 .Pa /etc/periodic.conf
888 is shared or distributed.
919 .An Brian Somers Aq Mt brian@Awfulhak.org