What commands are available in the Timebeat CLI

Base Tree Commands:

set
show

(if in doubt, use the tab key to view options)

Β 

Full Command Tree:

β”œβ”€β”€ set
β”‚Β Β  β”œβ”€β”€ ocptap
β”‚   β”‚   β”œβ”€β”€ irig_b_mode
β”‚   β”‚   β”œβ”€β”€ sma
β”‚   β”‚   β”œβ”€β”€ ts_window_adjust
β”‚   β”‚   β”œβ”€β”€ utc_tai_offset
β”‚   β”œβ”€β”€ opentimecard
β”‚   β”‚   β”œβ”€β”€ sbc
β”‚   β”‚   β”‚   β”œβ”€β”€ clockgen
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ dpll
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ fod
β”‚   β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ freq
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ pullin
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ output
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ div
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ dutycyclehigh
β”‚   β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ freq
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ reset
β”‚   β”‚   β”‚   β”œβ”€β”€ firmware
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ flash
β”‚Β Β  β”œβ”€β”€ phc
β”‚   β”‚   β”œβ”€β”€ device
β”‚   β”‚   β”‚   β”œβ”€β”€ exts
β”‚   β”‚   β”‚   β”œβ”€β”€ frequency
β”‚   β”‚   β”‚   β”œβ”€β”€ pps
β”‚Β Β  β”œβ”€β”€ ptp
β”‚   β”‚   β”œβ”€β”€ packet
β”‚   β”‚   β”‚   β”œβ”€β”€ stats
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ enable
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ disable
β”‚   β”‚   β”œβ”€β”€ peer
β”‚   β”‚   β”‚   β”œβ”€β”€ announce
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ update
β”‚   β”‚   β”‚   β”œβ”€β”€ simulator
β”‚Β Β  β”œβ”€β”€ taas
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ client
β”‚Β Β  β”‚Β Β  β”‚   β”œβ”€β”€ add
β”‚Β Β  β”‚Β Β  β”‚   β”œβ”€β”€ delete
β”œβ”€β”€ show 
β”‚Β Β  β”œβ”€β”€ clocks
β”‚   β”‚   β”œβ”€β”€ offset
β”‚Β Β  β”œβ”€β”€ configuration
β”‚   β”‚   β”œβ”€β”€ timesources
β”‚Β Β  β”œβ”€β”€ help
β”‚Β Β  β”œβ”€β”€ ocptap
β”‚   β”‚   β”œβ”€β”€ timecards
β”‚   β”œβ”€β”€ opentimecard
β”‚   β”‚   β”œβ”€β”€ sbc
β”‚   β”‚   β”‚   β”œβ”€β”€ clockgen
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ dpll
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ status
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ input
β”‚   β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ status
β”‚   β”‚   β”‚   β”œβ”€β”€ gnss
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ sats
β”‚Β Β  β”œβ”€β”€ phc
β”‚   β”‚   β”œβ”€β”€ device
β”‚   β”‚   β”œβ”€β”€ devices
β”‚Β Β  β”œβ”€β”€ ptp
β”‚   β”‚   β”œβ”€β”€ packet
β”‚   β”‚   β”‚   β”œβ”€β”€ stats
β”‚   β”‚   β”œβ”€β”€ peer
β”‚   β”‚   β”œβ”€β”€ peers
β”‚   β”‚   β”œβ”€β”€ sockets
β”‚Β Β  β”œβ”€β”€ servo
β”‚   β”‚   β”œβ”€β”€ sources
β”‚Β Β  β”œβ”€β”€ squared
β”‚   β”‚   β”œβ”€β”€ capacity
β”‚   β”‚   β”œβ”€β”€ clients
β”‚   β”‚   β”œβ”€β”€ network
β”‚   β”‚   β”œβ”€β”€ reservations
β”‚   β”‚   β”œβ”€β”€ seats
β”‚   β”‚   β”œβ”€β”€ servers
β”‚Β Β  β”œβ”€β”€ startup-config
β”‚Β Β  β”œβ”€β”€ taas
β”‚   β”‚   β”œβ”€β”€ clients
β”‚Β Β  β”œβ”€β”€ version

Β 

A more detailed breakdown of some of the commands:

Β 

show startup-config

See the current running configuration with no distractions from comments or parameter suggestions.

Β 

show version

Β Show the current version of Timebeat, along with the operating system and CPU architecture.

show clocks offset

Shows the offset of the individual clocks being synchronised by the incoming source. This can be a PHC and or the System clock

show help

Β Shows exit message

Β 

show phc devices

Β Shows the system's PTP hardware clocks.

Β 

show phc device pin

Usage: show phc device pin <interface> <pin>

Β Lists more detailed information about the pins associated with a particular PTP hardware clock.Β  For example, when run on the timecard mini, which has eth0 as its interface, we could use the command: #show phc device pin eth0 0

Pin: 0
Name: SYNC_OUT
Function: PTP_PF_EXTTS
Channel: 0

Β In this instance, pin 0 corresponds to pin 9 in block J2 of the official CM4 IO board.Β  PTP_PF_EXTTS (External Time Triggering Signal) shows that we intend to receive signal from the GNSS receiver.

Β 

set phc device pps

Usage: set phc device pps <interface> <pin> <index> enable|disable

Β In the event that this command is run successfully, there will be no error message or feedback (as of version 1.5.2).Β  For instance

#set phc device pps eth0 0 0 enable

Β #

You can then confirm the change by running

#show phc device pin eth0 0

Pin: 0
Name: SYNC_OUT
Function: PTP_PF_PEROUT
Channel: 0

PTP_PF_PEROUT (Periodic Output) shows that we will now emit a signal on the respective pin.

Β 

#set phc device pps eth0 0 0 disable

Pin: 0
Name: SYNC_OUT
Function: PTP_PF_NONE
Channel: 0

PTP_PF_NONE confirms the command.

Β 

set phc device extts

Usage: set phc device extts <interface> <pin> <index> enable|disable

Β 

PTP_PF_EXTTS (External Time Triggering Signal) is where we want to receive signal from the GNSS receiver.Β  This was our original pin state before we used the commands detailed above.Β  To restore the setting use:

#set phc device extts eth0 0 0 enable

Β 

set phc device frequency

Usage: set phc device frequency <interface> <frequency>|disable

Β 

Set the PTP hardware clock (in parts per billion/ppb) to a specified new frequency.

#set phc device frequency eth0

Β 

Outside of the CLI you can use the linuxptp packages, specifically ptp_ctl to check the current frequency by running ptp_ctl.


root@raspberrypi:/home/admin# phc_ctl eth0 freq
phc_ctl[4728.014]: clock frequency offset is -1346.984863ppb

Β 

show squared servers

If PTP+Squared is configured then this command will list the nodes forming the mesh network.Β  This does not refer to whether we send or receive time from the hosts, only their presence in the network.

Β 

AddressΒ  Β  Β  StatusΒ  Β  Β  Β  Β  Β  Β  Β  Β Peer ID

192.168.1.2 NotConnectedΒ  Β 93Leh4DOiEj24C3nLE9fnHDnecFed2Dien4DE2OqpUn3Ddi3r
192.168.1.4 ConnectedΒ  Β  Β  Β  Β 93Leh4DO...
192.168.1.7 NotConnectedΒ  Β 93Leh4DO...

Β 

show squared clients

It shows the nodes we are currently receiving time from.

Β 

AddressΒ  Β |Β  Β Remote Root DistanceΒ  |Β  ReputationΒ  | ScoreΒ  | Active | Capabilities

192.168.1.2Β  Β  Β  Β  Β  Β  Β  Β 8786Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  0.004509Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β Β  Β  Β  Β  Β utcsource:indirect
192.168.1.4Β  Β  Β  Β  Β  Β  Β  Β 7519Β  Β  Β  Β  Β  Β  Β  Β  Β  -1.000000Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β 
Β  Β  Β  Β  Β utcsource:indirect
192.168.1.7Β  Β  Β  Β  Β  Β  Β  Β 8482Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  0.000000Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β *Β  Β  Β  Β  Β utcsource:indirect

Β 

Address:Β  The IP address of the node in question

Remote Root Distance: The cumulative distance between the node in question and the nearest root node.

Reputation Score: Reputation scores are the concept of child nodes reporting to the parent node how the distribution of offsets observed by the child node from a specific parent node compares with offset distributions from other parent nodes (time sources)

Active:Β  Are we considering the time we received from this node when we steer our clock?

Capabilities: The capabilities of the node, one of the following options

Β 

utcsource:direct - the node has a direct source of UTC

utcsource:indirectΒ - the node has received UTC from another node

hqosc:1500- the node has a high quality oscillator.Β  The 1500 refers to 1.5ΞΌs of drift in a 24 hour period.

Β 

show squared seats

Timebeat# show squared seats


My ID is: 16Uiu2HAkwRHRzR8bqUZH612fm8QXBFbpE3W8xpQuNzXe9g9qhTtG
My RootDistance is: 0

Time sent from other peers to this peer:
Current server peer(s): 0
Unfilled client seats: 0
Max seats: 0

Time sent from this peer to other peers:
Current client peer(s): 3
Unfilled server seats: 1
Max seats: 4

Β 

show squared capacity

Which PTP+Squared nodes have the capacity to give time to other nodes?

Β 

Address:Β  The IP address of the node

Root Distance:Β  The cumulative distance between the node and the nearest root node.

Seats Available:Β  How many more nodes can the shown node give time to?

Peer ID: Unique identifier for the node

Capabilities: Where does the node's source of time originate? See "show squared clients" above.

Β 

show squared network

Timebeat# show squared network


AddressΒ  Β  Β  Β  Β  Β  StatusΒ  Β  Β  Β  Β  Β  Β  Β Peer ID

192.168.0.2Β  Β  ConnectedΒ  Β  Β  Β  Β  Β  xyza
192.168.0.3Β  Β  NotConnectedΒ  Β  Β  xyzb
192.168.0.4 Β  Β NotConnectedΒ  Β  Β  xyzc
192.168.0.5Β  Β NotConnectedΒ  Β  Β  Β xyzd
192.168.0.6Β  Β NotConnectedΒ  Β  Β  Β xyze
192.168.0.7Β  Β NotConnectedΒ  Β  Β  Β xyzf
192.168.0.8Β  Β ConnectedΒ  Β  Β  Β  Β  Β  Β xyzg
192.168.0.9Β  Β NotConnectedΒ  Β  Β  Β xyzh
192.168.0.10 ConnectedΒ  Β  Β  Β  Β  Β  Β xyzi

Β 

show squared reservations

Reservation allocations are groups of "seats" tied to a specific minimum preference score.Β  We can see for our local installation of Timebeat which allocations there are, what the preference score is and how much of this capacity is being used.

Β 

show ptp sockets

Β 

PTP uses UDP port 319 for time critical event messages and 320 for general messages. Here you can see which interfaces and ports Timebeat is listening.

Β 

TypeΒ  Β  Β  Β  Β SocketΒ  Β  Β  Β  Β InterfaceΒ  Β Port
L4 (udp)Β  Β GlobalΒ  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β 319
L4 (udp)Β  Β GlobalΒ  Β  Β  Β  Β  Β  Β  Β 
Β  Β  Β  Β  Β 320
L4 (udp)Β  Β IfSpecificΒ  Β  Β  Β  Β eth0Β  Β  Β  319
L4 (udp)Β  Β IfSpecificΒ  Β  Β  Β  Β eth0Β  Β  Β  320Β Β 

Β 

show ptp peers

# show ptp peers

Remote IPΒ  Β  Β DomainΒ  Β  Β  Β  ErrorOfSourceΒ  Β  Sync IntΒ  Β  Β  DelayReq IntΒ  Β  Β  Local Port IDΒ  Β  Β  Remote Port ID

Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  10Β  Β  Β  Β  Β  Β  Β  Β  Β 1000000000Β  Β  Β  Β  Β 127Β  Β  Β  Β  Β  Β 127Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β {ABC}:2Β  Β  Β  Β  Β  Β  Β  Β  Β {000}:0
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  115Β  Β  Β  Β  Β  Β  Β  Β 1000000000Β  Β  Β  Β  Β 127Β  Β  Β  Β  Β  Β 127Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β {ABC}:1024Β  Β  Β  Β  Β  Β {000}:0
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  115Β  Β  Β  Β  Β  Β  Β  Β 1000000000Β  Β  Β  Β  Β 127Β  Β  Β  Β  Β  Β 127Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β {ABC}:1023Β  Β  Β  Β  Β  Β {000}:0
Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  115Β  Β  Β  Β  Β  Β  Β  Β 1000000000Β  Β  Β  Β  Β 127Β  Β  Β  Β  Β  Β 127Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β  Β {ABC}:1022Β  Β  Β  Β  Β  Β {000}:0

Β 

In the instance of a PTP client receiving PTP by multicast then no Remote IP is expected.

Β 

show ptp peer subscription

usage: show ptp peer subscription <localport id> <ptp domain>

Β 

Β 

show ptp peer eos

usage: show ptp peer eos <localport id> <ptp domain>

EOS (Error Of Source): the variance of the offset distribution of the source.Β  Timebeat maintains a list of EOS values which facilitates path selection according to latency.Β  This command allows the user to see under the hood, so to speak.

Β 

show servo sources

Shows the name, the device path and the current offset of the devices steering the clock.

Β 

URI Last Offset Interface
pps:eth0/0/0:eth0 1.020867ms eth0
timecard-mini:/dev/serial0: -109.886455ms

Β 

show configuration timesources

Lists the primary and secondary sources of time as configured in timebeat.yml

Β 

Time source index: 1
protocol: ptp
use_layer2: false
domain: 10
serve_unicast: false
serve_multicast: true
server_only: true
announce_interval: 1
sync_interval: 0
delayrequest_interval: 0
profile: <none>
unicast_master_table: <empty>
priority1: 0
priority2: 0
delay_strategy:
hybrid_e2e: false
monitor_only: false

Β 

Time source index: 2
protocol: pps

Β 

Time source index: 3
protocol: timecard-mini