• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

CLI: how to set ntp server and activate it ?

EveMauta

Basic Pleskian
Hi,

Can't find nothing in documentation nor googleling...

I'm able to change the name of the server like this:
./server_pref --update -hostname host.example.com
But can't find the way to add and activate NTP server by CLI.
Does this option is available, and if yes how ?

Best regards
Vince
 
It can be done is scope of OS functionality. It is not related to Plesk.
 
Hi,
Sure but in plesk interface we have the possibility to set it.
If I set up directly by the OS, plesk will be aware about the setting ?
Best regards
Vince
plesk_ntp.png
 
Hi,
Finally I found this:

/usr/local/psa/admin/sbin/timemng
/usr/local/psa/admin/sbin/timemng --get-system-time
/usr/local/psa/admin/sbin/timemng --get-timezones-list
/usr/local/psa/admin/sbin/timemng --set-timezone --timezone="Europe/Paris"

/usr/local/psa/admin/sbin/timemng --set-sync-time --time-server="fr.pool.ntp.org"

/usr/local/psa/admin/sbin/crontabmng get root
47 23 * * * /usr/sbin/ntpdate -b -s fr.pool.ntp.org

The only problem is what for NTP server plesk interface is not updated ! :( (TimeZone is correctly updated)

Have you more information about this ?

Best regards
Vince
 
Hi,
Using this command:
/usr/local/psa/admin/sbin/timemng --set-sync-time --time-server="fr.pool.ntp.org"
Plesk do the job but plesk interface is not upgraded.
Have you some informations how to do in cli to update too plesk interface ?
Best regards
Vince
 
if you're running debian or ubuntu you can install it (as root) with

apt-get install ntp

and then edit the conf file at /etc/ntp.conf if you want to change the NTP servers you connect to.
after editing that file (you don't need to) do (as root)

service ntp restart
 
Hi Lupined,
"Have you some informations how to do in cli to update too plesk interface ?"
I mean how to do this WITH the change displayed in plesk. ;)
Best regards
Vince
 
NTP doesn't have anything to do with plesk. why are you trying to integrate them? once your NTP server is running you can query it via the CLI using (as root)
ntpdc -c iostats
which on one of my NTP servers (i run 4 of them) gives a result like

time since reset: 7828153
receive buffers: 10
free receive buffers: 9
used receive buffers: 0
low water refills: 1
dropped packets: 448
ignored packets: 0
received packets: 30161236
packets sent: 29778910
packets not sent: 1
interrupts handled: 30153827
received by int: 30153827
 
the plesk interface just lets you specify the time server you want to query i think. it doesn't let you control your own. that's easy enough to do in /etc/ntp.conf
sorry i can't be of more help.
 
Back
Top