I am using my Raspberry Pi with OpenMediaVault, a variant of Debian/Raspian intended for running a NAS server. The web interface for the operating system features a user interface that allows for hardware usage to be tracked using graphs generated by RRDTool that look like this:
Obviously, the graphs are based on system time. I've noticed that this causes some problems when the Pi is rebooted or booted from a powered off state. When I first check the graphs after a reboot or fresh start, the graphs list a "Last Updated" date of December 2015, and when I force a refresh of the data, the graphs all end up looking like this:
I understand that this is happening because of the lack of an RTC on the Raspberry Pi, and although one could be acquired, I would like to work around doing so.
To do this, I would like to configure my Pi to sync both its date and time to an NTP server before RRDTool services kick in. Is it possible to achieve something like this?
/etc/init.d
? – ott-- Jun 29 '16 at 21:57/etc/init.d
. – DaveTheMinion Jun 29 '16 at 22:06/etc/rc2.d
and/etc/rc3.d
, with names starting withSnn
wherenn
ranges from00
to99
and S00_xxx is executed first, S99_xxx last. So create a script in/etc/init.d
and link it to other directories so your script is executed before the RRDTools.. – ott-- Jun 29 '16 at 22:19/etc/rc#.d
- in that since Debian 8 ("Jessie") from which Raspbian is derived the default init sustem issystemd
NOT sysVinit
and, unless you are a curmudgeonly stick-in-the-mud (like myself) you will find yourself usingsystemd
which is a whole different ball-game (or so I understand) about ordering of and interdependence of "sub-systems" and "services" and I wouldn't want to swear that renumbering those scripts is going to work...! 8-) – SlySven Jul 02 '16 at 01:11systemd
to have a clock-setting service e.g.ntpdate
ornptd
up and running BEFORE RRDTool starts monitoring the data used to produce it's reports! – SlySven Jul 02 '16 at 12:22