You need to enable JavaScript to fully utilise this page.

RADclock Installation

The RADclock requires a patched kernel that provides support for feed-forward synchronisation algorithms. Kernel patches are shipped with the source tarball and patched kernel packages can be found on the download page.

Patching and compiling the Linux kernel

Let's assumed you downloaded the radclock source tarball into the /tmp directory. Let's also assume you downloaded a pristine Linux 2.6.27 kernel from Kernel.org and untared it into /usr/src/linux. Then run the following commands to patch your kernel.

cd /tmp
tar -xzf radclock-0.3.3.tar.gz
cd /usr/src/linux
patch -p1 < /tmp/radclock-0.3.3/kernel-patches/linux/2.6.27/*

Then build the kernel using your favorite method. Make sure the kernel config option CONFIG_RADCLOCK is set to 'y' preferably. The RADclock patches can partially be built as module, but this method is not supported.

Install the kernel and reboot before proceeding to the compilation of the daemon.

Installing the RADclock daemon

On Linux, make sure the development versions of libpcap and libnl are installed on your system.

On FreeBSD, the required libpcap library should be installed by default.

If you installed a patched kernel (from source or using the packaged image), make sure you rebooted your system before proceeding.

tar -xzf radclock-0.3.3.tar.gz
cd radclock-0.3.3 
./configure

Make sure the output of the configure script indicates that the kernel support has been detected.

configure: ----------------------------------------
configure: RADClock version 0.3.3 
configure: Found target arch: x86_64
configure: Compiling for linux
configure: Detected kernel RADClock extensions: yes
configure: Detected kernel access channel: yes
configure: get_counter syscall number: 295
configure: get_counter_latency syscall number: 296
configure: ----------------------------------------

Then make and install the daemon

make
sudo make install

Startup script - Linux

Having the RADclock start at boot time is distribution specific and is not covered in here. Following is an example of a /etc/init.d/radclock script used to control the RADclock daemon.

#!/bin/sh
### BEGIN INIT INFO
# Provides:          radclock
# Required-Start:    mountvirtfs ifupdown $local_fs
# Default-Start:     S
# Default-Stop:      0 6
### END INIT INFO

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=`which radclock`
NAME=radclock
DESC="the $NAME daemon"
DAEMON_OPTS="-d"

test -x $DAEMON || exit 0

# Include radclock defaults if available
if [ -f /etc/default/radclock ] ; then
	. /etc/default/radclock
fi

set -e

case "$1" in
  start)
	echo -n "Starting $DESC: "
	start-stop-daemon --start --quiet --pidfile /var/run/radclock/$NAME.pid \
		--exec $DAEMON -- $DAEMON_OPTS
	echo "done."
	;;
  stop)
	echo -n "Stopping $DESC: "
	start-stop-daemon --stop --quiet --retry TERM/2/TERM/forever/TERM \
		--pidfile /var/run/radclock/$NAME.pid --exec $DAEMON
	echo "done."
	;;
  reload)
	echo "Reloading $DESC configuration files."
	start-stop-daemon --stop --signal 1 --quiet --pidfile \
		/var/run/radclock/$NAME.pid --exec $DAEMON
  ;;
  restart)
    echo -n "Restarting $DESC: "
	start-stop-daemon --stop --quiet --retry TERM/2/TERM/forever/TERM \
		--pidfile /var/run/radclock/$NAME.pid --exec $DAEMON
	sleep 2
	start-stop-daemon --start --quiet --pidfile \
		/var/run/radclock/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS
	echo "done."
	;;
  status) 
	echo -n "$DESC status:  "
	if [ ! -r "/var/run/radclock/$NAME.pid" ]; then
		echo "is not running."
		exit 3 
	fi
	if read pid < "/var/run/radclock/$NAME.pid" && ps -p "$pid" > /dev/null 2>&1; then
		echo "is running with pid $pid."
		exit 0
	else
		echo "is not running but /var/run/radclock/$NAME.pid exists."
		exit 1
	fi
	;;
  *)
	N=/etc/init.d/$NAME
	echo "Usage: $N {start|stop|restart|reload|status}" >&2
	exit 1
	;;
esac

exit 0

Rotating Log File

Add the following configuration to /etc/logrotate.conf to rotate the RADclock log files.

/var/log/radclock.log {
    missingok
    size 100k 
    compress
    create 0644 root root
    rotate 7
    postrotate
        kill -USR1 `cat /var/run/radclock/radclock.pid`
    endscript
}