xref: /netbsd-src/share/man/man5/daily.5 (revision d5fdd803ef49be66a05b970aa42aa81efcf20c52)
1*d5fdd803Swiz.\"	$NetBSD: daily.5,v 1.7 2020/12/02 14:18:13 wiz Exp $
24811a796Sjruoho.\"
34811a796Sjruoho.\" Copyright (c) 1996 Matthew R. Green
44811a796Sjruoho.\" All rights reserved.
54811a796Sjruoho.\"
64811a796Sjruoho.\" Redistribution and use in source and binary forms, with or without
74811a796Sjruoho.\" modification, are permitted provided that the following conditions
84811a796Sjruoho.\" are met:
94811a796Sjruoho.\" 1. Redistributions of source code must retain the above copyright
104811a796Sjruoho.\"    notice, this list of conditions and the following disclaimer.
114811a796Sjruoho.\" 2. Redistributions in binary form must reproduce the above copyright
124811a796Sjruoho.\"    notice, this list of conditions and the following disclaimer in the
134811a796Sjruoho.\"    documentation and/or other materials provided with the distribution.
144811a796Sjruoho.\"
154811a796Sjruoho.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
164811a796Sjruoho.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
174811a796Sjruoho.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
184811a796Sjruoho.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
194811a796Sjruoho.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
204811a796Sjruoho.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
214811a796Sjruoho.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
224811a796Sjruoho.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
234811a796Sjruoho.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
244811a796Sjruoho.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
254811a796Sjruoho.\" SUCH DAMAGE.
264811a796Sjruoho.\"
27*d5fdd803Swiz.Dd December 2, 2020
2863728753Sjruoho.Dt DAILY 5
294811a796Sjruoho.Os
304811a796Sjruoho.Sh NAME
3163728753Sjruoho.Nm daily ,
324811a796Sjruoho.Nm daily.conf
3363728753Sjruoho.Nd daily maintenance
344811a796Sjruoho.Sh DESCRIPTION
354811a796SjruohoThe
364811a796Sjruoho.Pa /etc/daily
374811a796Sjruohoscript is run, by default, every night on a
384811a796Sjruoho.Nx
394811a796Sjruohosystem.
4063728753SjruohoThe
4163728753Sjruoho.Pa /etc/daily.conf
4263728753Sjruohofile specifies which of the standard
4363728753Sjruoho.Nm
4463728753Sjruohoservices are performed.
454811a796Sjruoho.Pp
464811a796SjruohoThe variables described below can be set to
474811a796Sjruoho.Dq YES
484811a796Sjruohoor
494811a796Sjruoho.Dq NO
504811a796Sjruohoin the
514811a796Sjruoho.Pa /etc/daily.conf
524811a796Sjruohofile.
534811a796SjruohoMost default to
544811a796Sjruoho.Dq YES ,
554811a796Sjruohobut not all.
564811a796SjruohoCheck the
574811a796Sjruoho.Pa /etc/defaults/daily.conf
584811a796Sjruohofile if you are in doubt.
594811a796Sjruoho(Note that you should never edit
604811a796Sjruoho.Pa /etc/defaults/daily.conf
614811a796Sjruohodirectly, as it is often replaced during system upgrades.)
624811a796Sjruoho.Bl -tag -width fetch_pkg_vulnerabilities
634811a796Sjruoho.It Sy find_core
644811a796SjruohoThis runs
654811a796Sjruoho.Xr find 1
664811a796Sjruohoover the entire local filesystem, looking for core files.
674811a796Sjruoho.It Sy run_msgs
684811a796SjruohoThis runs
694811a796Sjruoho.Xr msgs 1
704811a796Sjruohowith the
714811a796Sjruoho.Fl c
724811a796Sjruohoargument.
734811a796Sjruoho.It Sy expire_news
744811a796SjruohoThis runs the
754811a796Sjruoho.Pa /etc/expire.news
764811a796Sjruohoscript.
774811a796Sjruoho.It Sy purge_accounting
784811a796SjruohoThis ages accounting files in
794811a796Sjruoho.Pa /var/account .
804811a796Sjruoho.It Sy run_calendar
814811a796SjruohoThis runs
824811a796Sjruoho.Xr calendar 1
834811a796Sjruohowith the
844811a796Sjruoho.Fl a
854811a796Sjruohoargument.
864811a796Sjruoho.It Sy check_disks
874811a796SjruohoThis uses the
884811a796Sjruoho.Xr df 1
894811a796Sjruohoand
904811a796Sjruoho.Xr dump 8
914811a796Sjruohoto give disk status, and also reports failed
924811a796Sjruoho.Xr raid 4
934811a796Sjruohocomponents.
944811a796Sjruoho.It Sy show_remote_fs
954811a796SjruohoIn check_disks, show remote file systems, which are not reported on by
964811a796Sjruohodefault.
974811a796Sjruoho.It Sy check_mailq
984811a796SjruohoThis runs
994811a796Sjruoho.Xr mailq 1 .
1004811a796Sjruoho.It Sy check_network
1014811a796SjruohoThis runs
1024811a796Sjruoho.Xr netstat 1
1034811a796Sjruohowith the
1044811a796Sjruoho.Fl i
1054811a796Sjruohoargument, and also checks the
1064811a796Sjruoho.Xr rwhod 8
1074811a796Sjruohodatabase, and runs
1084811a796Sjruoho.Xr ruptime 1
1094811a796Sjruohoif there are hosts in
1104811a796Sjruoho.Pa /var/rwho .
1114811a796Sjruoho.It Sy full_netstat
1124811a796SjruohoBy default,
1134811a796Sjruoho.Sy check_network
1144811a796Sjruohooutputs a summarized version of the
1154811a796Sjruoho.Xr netstat 1
1164811a796Sjruohoreport.
1174811a796SjruohoIf a full version of the output run with the
1184811a796Sjruoho.Fl inv
1194811a796Sjruohooptions is desired, set this variable.
1204811a796Sjruoho.It Sy run_fsck
1214811a796SjruohoThis runs
1224811a796Sjruoho.Xr fsck 8
1234811a796Sjruohowith the
1244811a796Sjruoho.Fl n
1254811a796Sjruohooption.
1264811a796Sjruoho.It Sy run_rdist
1274811a796SjruohoThis runs
1284811a796Sjruoho.Xr rdist 1
1294811a796Sjruohowith
1304811a796Sjruoho.Pa /etc/Distfile .
1314811a796Sjruoho.It Sy run_security
1324811a796SjruohoThis runs the
1334811a796Sjruoho.Pa /etc/security
1344811a796Sjruohoscript looking for possible security problems with the system.
1354811a796Sjruoho.It Sy run_skeyaudit
1364811a796SjruohoRuns the
1374811a796Sjruoho.Xr skeyaudit 1
1384811a796Sjruohoprogram to check the S/Key database and informs users of S/Keys that
1394811a796Sjruohoare about to expire.
140002ad20eSplunky.It Sy run_makemandb
141002ad20eSplunkyIf the
142002ad20eSplunky.Pa /etc/man.conf
143002ad20eSplunkyfile exists, runs the
144002ad20eSplunky.Xr makemandb 8
145002ad20eSplunkyutility to update the
146002ad20eSplunky.Pa man.db
147002ad20eSplunkydatabase for use by
148002ad20eSplunky.Xr apropos 1 .
1494811a796Sjruoho.It Sy fetch_pkg_vulnerabilities
1504811a796SjruohoRefreshes the local database of package vulnerabilities.
1514811a796SjruohoSee the settings in
1524811a796Sjruoho.Xr security.conf 5
1534811a796Sjruohofor details on the actual package checks.
1544811a796Sjruoho.El
1554811a796Sjruoho.Pp
1564811a796SjruohoThe variables described below can be set to modify the tests:
157b035f17cSjruoho.Bl -tag -width fetch_pkg_vulnerabilities
1584811a796Sjruoho.It Sy find_core_ignore_fstypes
1594811a796SjruohoLists filesystem types to ignore during the
1604811a796Sjruoho.Sy find_core
1614811a796Sjruohophase.
1624811a796SjruohoPrefixing the type with a
1634811a796Sjruoho.Sq \&!
1644811a796Sjruohoinverts the match.
1654811a796SjruohoFor example,
1664811a796Sjruoho.Ql procfs !local
1674811a796Sjruohowill ignore
1684811a796Sjruoho.Ql procfs
1694811a796Sjruohotype filesystems and filesystems that are not
1704811a796Sjruoho.Ql local .
171e763a079Schristos.It Sy find_core_ignore_paths
172e763a079SchristosLists paths to ignore during the
173e763a079Schristos.Sy find_core
174e763a079Schristosphase.
175e763a079SchristosFor example,
17642334e4fSwiz.Ql Pa /export
177e763a079Schristoswill not descend into any directories under the
17842334e4fSwiz.Ql Pa /export
17942334e4fSwizhierarchy.
18042334e4fSwizThis, on a file server, allows to skip
181e763a079Schristosuser data while still scanning system files.
1824811a796Sjruoho.It Sy run_fsck_flags
1834811a796SjruohoExtra options to be passed to
1844811a796Sjruoho.Xr fsck 8
1854811a796Sjruohoif
1864811a796Sjruoho.Sy run_fsck
1874811a796Sjruohois enabled.
1884811a796Sjruoho.It Sy send_empty_security
1894811a796SjruohoIf set, the report generated by the
1904811a796Sjruoho.Sy run_security
1914811a796Sjruohophase will always be sent, even if it is empty.
1924811a796Sjruoho.It Sy pkgdb_dir
1934811a796Sjruoho.Em DEPRECATED .
1944811a796SjruohoPlease set
1954811a796Sjruoho.Dv PKGDB_DIR
1964811a796Sjruohoin
1974811a796Sjruoho.Xr pkg_install.conf 5
1984811a796Sjruohoinstead.
1994811a796Sjruoho.Pp
2004811a796SjruohoIf defined, points to the location of the packages database.
2014811a796SjruohoDefaults to
202*d5fdd803Swiz.Pa /usr/pkg/pkgdb .
2034811a796Sjruoho.El
2044811a796Sjruoho.Sh FILES
2054811a796Sjruoho.Bl -tag -width /etc/defaults/daily.conf -compact
2064811a796Sjruoho.It Pa /etc/daily
2074811a796Sjruohodaily maintenance script
2084811a796Sjruoho.It Pa /etc/daily.conf
2094811a796Sjruohodaily maintenance configuration
2104811a796Sjruoho.It Pa /etc/defaults/daily.conf
2114811a796Sjruohodefault settings, overridden by
2124811a796Sjruoho.Pa /etc/daily.conf
2134811a796Sjruoho.It Pa /etc/daily.local
2144811a796Sjruoholocal site additions to
2154811a796Sjruoho.Pa /etc/daily
2164811a796Sjruoho.El
2174811a796Sjruoho.Sh SEE ALSO
21863728753Sjruoho.Xr monthly 5 ,
2194811a796Sjruoho.Xr security.conf 5 ,
22063728753Sjruoho.Xr weekly 5
2214811a796Sjruoho.Sh HISTORY
2224811a796SjruohoThe
22363728753Sjruoho.Pa /etc/daily.conf
2244811a796Sjruohofile appeared in
2254811a796Sjruoho.Nx 1.3 .
226