Need global explanation of the daemon

Emmanuel Vargas Vargas at quanthouse.com
Thu Oct 29 06:09:56 EDT 2009


Hello here,
I'm a newbie in the ptpd world and I need more explanation on the global work of this daemon.

Here is my SOW:
I have a server sync on a GPS timeserver (meinberg) through NTPd.
I want sync all my servers (appox 400 servers) to this servers through the ptpd daemon. I don't want to have the most accurate right time on all my server but I want to have exactly the same time on all my server!

Here some information on my systems:

<pre><code>SlaveServerTest# uname -a
Linux SlaveServerTest 2.6.31.5-custom0.8 #1 SMP Wed Oct 28 09:30:36 UTC 2009 x86_64 GNU/Linux
</pre></code>
<pre><code>SlaveServerTest# dmesg | grep e1000
[    3.132582] e1000e: Intel(R) PRO/1000 Network Driver - 1.0.2-k2
[    3.132653] e1000e: Copyright (c) 1999-2008 Intel Corporation.
[    3.132826] e1000e 0000:0a:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[    3.132916] e1000e 0000:0a:00.0: setting latency timer to 64
[    3.133000] e1000e 0000:0a:00.0: irq 33 for MSI/MSI-X
[    3.319270] e1000e 0000:0a:00.1: PCI INT B -> GSI 17 (level, low) -> IRQ 17
[    3.319356] e1000e 0000:0a:00.1: setting latency timer to 64
[    3.319440] e1000e 0000:0a:00.1: irq 34 for MSI/MSI-X
[    3.503202] e1000e 0000:0c:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[    3.503285] e1000e 0000:0c:00.0: setting latency timer to 64
[    3.503354] e1000e 0000:0c:00.0: irq 35 for MSI/MSI-X
[    3.679213] e1000e 0000:0c:00.1: PCI INT B -> GSI 17 (level, low) -> IRQ 17
[    3.679296] e1000e 0000:0c:00.1: setting latency timer to 64
[    3.679365] e1000e 0000:0c:00.1: irq 36 for MSI/MSI-X
[   10.712261] e1000e 0000:0c:00.0: irq 35 for MSI/MSI-X
[   10.768041] e1000e 0000:0c:00.0: irq 35 for MSI/MSI-X
[   10.924493] e1000e 0000:0c:00.1: irq 36 for MSI/MSI-X
[   10.980296] e1000e 0000:0c:00.1: irq 36 for MSI/MSI-X
[   13.740869] e1000e: eth2 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None
[   13.856871] e1000e: eth3 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None</pre></code>
<pre><code>SlaveServerTest# modinfo e1000
filename:       /lib/modules/2.6.31.5-custom0.8/kernel/drivers/net/e1000/e1000.ko
author:         Intel Corporation, <linux.nics at intel.com>
description:    Intel(R) PRO/1000 Network Driver
license:        GPL
version:        7.3.21-k3-NAPI
vermagic:       2.6.31.5-custom0.8 SMP mod_unload modversions
depends:
alias:          pci:v00008086d00001000sv*sd*bc*sc*i*
alias:          pci:v00008086d00001001sv*sd*bc*sc*i*
alias:          pci:v00008086d00001004sv*sd*bc*sc*i*
alias:          pci:v00008086d00001008sv*sd*bc*sc*i*
alias:          pci:v00008086d00001009sv*sd*bc*sc*i*
alias:          pci:v00008086d0000100Csv*sd*bc*sc*i*
alias:          pci:v00008086d0000100Dsv*sd*bc*sc*i*
alias:          pci:v00008086d0000100Esv*sd*bc*sc*i*
alias:          pci:v00008086d0000100Fsv*sd*bc*sc*i*
alias:          pci:v00008086d00001010sv*sd*bc*sc*i*
alias:          pci:v00008086d00001011sv*sd*bc*sc*i*
alias:          pci:v00008086d00001012sv*sd*bc*sc*i*
alias:          pci:v00008086d00001013sv*sd*bc*sc*i*
alias:          pci:v00008086d00001014sv*sd*bc*sc*i*
alias:          pci:v00008086d00001015sv*sd*bc*sc*i*
alias:          pci:v00008086d00001016sv*sd*bc*sc*i*
alias:          pci:v00008086d00001017sv*sd*bc*sc*i*
alias:          pci:v00008086d00001018sv*sd*bc*sc*i*
alias:          pci:v00008086d00001019sv*sd*bc*sc*i*
alias:          pci:v00008086d0000101Asv*sd*bc*sc*i*
alias:          pci:v00008086d0000101Dsv*sd*bc*sc*i*
alias:          pci:v00008086d0000101Esv*sd*bc*sc*i*
alias:          pci:v00008086d00001026sv*sd*bc*sc*i*
alias:          pci:v00008086d00001027sv*sd*bc*sc*i*
alias:          pci:v00008086d00001028sv*sd*bc*sc*i*
alias:          pci:v00008086d00001075sv*sd*bc*sc*i*
alias:          pci:v00008086d00001076sv*sd*bc*sc*i*
alias:          pci:v00008086d00001077sv*sd*bc*sc*i*
alias:          pci:v00008086d00001078sv*sd*bc*sc*i*
alias:          pci:v00008086d00001079sv*sd*bc*sc*i*
alias:          pci:v00008086d0000107Asv*sd*bc*sc*i*
alias:          pci:v00008086d0000107Bsv*sd*bc*sc*i*
alias:          pci:v00008086d0000107Csv*sd*bc*sc*i*
alias:          pci:v00008086d0000108Asv*sd*bc*sc*i*
alias:          pci:v00008086d00001099sv*sd*bc*sc*i*
alias:          pci:v00008086d000010B5sv*sd*bc*sc*i*
srcversion:     5732E9FA6F4D2C80ADC7FDA
parm:           KumeranLockLoss:Enable Kumeran lock loss workaround (array of int)
parm:           SmartPowerDownEnable:Enable PHY smart power down (array of int)
parm:           InterruptThrottleRate:Interrupt Throttling Rate (array of int)
parm:           RxAbsIntDelay:Receive Absolute Interrupt Delay (array of int)
parm:           RxIntDelay:Receive Interrupt Delay (array of int)
parm:           TxAbsIntDelay:Transmit Absolute Interrupt Delay (array of int)
parm:           TxIntDelay:Transmit Interrupt Delay (array of int)
parm:           XsumRX:Disable or enable Receive Checksum offload (array of int)
parm:           FlowControl:Flow Control setting (array of int)
parm:           AutoNeg:Advertised auto-negotiation setting (array of int)
parm:           Duplex:Duplex setting (array of int)
parm:           Speed:Speed setting (array of int)
parm:           RxDescriptors:Number of receive descriptors (array of int)
parm:           TxDescriptors:Number of transmit descriptors (array of int)
parm:           debug:Debug level (0=none,...,16=all) (int)
parm:           copybreak:Maximum size of packet that is copied to a new buffer on receive (uint)
</pre></code>

First question:
Need a specific hardware?
Need a specific drivers for my Intel Pro 1000 network card?
Sorry for this newbie question but I haven't found any information on this :(

I have DL and compile last ptpd version from GIT with the debug flag

So I have launch ptpd on my 'primary' server (master server) with the following options:

<pre><code>./ptpd -c -D -t -p -s2 -i testmonitor -b eth1.171 -u TestServer</pre></code>

On my slave server (TestServer):

<pre><code>/ptpd -c -D  -i testmonitor -g -f stats/ptpdstat3.log</pre></code>

Here the log on my ptpdstat3.log:

<pre><code>SlaveServerTest:stats# more ptpdstat3.log
(ptpd debug) allocated 1296 bytes for protocol engine data
(ptpd debug) allocated 600 bytes for foreign master data
(ptpd debug) event POWERUP
(ptpd debug) state PTP_INITIALIZING
(ptpd info) state, one way delay, offset from master, drift, variance, clock adjustment (ppb), slave to master delay, master to slave delay
(ptpd info) init
(ptpd debug) manufacturerIdentity: Kendall;1.0.0
(ptpd debug) netInit
(ptpd debug) initData
(ptpd debug) initTimer
(ptpd debug) initClock
(ptpd info) requested adj 0 ppb => adjust system frequency by 0 scaled ppm (0 ppb) + 0 us/tick (0 ppb) = adj 0 ppb (freq limit -504123/504123 ppm, tick limit -1000/1000 us*USER_HZ)
(ptpd error) adjtimex -> time bad
(ptpd debug) sync message interval: 2
(ptpd debug) clock identifier: test
(ptpd debug) 256*log2(clock variance): -4000
(ptpd debug) clock stratum: 255
(ptpd debug) clock preferred?: no
(ptpd debug) bound interface name: bond0.1696
(ptpd debug) communication technology: 1
(ptpd debug) uuid: 00:15:17:97:9a:aa
(ptpd debug) PTP subdomain name: _DFLT
(ptpd debug) subdomain address: e0.0.1.81
(ptpd debug) event port address: 3f 1
(ptpd debug) general port address: 40 1
(ptpd debug) state PTP_LISTENING
(ptpd info) lstn
(ptpd debug) updateForeign: new record (0,1) 1 1 00:14:22:15:d9:94
(ptpd debug) state PTP_PTP_SLAVE
(ptpd debug) initClock
(ptpd info) requested adj 0 ppb => adjust system frequency by 0 scaled ppm (0 ppb) + 0 us/tick (0 ppb) = adj 0 ppb (freq limit -504123/504123 ppm, tick limit -1000/1000 us*USER_HZ)
(ptpd error) adjtimex -> time bad
(ptpd debug) Q = 0, R = 6
(ptpd info) slv, 0.000000000, 0.000000000, 0, 0, 0, 0.000000000, 0.000000000
(ptpd info) requested adj -11312 ppb => adjust system frequency by -735280 scaled ppm (-11312 ppb) + 0 us/tick (0 ppb) = adj -11312 ppb (freq limit -504123/504123 ppm, tick limit -1000/1000 us*USER_HZ)
(ptpd error) adjtimex -> time bad
(ptpd info) slv, 0.000000000, 0.000112000, 112, 0, -11312, 0.000000000, 0.000224000
(ptpd debug) offset from master:               0s      112000ns
(ptpd debug) observed drift:        112
(ptpd info) requested adj -32129 ppb => adjust system frequency by -2088385 scaled ppm (-32129 ppb) + 0 us/tick (0 ppb) = adj -32129 ppb (freq limit -504123/504123 ppm, tick limit -1000/1000 us*USER_HZ)
</pre></code>

I don't understand the
<pre><code>(ptpd error) adjtimex -> time bad in the log</pre></code>
and the
<pre><code>(ptpd debug) offset from master:               0s       -1500ns </pre></code>
(1500ns is a "time bad"? not sure to understand this...)

I'll send this message to the mailing list too I don't understand which project is still alive! :) )
Any help would be very appreciated!

Regards
Emmanuel



More information about the Ptpd mailing list