Menu

ptpd output statistic files

Help
Michal
2009-02-15
2012-11-23
  • Michal

    Michal - 2009-02-15

    Hi everyone,

    I'm a beginner to timesync (do my best to become an expert :) ) and I've just started playing with the daemon. I have some questions concerning ptpd output file. I'm trying to compare it somehow with the ntpd-generated statistics and need some help. I have 2 PC's connected with cross-cable and run daemon:

    #1 ./ptpd -c -d -t -p -y4 -s2 -u 192.168.0.2 -f stats.txt (master)
    #2 ./ptpd -u 192.168.0.1 -f stats.txt (slave)

    master output

    state: init   .....................................................                                                                  
    state: lstn  .....................................................                                                                  
    state: mst  .....................................................
    I guess it won't give me any info when the state is master (?)

    slave output
                                                                       
    state: init   ...................................................................................................                                                                  
    state: lstn  ...................................................................................................                                                                  
    state: slv, owd: 0.0000000000, ofm: 0.0000000000, drift: 0, var: 0 .............
    state: slv, owd: 0.0000000000, ofm: 0.0002000000, drift: 200 var: 0 ..........
    and so on

    My question is what 'owd', 'ofm' and 'var' means (I'm ok with drift ;) )  and how often the 'state...' lines are generated? is it 16sec (-y4)?
    Actually, feel free to provide me with as much help as possible as I'm not best at C development  (yet ;) )

    cheers
    Michal

     
    • dave cochi

      dave cochi - 2009-02-16

      Hello Michal,

      owd = one way delay
      ofm = offset from master
      var = variance
      -y4 -> a sync message is sent every 2^4 sec = 16sec

      Don't forget to read the provided documentation (HTML page and ptpd_2005_1588_conference_paper.pdf file).

      Regards,

      Dave.

       
  • mag ga

    mag ga - 2010-08-16

    Dave,

    thanks for the reply.

    For the ofm , is that in seconds? 

     
  • George Neville-Neil

    ofm and owd are in seconds.nanoseconds in the latest code.

     
  • mag ga

    mag ga - 2010-08-25

    Thanks for the reply gnn.

    With the latest checkout version, I occasionally see our ofm as:

    0.-0002000000

    Should the minus sign be, before the 0? like -0.000200000

    I think this maybe a bug

     
  • Martin Burnicki

    Martin Burnicki - 2010-08-25

    This is a bug which I have recently fixed in the ptpv2d branch.

    Unfortunately it looks like the complete code base has initially simply been copied to create the v2 branch, and after this both code bases have been changed in different ways.

    I'll try to discuss with the other developers how to proceed. IMO the best solution would be to change the code base so that utility functions like printing time stamps, or even the servo loop used to discipline the system time, would be available only in a single source file.

     
  • George Neville-Neil

    Just a quick note to say that we have talked via email about this and we are in agreement on creating a single source base going forwards.  The initial goal was to have a working v1 and a working v2 before making the single source base.  That goal is now nearly achieved.  Once both daemons are stable we will create a new daemon, likely to be called v3, which supports both v1 and v2.

     
  • George Neville-Neil

    Yup, it's a bug.  Can you enter a bug in the tracker for it?

    Thanks,
    George

     
  • mag ga

    mag ga - 2010-08-26

    Offset in ptp v2 - ID: 2997590

    Bug filed and patched!

    Good work!

     
  • Martin Burnicki

    Martin Burnicki - 2010-08-26

    Just a quick note: I've just committed a patch which fixes printing negative time offsets in ptpd v1, similar to the earlier fix in v2.

     
  • mag ga

    mag ga - 2010-08-26

    Thanks again.

    So, I am assuming this is in trunk…

     

Log in to post a comment.