Precision Time Protocol daemon
From Federal Burro of Information
dl and compile
cd /root/ptp wget "http://downloads.sourceforge.net/project/ptpd/ptpd/2.2.0/ptpd-2.2.0.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fptpd%2Ffiles%2F&ts=1352085166&use_mirror=tenet" mv ptpd-2.2.0.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fptpd%2Ffiles%2F&ts=1352085166&use_mirror=tenet ptpd-2.2.0.tar.gz tar zxvf ptpd-2.2.0.tar.gz cd ptpd-2.2.0 cd src make
Slave setup susan
./ptpd2 -g -b eth3 -C
startup:
2012-11-04 22:51:13.608059, lstn_init 1 (ptpd info) 22:51:25.607385 (lstn_init) refreshed IGMP multicast memberships (ptpd info) 22:51:25.607804 (lstn_init) now in state PTP_LISTENING 2012-11-04 22:51:25.608073, lstn_init 1 (ptpd info) 22:51:37.607403 (lstn_init) refreshed IGMP multicast memberships (ptpd info) 22:51:37.607815 (lstn_init) now in state PTP_LISTENING 2012-11-04 22:51:37.608080, lstn_init 1 (ptpd info) 22:51:49.607391 (lstn_init) refreshed IGMP multicast memberships (ptpd info) 22:51:49.607810 (lstn_init) now in state PTP_LISTENING 2012-11-04 22:51:49.608070, lstn_init 1 (ptpd info) 22:52:01.607394 (lstn_init) refreshed IGMP multicast memberships (ptpd info) 22:52:01.607803 (lstn_init) now in state PTP_LISTENING 2012-11-04 22:52:01.608070, lstn_init 1 (ptpd info) 22:52:05.379091 (lstn_init) now in state PTP_SLAVE 2012-11-04 22:52:05.379149, slv 001cc0fffe5d6c1a(unknown)/01, 0.000000000, 0.000000000, 0.000000000, 0.000000000, 0, I (ptpd notice) 22:52:06.378997 (slv) Received first Sync from Master (ptpd notice) 22:52:06.379040 (slv) going to arm DelayReq timer for the first time, with initial rate: 0
Master setup , Athena
./ptpd2 -G -b eth0 -C
start up:
10:41:26 athena@athena ~/ptp/ptpd-2.2.0/src # ./ptpd2 -x -G -b eth0 -C (ptpd info) 22:41:32.590792 (___) Info: Going to check lock /var/run/kernel_clock (ptpd info) 22:41:32.608530 (___) Info: No ptpd daemons detected in parallel (as expected) (ptpd info) 22:41:32.625876 (___) Info: 1 ntpd daemons detected in parallel (as expected) (ptpd info) 22:41:32.625946 (___) Info: Going to check lock /var/run/kernel_clock (ptpd info) 22:41:32.626125 (___) Info: Startup finished sucessfully # Timestamp, State, Clock ID, One Way Delay, Offset From Master, Slave to Master, Master to Slave, Drift, Last packet Received 2012-11-04 22:41:32.626205, init (ptpd info) 22:41:32.690552 (init) refreshed IGMP multicast memberships (ptpd info) 22:41:32.691279 (init) now in state PTP_LISTENING 2012-11-04 22:41:32.691834, lstn_init 1 (ptpd info) 22:41:44.627144 (lstn_init) now in state PTP_MASTER 2012-11-04 22:41:44.627198, mst 001cc0fffe5d6c1a(unknown)/00
Command line
Manual Mode
master:
/usr/local/bin/ptpd2 -G -b eth2 -C -D -V 1 -S
slave:
/usr/local/bin/ptpd2 -g -b eth2 -C -D -V 1 -S
Service mode
master:
/usr/local/bin/ptpd2 -G -b eth2 -C -D -V 1 -S
slave:
/usr/local/bin/ptpd2 -g -b eth2 -L -f /var/log/ptpd2/stats.log -D -V 10 -S