• The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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