• Alessandro Rubini's avatar
    stat: always print one line when turning stats on · 684fa5cd
    Alessandro Rubini authored
    With the new "only print if sth happens" way, sometimes stats is
    just silent forever. This happens if we are master or if no slave
    is active (well, and during initial setting up the wr link).
    So now typing "stat" or "stat on" will turn on stats and print a line
    of statistics, every time -- or the line "statistics now off".
    This happens by changing the internal status of monitor_ppsi.c,
    now exported to the cmd_stat.c.
    This is the result on a master system:
       wrc# stat
       lnk:1 rx:0 tx:3 lock:1 sv:0 ss:'' aux:1 sec:5 [...]
       wrc# stat
       statistics now off
       wrc# stat
       lnk:1 rx:0 tx:11 lock:1 sv:0 ss:'' aux:1 sec:8 [...]
    And this is what happens when we become slave:
       wrc# mode slave
       Locking PLL
       wrc# ptp start
       Slave Only, clock class set to 255
       wrc# lnk:1 rx:57 tx:60 lock:1 sv:1 ss:'SYNC_SEC' aux:1 sec:49 [...]
       lnk:1 rx:70 tx:64 lock:1 sv:1 ss:'SYNC_NSEC' aux:1 sec:1444901411 [...]
       lnk:1 rx:77 tx:66 lock:1 sv:1 ss:'SYNC_PHASE' aux:1 sec:1444901414 [...]
       lnk:1 rx:83 tx:68 lock:1 sv:1 ss:'WAIT_OFFSET_STABLE' aux:1 sec:1444901416 [...]
       lnk:1 rx:87 tx:69 lock:1 sv:1 ss:'WAIT_OFFSET_STABLE' aux:1 sec:1444901417 [...]
       lnk:1 rx:90 tx:70 lock:1 sv:1 ss:'TRACK_PHASE' aux:1 sec:1444901418 [...]
       lnk:1 rx:94 tx:71 lock:1 sv:1 ss:'TRACK_PHASE' aux:1 sec:1444901419 [...]
    Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
Last commit
Last update
monitor_ppsi.c Loading commit data...