Page 1 of 1

/system ntp client get status returns no state

Posted: Tue Dec 23, 2014 7:27 pm
by sejtam
I'm trying to set up the script from http://wiki.mikrotik.com/wiki/Send_email_about_reboot

However, it hangs, trying to get the NTP status:

It seems that 'get status' doesn't return anything, even though a print shows the status as synchronized?

[admin@koerberGW] /system ntp client> print
enabled: yes
mode: unicast
primary-ntp: 128.199.150.55
secondary-ntp: 203.211.149.87
dynamic-servers:
status: synchronized
[admin@koerberGW] /system ntp client> get status
[admin@koerberGW] /system ntp client>
This is on
Routerboard
Model 2011iL
Serial Number 55660414D4C9
Current Firmware 3.19
Upgrade Firmware 3.19

Oh, all packages have been updated to 6.23



Any idea what could cause this?

Re: /system ntp client get status returns no state

Posted: Tue Dec 23, 2014 8:43 pm
by skot
Using get doesn't return anything on it's own... you'll have to set it to a variable, or use :put, something like this:
:put [/system ntp client get status]
What I would do is enclose the whole script in curly braces { } (because you're using local variables) and paste into the terminal. See if there are any errors, and proceed from there.