Setting up BSDstats on OpenBSD

OpenBSD does not have the periodic system, but instead has the /etc/daily, /etc/weekly and /etc/monthly scripts, all of which are executed at the corresponding intervals from root's crontab[1].

The daily, weekly and monthly scripts will run the contents of corresponding .local files, so to run the bsdstats script once a month you either

The bsdstats script depends on the setting of some environment variables which on FreeBSD are kept in /etc/periodic.conf. On OpenBSD, the place for locally defined system variables is /etc/rc.conf.local, where you put the lines

    monthly_statistics_enable="YES" # needed for bsdstats to work at all
    monthly_statistics_report_devices="YES" # optionally report devices too

As indicated by the comments, only the first of those is mandatory for the script to work; the second lets you submit hardware information too if you want to.

With a valid /etc/monthly.local script which runs the statistics script and the /etc/rc.conf.local lines in place, you can either sit back and wait for the monthly script to execute at some point in the future or run the script manually.

Notes

[1]

sudo crontab -u root -l will show the times and other data about how the scripts are run; use sudo crontab -u root -e if you want to edit.