LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Can the status of a NTP server be known from command line ? (https://www.linuxquestions.org/questions/linux-newbie-8/can-the-status-of-a-ntp-server-be-known-from-command-line-908565/)

coevolution 10-17-2011 06:51 AM

Can the status of a NTP server be known from command line ?
 
How to know the status of a ntp server ,given its ip address.?

Is there any way out to know whether the ntpd service is running and is up in the server ? ip address of server will be provided from the command line

allend 10-17-2011 07:07 AM

The 'ntpq' program should do what you want.

linuxwin2 10-17-2011 10:15 AM

DO
Code:

#ntpdate @IP
# echo $?

if the result =0 the ntp is OK


DIAGNOSTICS
ntpdate's exit status is zero if it found a server and could update the
clock, and nonzero otherwise.


All times are GMT -5. The time now is 03:25 PM.