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
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.
138 The following variables are used by the standard scripts that reside in
139 .Pa /etc/periodic/daily :
140 .Bl -tag -offset 4n -width 2n
141 .It Va daily_clean_disks_enable
145 if you want to remove all files matching
146 .Va daily_clean_disks_files
148 .It Va daily_clean_disks_files
150 Set to a list of file names to match.
151 Wild cards are permitted.
152 .It Va daily_clean_disks_days
155 .Va daily_clean_disks_enable
158 this must also be set to the number of days old that a file's access
159 and modification times must be before it is deleted.
160 .It Va daily_clean_disks_verbose
164 if you want the removed files to be reported in your daily output.
165 .It Va daily_clean_tmps_enable
169 if you want to clear temporary directories daily.
170 .It Va daily_clean_tmps_dirs
172 Set to the list of directories to clear if
173 .Va daily_clean_tmps_enable
176 .It Va daily_clean_tmps_days
179 .Va daily_clean_tmps_enable
180 is set, this must also be set to the number of days old that a file's access
181 and modification times must be before it is deleted.
182 .It Va daily_clean_tmps_ignore
184 Set to the list of files that should not be deleted when
185 .Va daily_clean_tmps_enable
188 Wild card characters are permitted.
189 .It Va daily_clean_tmps_verbose
193 if you want the removed files to be reported in your daily output.
194 .It Va daily_clean_preserve_enable
198 if you wish to remove old files from
200 .It Va daily_clean_preserve_days
202 Set to the number of days that files must not have been modified before
204 .It Va daily_clean_preserve_verbose
208 if you want the removed files to be reported in your daily output.
209 .It Va daily_clean_msgs_enable
213 if you wish old system messages to be purged.
214 .It Va daily_clean_msgs_days
216 Set to the number of days that files must not have been modified before
218 If this variable is left blank, the
221 .It Va daily_clean_rwho_enable
225 if you wish old files in
228 .It Va daily_clean_rwho_days
230 Set to the number of days that files must not have been modified before
232 .It Va daily_clean_rwho_verbose
236 if you want the removed files to be reported in your daily output.
237 .It Va daily_clean_hoststat_enable
243 to automatically purge stale entries from
246 Files will be deleted using the same criteria as
248 would normally use when determining whether to believe the cached information,
250 .Pa /etc/mail/sendmail.cf .
251 .It Va daily_backup_passwd_enable
256 .Pa /etc/master.passwd
259 files backed up and reported on.
260 Reporting consists of checking both files for modifications and running
265 .It Va daily_backup_aliases_enable
270 .Pa /etc/mail/aliases
271 file backed up and modifications to be displayed in your daily output.
272 .It Va daily_calendar_enable
279 .It Va daily_accounting_enable
283 if you want to rotate your daily accounting files.
284 No rotations are necessary unless
285 .Va accounting_enable
288 .It Va daily_accounting_compress
292 if you want your daily accounting files to be compressed using
294 .It Va daily_accounting_save
297 .Va daily_accounting_enable
298 is set, this may also be set to the number of daily accounting files that are
302 .It Va daily_accounting_flags
304 Set to the arguments to pass to the
306 utility (in addition to
309 .Va daily_accounting_enable
314 .It Va daily_news_expire_enable
319 .Pa /etc/news.expire .
320 .It Va daily_status_disks_enable
326 (with the arguments supplied in
327 .Va daily_status_disks_df_flags )
330 .It Va daily_status_disks_df_flags
332 Set to the arguments for the
335 .Va daily_status_disks_enable
338 .It Va daily_status_zfs_enable
347 .It Va daily_status_zfs_zpool_list_enable
357 .Va daily_status_zfs_enable
360 .It Va daily_status_ata_raid_enable
365 .Nm atacontrol Cm status
369 .It Va daily_status_gmirror_enable
374 .Nm gmirror Cm status
378 .It Va daily_status_graid3_enable
387 .It Va daily_status_gstripe_enable
392 .Nm gstripe Cm status
396 .It Va daily_status_gconcat_enable
401 .Nm gconcat Cm status
405 .It Va daily_status_network_enable
411 .It Va daily_status_network_usedns
419 option (to do DNS lookups).
420 .It Va daily_status_rwho_enable
434 .It Va daily_status_mailq_enable
440 .It Va daily_status_mailq_shorten
444 if you want to shorten the
447 .Va daily_status_mailq_enable
450 .It Va daily_status_include_submit_mailq
454 if you also want to run
456 on the submit mail queue when
457 .Va daily_status_mailq_enable
460 This may not work with MTAs other than
462 .It Va daily_status_security_enable
466 if you want to run the security check.
467 The security check is another set of
470 The system defaults are in
471 .Pa /etc/periodic/security .
472 Local scripts should be placed in
473 .Pa /usr/local/etc/periodic/security .
476 manual page for more information.
477 .It Va daily_status_security_inline
481 if you want the security check output inline.
482 The default is to either mail or log the output according to the value of
483 .Va daily_status_security_output .
484 .It Va daily_status_security_output
486 Where to send the output of the security check if
487 .Va daily_status_security_inline
490 This variable behaves in the same way as the
492 variables above, namely it can be set either to one or more email addresses
493 or to an absolute file name.
494 .It Va daily_status_security_diff_flags
496 Set to the arguments to pass to the
498 utility when generating differences.
501 .It Va daily_status_security_chksetuid_enable
505 to compare the modes and modification times of setuid executables with
506 the previous day's values.
507 .It Va daily_status_security_neggrpperm_enable
511 to check for files where the group of a file has less permissions than
513 When users are in more than 14 supplemental groups these negative
514 permissions may not be enforced via NFS shares.
515 .It Va daily_status_security_chkmounts_enable
519 to check for changes mounted file systems to the previous day's values.
520 .It Va daily_status_security_noamd
524 if you want to ignore
526 mounts when comparing against yesterday's file system mounts in the
527 .Va daily_status_security_chkmounts_enable
529 .It Va daily_status_security_chkuid0_enable
534 .Pa /etc/master.passwd
535 for accounts with UID 0.
536 .It Va daily_status_security_passwdless_enable
541 .Pa /etc/master.passwd
542 for accounts with empty passwords.
543 .It Va daily_status_security_logincheck_enable
551 for more information.
552 .It Va daily_status_security_ipfwdenied_enable
556 to show log entries for packets denied by
558 since yesterday's check.
559 .It Va daily_status_security_ipfdenied_enable
563 to show log entries for packets denied by
565 since yesterday's check.
566 .It Va daily_status_security_pfdenied_enable
570 to show log entries for packets denied by
572 since yesterday's check.
573 .It Va daily_status_security_ipfwlimit_enable
579 rules that have reached their verbosity limit.
580 .It Va daily_status_security_kernelmsg_enable
586 entries since yesterday's check.
587 .It Va daily_status_security_loginfail_enable
591 to display failed logins from
592 .Pa /var/log/messages
594 .It Va daily_status_security_tcpwrap_enable
598 to display connections denied by tcpwrappers (see
601 .Pa /var/log/messages
602 during the previous day.
603 .It Va daily_status_mail_rejects_enable
607 if you want to summarise mail rejections logged to
609 for the previous day.
610 .It Va daily_status_mail_rejects_logs
612 Set to the number of maillog files that should be checked
613 for yesterday's mail rejects.
614 .It Va daily_status_named_enable
618 if you want to summarise denied zone transfers (AXFR and IXFR)
619 for the previous day.
620 .It Va daily_status_named_usedns
624 if you want to enable reverse DNS lookups.
625 .It Va daily_status_ntpd
629 if you want to enable NTP status check.
630 .It Va daily_queuerun_enable
634 if you want to manually run the mail queue at least once a day.
635 .It Va daily_submit_queuerun
639 if you also want to manually run the submit mail queue at least once a day
641 .Va daily_queuerun_enable
644 .It Va daily_scrub_zfs_enable
648 if you want to run a zfs scrub periodically.
649 .It Va daily_scrub_zfs_pools
651 A space separated list of names of zfs pools to scrub.
652 If the list is empty or not set, all zfs pools are scrubbed.
653 .It Va daily_scrub_zfs_default_threshold
655 Number of days between a scrub if no pool-specific threshold is set.
656 If not set, the default value is 35, corresponding to 5 weeks.
657 .It Va daily_scrub_zfs_ Ns Ao Ar poolname Ac Ns Va _threshold
660 .Va daily_scrub_zfs_default_threshold
661 but specific to the pool
662 .Ao Ar poolname Ac Ns .
665 Set to a list of extra scripts that should be run after all other
667 All scripts must be absolute path names.
670 The following variables are used by the standard scripts that reside in
671 .Pa /etc/periodic/weekly :
672 .Bl -tag -offset 4n -width 2n
673 .It Va weekly_locate_enable
678 .Pa /usr/libexec/locate.updatedb .
679 This script is run using
683 and generates the table used by the
686 .It Va weekly_whatis_enable
691 .Pa /usr/libexec/makewhatis.local .
692 This script regenerates the database used by the
695 .It Va weekly_catman_enable
700 .Pa /usr/libexec/catman.local .
701 This script processes all out of date manual pages, speeding up the
703 command at the expense of disk space.
704 .It Va weekly_noid_enable
708 if you want to locate orphaned files on the system.
709 An orphaned file is one with an invalid owner or group.
710 .It Va weekly_noid_dirs
712 A list of directories under which orphaned files are searched for.
713 This would usually be set to
715 .It Va weekly_status_pkg_enable
721 to list installed packages which are out of date.
725 .Va weekly_status_pkg_enable
728 this variable specifies the program that is used to determine the out of
733 As an example, this variable might be set to
736 .Pa ports/sysutils/portupgrade
737 port has been installed.
738 .It Va pkg_version_index
740 This variable specifies the
744 that should be used by
746 Because the dependency tree may be substantially different between versions of
748 there may be more than one
757 it will also be necessary to arrange that the correct
760 using environment variables and that
761 .Va pkg_version_index
763 .Pa /etc/periodic.conf
764 .Pq Dq Li pkg_version_index= .
767 Set to a list of extra scripts that should be run after all other
769 All scripts must be absolute path names.
772 The following variables are used by the standard scripts that reside in
773 .Pa /etc/periodic/monthly :
774 .Bl -tag -offset 4n -width 2n
775 .It Va monthly_accounting_enable
779 if you want to do login accounting using the
784 Set to a list of extra scripts that should be run after all other
786 All scripts must be absolute path names.
789 .Bl -tag -width ".Pa /etc/defaults/periodic.conf"
790 .It Pa /etc/defaults/periodic.conf
791 The default configuration file.
792 This file contains all default variables and values.
793 .It Pa /etc/periodic.conf
794 The usual system specific variable override file.
795 .It Pa /etc/periodic.conf.local
796 An additional override file, useful when
797 .Pa /etc/periodic.conf
798 is shared or distributed.
826 .An Brian Somers Aq brian@Awfulhak.org