Page MenuHomeDevCentral

Configure periodic tasks on FreeBSD
ClosedPublic

Authored by dereckson on Feb 10 2020, 14:08.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 22, 23:44
Unknown Object (File)
Mon, Apr 22, 23:17
Unknown Object (File)
Sun, Apr 21, 21:13
Unknown Object (File)
Fri, Apr 19, 05:59
Unknown Object (File)
Fri, Apr 19, 05:39
Unknown Object (File)
Wed, Apr 17, 23:56
Unknown Object (File)
Mon, Apr 15, 00:24
Unknown Object (File)
Mon, Apr 15, 00:00
Subscribers
None

Details

Summary

FreeBSD offers a periodic system to run tasks,
most enabled by default, some to configure.

This change enables the following behavior:

  • update daily ports tree
  • resync NTP clock
  • run ZFS scrub every 5 weeks

Reference: man 5 periodic.conf

Ref T1541 for zfs part.

Test Plan

Configuration extracted from Ysul, to test on WindRiver

Diff Detail

Repository
rOPS Nasqueron Operations
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dereckson created this revision.
This revision is now accepted and ready to land.Feb 10 2020, 14:08

Looks good to me.

WindRiver
$ salt-call --local state.sls roles/core/rc
local:
----------
          ID: /etc/periodic.conf
    Function: file.managed
      Result: True
     Comment: File /etc/periodic.conf updated
     Started: 14:11:49.568994
    Duration: 25.514 ms
     Changes:
              ----------
              diff:
                  New file
              mode:
                  0644

Summary for local
------------
Succeeded: 1 (changed=1)
Failed:    0
------------
Total states run:     1
Total run time:  25.514 ms

$ cat /etc/periodic.conf
# 300.calendar
daily_portsnap_enable="YES"

# 480.status-ntpd
daily_status_ntpd_enable="YES"

# 800.scrub-zfs
daily_scrub_zfs_enable="YES"
This revision was automatically updated to reflect the committed changes.