SNTP Client GET returns nothing?

Environment: RB2011UiAS-2HnD running 6.42.5 (stable)

I’m using the basic SNTP client from the system package. I’m getting good time, but I can’t use other SNTP client information for scripting.

I can’t seem to get the CLI to return anything to a GET request. As I understand it, I should be able to at least GET the fields from the print command. The commands after the print listing below were tab completed, so it looks like it should work, but - nothing…

What am I doing wrong?

/system ntp client> print
enabled: yes
primary-ntp: 0.0.0.0
secondary-ntp: 0.0.0.0
server-dns-names: 2.us.pool.ntp.org,3.us.pool.ntp.org,
0.us.pool.ntp.org,1.us.pool.ntp.org
mode: unicast
poll-interval: 15m
active-server: 96.245.170.99
last-update-from: 96.245.170.99
last-update-before: 12s750ms
last-adjustment: 3ms683us
last-bad-packet-from: 192.168.47.77
last-bad-packet-before: 8s980ms
last-bad-packet-reason: server-ip-mismatch
[admin@router] /system ntp client> get enabled
[admin@router] /system ntp client> get primary-ntp
[admin@router] /system ntp client> get mode
[admin@router] /system ntp client> get last-update-before
[admin@router] /system ntp client> get poll-interval
[admin@router] /system ntp client>

:put [get enabled]
:put [get primary-ntp]
etc.

That’s got it.

What I don’t understand is why it doesn’t work as a GET from the command line.

Why does
[admin@router] /system ntp client>> :put [get last-update-before ]
00:06:05.690

work and

[admin@router] /system ntp client>> get last-update-before
[admin@router] /system ntp client>>

gets nothing back. The field names even tab-complete for the GET, but the response is blank. Likewise with FIND. I see in the scripting manual page that this is how it works in scripts. The Console (command) pages don’t even hint at this.

Any suggestions as to where to read more about this?

It’s doing exactly what it should. get provides a value, and you have to do something with that value, either store it to a variable or visualize it using put. Likewise, with find, the value is a list of references to items matching the find condition and you have to do something with it; on top of storing and visualization as above, you may use the list in some modification command (set, unset, remove, …)

Sindy,

Thanks, that helps. It’s not some I get from the docs. May be there, but I didn’t see it.

Again, thanks.

Rich