LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-17-2011, 06:51 AM   #1
coevolution
LQ Newbie
 
Registered: Oct 2011
Posts: 2

Rep: Reputation: Disabled
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
 
Old 10-17-2011, 07:07 AM   #2
allend
Senior Member
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 4,574

Rep: Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491Reputation: 1491
The 'ntpq' program should do what you want.
 
Old 10-17-2011, 10:15 AM   #3
linuxwin2
Member
 
Registered: Oct 2011
Posts: 44

Rep: Reputation: Disabled
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Knowing status of ntp server from command line coevolution Linux - Newbie 1 10-17-2011 07:25 AM
Server status command output getting dumped to smtp server instead of a file VC0041098 Linux - Server 2 05-26-2010 11:00 AM
ntp updates on command line only, ideas sir-lancealot Linux - Server 9 08-08-2007 12:22 PM
Command line audio streamer, with status? nutthick Linux - Software 0 08-09-2006 02:26 AM
Has the Redhat ntp time server off-line pwalden Red Hat 3 04-08-2004 11:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration