RIAPS Timesync
1.1.23
|
Time synchronization service, instrumentation and tests for the RIAPS platform.
The release (.deb) packages contain a configuration tool, called timesyncctl for an easy, semi-automated way for configuring a node for distributed time synchronization. The tool configures and checks the status of the ChronoCape board (if needed) in the device tree and controls all services (GPSd, chrony, phc2sys, ptp4l
, etc) needed in a specific role.
Notes:
/usr/local/bin
(starting in v1.1.17, previous version were in /opt/riaps/*<arch>*/bin
, where *<arch>*
is either armhf
or amd64
).config
and restart
) needs root privileges, thus you need to run the tool as root or with the sudo
commandThe following time synchronization roles are supported:
Running timesyncctl:
timesyncctl config
: will list the available roles.timesyncctl config <role>
: will change the node's configuration for the given role and will restart the services. Needs root privileges.timesyncctl restart
: will restart the services in the current role. Needs root privileges.timesyncctl status
: check the status of the services and device tree in the current role.Examples:
To configure the node for a master role:
sudo timesyncctl config master
To check if everything is as expected in the current role:
timesyncctl status
Note: This package is currently optimized for the BBB Remote nodes (which use all available modes). The RIAPS VM (amd64 package) is intended to stay in
standalone
mode since we are using a virtual machine and hardware timestamping is not available. The Raspberry Pi 3/4 and Jetson Nano do not support hardware timestamping, so only thestandalone
mode is also used for arm64 packages here.
An easy way to test that time is synchronized across nodes is to do the following on each node (including the VM):
This will provide time from riaps_timesync (riaps_ts) continuously until you use Ctrl C
to stop it. You can see that each of the nodes are sync’ed by comparing the output from this test. Here is an example of the test output:
To do these commands using riaps_fab, use the following putting in the above command:
riaps_fab sys.run:’”<command>”’
>Note: to stop the program you need to do Ctrl C
on the node or use riaps_fab sys.sudo:’”pkill -f test_timesync.py”’