LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 08-27-2008, 06:28 AM   #1
czezz
Member
 
Registered: Nov 2004
Distribution: Slackware/Solaris
Posts: 924

Rep: Reputation: 43
ntpdate - ntpd


In my network there is NTP Server which works for other machines.
Im trying to set up ntp client on my Solaris 10 machine.


I have already found link HOW-TO: http://learning-solaris.com/unix-sol...an-ntp-client/

but it seems not working for me.



My /etc/inet/ntp.conf looks like this:
Code:
#multicastclient 224.0.1.1
ntpdate -b 192.168.1.18
When I start:
Code:
# svcadm -v enable svc:/network/ntp
network/ntp enabled.
Then checking is NTPd is running it gives me back only this:
Code:
 
bash-3.00# pgrep -lf ntp
26341 /usr/lib/inet/xntpd
system data is not changing.
But if I stop svc:/network/ntp to disable state and execute:
Code:
ntpdate -m 192.168.1.18
then system time will be changed.

The problem is that I want to have NTPd which should look after system time and sync. it to server time.

(Ofcoutse I can do workarount placing "ntpdate -m 1192.168.1.18" to a crontab... but it should be done by NTPd, shouldnt it ?)

Last edited by czezz; 08-28-2008 at 04:12 AM.
 
Old 08-27-2008, 08:14 AM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
1192.168.1.18 doesn't looks like a valid IP address to me, neither ntpdate is an expected directive to be used in /etc/inet/ntp.conf.
 
Old 08-28-2008, 03:51 AM   #3
czezz
Member
 
Registered: Nov 2004
Distribution: Slackware/Solaris
Posts: 924

Original Poster
Rep: Reputation: 43
1192.168.1.18 - is only typeing mistake. In real it is 192.168.1.18.
Alrdy corrected mistake in 1st post.

Since yestorday execution: ntpdate -m 192.168.1.18 todays time is diffrent by 4-5 sec than on Time Server.

NTP is running:
Code:
bash-3.00# svcs -l ntp
fmri         svc:/network/ntp:default
name         Network Time Protocol (NTP)
enabled      true
state        online
next_state   none
state_time   Wed Aug 27 14:45:56 2008
logfile      /var/svc/log/network-ntp:default.log
restarter    svc:/system/svc/restarter:default
contract_id  225
dependency   require_all/error file://localhost/usr/sbin/ntpq (online) file://localhost/usr/sbin/ntpdate (online)
dependency   require_any/error svc:/network/service (online)

Last edited by czezz; 08-28-2008 at 04:08 AM.
 
Old 08-28-2008, 04:21 AM   #4
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Okay, that doesn't fix your incorrect ntp.conf file though.
 
Old 08-28-2008, 06:21 AM   #5
czezz
Member
 
Registered: Nov 2004
Distribution: Slackware/Solaris
Posts: 924

Original Poster
Rep: Reputation: 43
OK, so what is wrong with my ntp.conf file ?

Code:
#multicastclient 224.0.1.1
ntpdate -b 192.168.1.18
 
Old 08-28-2008, 07:20 AM   #6
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
"ntp.conf" is a configuration file that should contain settings, not shell commands.

You should first create the /etc/ntp directory and use something like:
Code:
driftfile /etc/ntp/ntp.drift
server 192.168.1.18
For further details, have a look at "Configuration Commands" chapter in the xntpd online manual.
 
Old 09-02-2008, 02:05 PM   #7
popowich
Member
 
Registered: Nov 2004
Location: Rochester, New York
Distribution: RHEL7
Posts: 53

Rep: Reputation: 15
BTW, you'll need to restart the service after making the change:

svcadm restart network/ntp
 
  


Reply



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
ntpdate - ntpd czezz Solaris / OpenSolaris 1 08-27-2008 08:06 AM
Despite ntpd and hourly `hwclock --adjust`, I had to `ntpdate` to fix 5 minute drift? GrapefruiTgirl Linux - Software 3 06-14-2008 11:44 AM
NTPDATE -vs- NTPd? carlosinfl Linux - Networking 3 02-25-2007 02:05 PM
ntpdate gets reply from server, ntpd doesn't (confused!) Lindahl Linux - Software 5 06-20-2006 06:26 PM
NTPDATE will *NOT* work jon_k Linux - Software 8 01-02-2005 05:41 AM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 11:19 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
Open Source Consulting | Domain Registration