Page MenuHomeDevCentral

Configure periodic tasks on FreeBSD
ClosedPublic

Authored by dereckson on Feb 10 2020, 14:08.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 11, 10:17
Unknown Object (File)
Wed, Dec 11, 10:17
Unknown Object (File)
Wed, Dec 11, 09:35
Unknown Object (File)
Wed, Dec 11, 09:13
Unknown Object (File)
Fri, Dec 6, 20:10
Unknown Object (File)
Wed, Dec 4, 20:41
Unknown Object (File)
Mon, Dec 2, 16:15
Unknown Object (File)
Mon, Dec 2, 15:50
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.