# What is this strange error ???

## bLanark

Oh, ntpd seems to be the bane of my life.

When I start, stop or restart ntpd, I get this strange message: 

```

castor root # /etc/init.d/ntpd restart

Usage: server -n rsa_nickname -p port [-3RFrf] [-w password]

                                        [-c ciphers] [-d dbdir]

-3 means disable SSL v3

-r means request certificate on first handshake.

-f means require certificate on first handshake.

-R means request certificate on all handshakes.

-F means require certificate on all handshakes.

-c ciphers   Letter(s) chosen from the following list

A         SSL2 RC4 128 WITH MD5

B         SSL2 RC4 128 EXPORT40 WITH MD5

C         SSL2 RC2 128 CBC WITH MD5

D         SSL2 RC2 128 CBC EXPORT40 WITH MD5

E         SSL2 DES 64 CBC WITH MD5

F         SSL2 DES 192 EDE3 CBC WITH MD5

a         SSL3 FORTEZZA DMS WITH FORTEZZA CBC SHA

b         SSL3 FORTEZZA DMS WITH RC4 128 SHA

c         SSL3 RSA WITH RC4 128 MD5

d         SSL3 RSA WITH 3DES EDE CBC SHA

e         SSL3 RSA WITH DES CBC SHA

f         SSL3 RSA EXPORT WITH RC4 40 MD5

g         SSL3 RSA EXPORT WITH RC2 CBC 40 MD5

h         SSL3 FORTEZZA DMS WITH NULL SHA

i         SSL3 RSA WITH NULL MD5

j         SSL3 RSA FIPS WITH 3DES EDE CBC SHA

k         SSL3 RSA FIPS WITH DES CBC SHA

l         SSL3 RSA EXPORT WITH DES CBC SHA      (new)

m         SSL3 RSA EXPORT WITH RC4 56 SHA       (new)

```

this happens three times, then the "expected output": 

```

 * Stopping ntpd...                                                              [ ok ]

 * Initializing clock via ntpdate...                                             [ ok ]

 * Starting ntpd...                                                              [ ok ]

```

A bit of investigation shows that "server" is /usr/bin/server, and does in fact produce the above output. 

Anyone any idea why? And what is calling it? I grepped for "server" in /etc/init.d/ntpd and got nothing. 

Cheers,

bLanark

----------

## dalek

I am getting the same thing here.

What the heck is this already???

One last thing.   

HELP

 :Confused:   :Shocked:   :Very Happy:   :Very Happy: 

----------

## kallamej

That was a nice bump dalek.  :Smile:  Not that I've seen the problem before, but the most likely cause is to be found in /etc/ntp.conf. Did you update ntp recently?

----------

## dalek

I installed it a while back.  I just recently got it to work, somewhat anyway.  I was getting a error message but I think the last change fixed that.  I noticed just a bit ago that my clock went back about 2 to 3 seconds.  I didn't know for sure it was working until then.  I get so bored, I just sit and watch the clock run.   :Laughing:   :Laughing: 

That may be it though.  Here is the ntp.conf file, just in case some guru sees this:

```
# NOTES:

#  - you should only have to update the server line below

#  - if you start getting lines like 'restrict' and 'fudge'

#    and you didnt add them, AND you run dhcpcd on your

#    network interfaces, be sure to add '-Y -N' to the

#    dhcpcd_ethX variables in /etc/conf.d/net

# Name of the servers ntpd should sync with

# Please respect the access policy as stated by the responsible person.

#server      ntp.example.tld      iburst

server      ntp.shorty.com      iburst

server      205.147.40.34      iburst

server      216.27.190.202      iburst

##

# A list of available servers is available here:

# http://www.eecis.udel.edu/~mills/ntp/clock2a.html

# http://www.eecis.udel.edu/~mills/ntp/servers.html

# Please follow the rules of engagement and use a

# Stratum 2 server (unless you qualify for Stratum 1)

##

# you should not need to modify the following paths

logfile      /var/log/ntpd.log

driftfile   /var/lib/ntp/ntp.drift

#server ntplocal.example.com prefer 

#server timeserver.example.org 

# Warning: Using default NTP settings will leave your NTP

# server accessible to all hosts on the Internet.

# If you want to deny all machines (including your own)

# from accessing the NTP server, uncomment:

#

#restrict default ignore

# To only deny other machines from changing the

# configuration but allow localhost uncomment:

#

#restrict default notrust nomodify

#restrict 127.0.0.1

# To allow machines within your network to synchronize

# their clocks with your server, but ensure they are

# not allowed to configure the server or used as peers

# to synchronize against, uncomment this line.

#

#restrict 192.168.1.0 mask 255.255.255.0 notrust nomodify notrap

```

OK, I'm waiting for some guru I guess.  At least ntp works.    :Shocked:   :Very Happy: 

Later

 :Very Happy:   :Very Happy:   :Very Happy: 

Think that 'help' was big enough?

----------

## kallamej

Possibly you should use some nice colours as well when you scream for help.  :Laughing: 

Nothing strange in that config as far as I can see. The only difference from mine is the servers and that you use iburst whilst I have minpoll and maxpoll in mine. /etc/conf.d/ntpd is sane as well?

----------

## bLanark

#I downgraded ntp to 4.1.2 because of this problem and another one. 

in /etc/portage/package.mask  

I have a line: 

>net-misc/ntp-4.1.2

which keeps nto at 4.1.2 or below. 

I keep OO-bin at 1.1.0 for the same reasons.

bL

----------

## dalek

Well I did a update, emerge -u world, the other night when I went to town.  I'm not real sure what it upgraded.  Since I forgot to check, that is likely it.

I guess we'll see a bug fix soon.    :Rolling Eyes: 

Later

 :Very Happy:   :Very Happy:   :Very Happy: 

----------

## paul138

What does your ntp.conf look like?

Note also that there is a /etc/conf.d/ntpd file that needs to be looked at also.

If you're only syncing the time on your machine you only need ntp-client (see /etc/conf.d/ntp-client).

For sanity's sake, here are my files (I run a simple server here and at the office with the same settings):

```
/etc/ntp.conf (you may not want these servers)

server time.nrc.ca prefer

server ntp.cpsc.ucalgary.ca

server ntp1.cmc.ec.gc.ca

driftfile /etc/ntp.drift

logfile /var/log/ntp.log

-----------------

/etc/conf.d/ntpd

NTPD_OPTS="-u ntp:ntp"

```

Make sure the ntp user and group exist. Also make sure that the drift file has proper permissions. One other thing; if your clock is too far off ntp will fail leaving you to update the clock manually.

----------

## dalek

Oh my file:/etc/conf.d/ntpd looks like this:

```
# Copyright 1999-2002 Gentoo Technologies, Inc.

# Distributed under the terms of the GNU General Public License v2         

# $Header: /home/cvsroot/gentoo-x86/net-misc/ntp/files/ntpd.confd,v 1.14 2004/02/15 00:35:56 vapier Exp $

# Options to pass to the ntpd process

# Most people should leave this line alone ...

# however, if you know what you're doing, feel free to tweak

NTPD_OPTS="-u ntp:ntp"

NTPDATE_CMD="ntpdate"

NTPDATE_OPTS="-b 208.21.108.186"
```

file:/etc/conf.d/ntp-client looks like this:

```
# Copyright 1999-2002 Gentoo Technologies, Inc.

# Distributed under the terms of the GNU General Public License v2         

# $Header: /home/cvsroot/gentoo-x86/net-misc/ntp/files/ntp-client.confd,v 1.2 2003/09/19 17:50:37 vapier Exp $

# Command to run to set the clock initially

# Most people should just leave this line alone ...

# however, if you know what you're doing, and you

# want to use ntpd to set the clock, change this to 'ntpd'

#NTPCLIENT_CMD="ntpdate"

ntpd

# Options to pass to the above command

# Most people should just uncomment this variable and

# change 'someserver' to a valid hostname which you

# can aquire from the URL's below

NTPCLIENT_OPTS="-b ntp-gatech.usno.navy.mi"

##

# A list of available servers is available here:

# http://www.eecis.udel.edu/~mills/ntp/clock2a.html

# http://www.eecis.udel.edu/~mills/ntp/servers.html

# Please follow the rules of engagement and use a

# Stratum 2 server (unless you qualify for Stratum 1)

##

server      205.147.40.34      iburst
```

Does that look right?  I followed a how to as best as I could anyway.  I'm on dial-up so I also had to google a bit.

Guru did come along.  

Later

 :Very Happy:   :Very Happy:   :Very Happy: 

----------

## paul138

OK, so let me get this straight, you're only syncig the clock on your machine and not acting as a ntp server for a group of machines right?

If that is the case, you only need ntp-client not ntpd. ntpd is the startup script for a server and ntp-client is, as it says, a client.

Try this from a command prompt (be sure ntpd is not running first):

```
ntpdate -q time.nrc.ca
```

(That's EST so use the server of your choice and -q is query only - don't set the clock.)

If that works, you're in business. Edit your /etc/conf.d/ntp-client file to look like this:

```
NTPCLIENT_CMD="ntpdate"

NTPCLIENT_OPTS="-b your.time.server"
```

Then remove ntpd from init and add ntp-client to default (not at boot as stated in the ebuild; it wont work)

```
rc-update del ntpd default

rc-update add ntp-client default
```

The other files (eg. ntp.conf) will not be used for this type of setup so you can ignore them now.

----------

## dalek

That was what I thought too.  Check this out.

/etc/conf.d/ntp-client

```
# Copyright 1999-2002 Gentoo Technologies, Inc.

# Distributed under the terms of the GNU General Public License v2         

# $Header: /home/cvsroot/gentoo-x86/net-misc/ntp/files/ntp-client.confd,v 1.2 2003/09/19 17:50:37 vapier Exp $

# Command to run to set the clock initially

# Most people should just leave this line alone ...

# however, if you know what you're doing, and you

# want to use ntpd to set the clock, change this to 'ntpd'

NTPCLIENT_CMD="ntpdate"

ntpd

# Options to pass to the above command

# Most people should just uncomment this variable and

# change 'someserver' to a valid hostname which you

# can aquire from the URL's below

NTPCLIENT_OPTS="-b ntp-gatech.usno.navy.mi"

##

# A list of available servers is available here:

# http://www.eecis.udel.edu/~mills/ntp/clock2a.html

# http://www.eecis.udel.edu/~mills/ntp/servers.html

# Please follow the rules of engagement and use a

# Stratum 2 server (unless you qualify for Stratum 1)

##

server      205.147.40.34      iburst
```

Then I done rc-update and got this:

```
root@smoker /home/dale # rc-update del ntpd default

 * ntpd not found in any of the specified runlevels.

root@smoker /home/dale # rc-update add ntp-client default

 * ntp-client added to runlevel default

 * Caching service dependencies...

Usage: server -n rsa_nickname -p port [-3RFrf] [-w password]

                                        [-c ciphers] [-d dbdir]

-3 means disable SSL v3

-r means request certificate on first handshake.

-f means require certificate on first handshake.

-R means request certificate on all handshakes.

-F means require certificate on all handshakes.

-c ciphers   Letter(s) chosen from the following list

A         SSL2 RC4 128 WITH MD5

B         SSL2 RC4 128 EXPORT40 WITH MD5

C         SSL2 RC2 128 CBC WITH MD5

D         SSL2 RC2 128 CBC EXPORT40 WITH MD5

E         SSL2 DES 64 CBC WITH MD5

F         SSL2 DES 192 EDE3 CBC WITH MD5

a         SSL3 FORTEZZA DMS WITH FORTEZZA CBC SHA

b         SSL3 FORTEZZA DMS WITH RC4 128 SHA

c         SSL3 RSA WITH RC4 128 MD5

d         SSL3 RSA WITH 3DES EDE CBC SHA

e         SSL3 RSA WITH DES CBC SHA

f         SSL3 RSA EXPORT WITH RC4 40 MD5

g         SSL3 RSA EXPORT WITH RC2 CBC 40 MD5

h         SSL3 FORTEZZA DMS WITH NULL SHA

i         SSL3 RSA WITH NULL MD5

j         SSL3 RSA FIPS WITH 3DES EDE CBC SHA

k         SSL3 RSA FIPS WITH DES CBC SHA

l         SSL3 RSA EXPORT WITH DES CBC SHA      (new)

m         SSL3 RSA EXPORT WITH RC4 56 SHA       (new)

 * rc-update complete.

root@smoker /home/dale #

```

There is all that stuf again.    :Shocked:   :Confused: 

Do I need to remove this little thing?

```
NTPCLIENT_CMD="ntpdate"

ntpd  <<<<<------------  ?????????  This thingy

# Options to pass to the above command
```

One thing about Gentoo.  Once you get it, you got it.  Mighty stable OS, even when overclocking.    :Twisted Evil: 

Thanks for the help.  It is just this one rig here.

 :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy: 

----------

## paul138

Hmm.

Have you updated your config files after the last update? Particularly the files in /etc/init.d

Try:

```
cd ~

find /etc -iname ._*
```

----------

## paul138

'DOH!

Here you go: https://bugs.gentoo.org/show_bug.cgi?id=39498

----------

## dalek

Well, while you were typing I was copy n pasteing over here.  This is it:

```
root@smoker /home/dale # cd ~

root@smoker ~ # find /etc -iname ._*

root@smoker ~ #

```

cd ~ same as cd /root right?

I do etc-updates whenever it installs something, just to make sure.  I do NOT let it mess with fstab, or the group file though.  It won't boot if it changes fstab and can't su to root if it messes with the group file.  Ask me how I know.    :Embarassed:   :Embarassed: 

Going to check out the roach report now.    :Shocked: 

Later and thanks.

 :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy: 

----------

## dalek

Hmmmmmmmm.  This ain't looking good.

```
root@smoker ~ # which server

/usr/bin/server

root@smoker ~ # mv /usr/bin/server /root/server.save

root@smoker ~ # cat > /usr/bin/server

```

Then it just sits there.  CPU idle, well idle as it gets anyway.  <scratches head>  Hit ctrl C.  Hope it works.  ......  Sucess. It came back anyway.  It didn't do like the roach report though.

Anyway.  I did the next step: 

```
root@smoker ~ # chmod +x /usr/bin/server

root@smoker ~ # env-update

 * Caching service dependencies...

root@smoker ~ #

```

That is better.  What did that do??    :Confused:   :Confused:   :Wink: 

I'll reboot in a minute and see what happens.  <crosses fingers, and toes>

Later

 :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy: 

----------

## paul138

chmod +x server made it x-ecutable (executable  :Razz:  ) 

Maybe that was the problem.

----------

## dalek

I guess it works.  I haven't rebooted yet.

How do you know that it is working?  Can I check something to see?

My clock drifts a lot, a whole lot.  It is a minute or two off every day.  I need this thing to work.  

Thanks for the help.  I'll update when I reboot.  Since I have been overclocking I do that pretty often.  Wish I could change those speeds without rebooting and going into BIOS.  

Thanks again.

Later

 :Very Happy:   :Very Happy:   :Very Happy: 

----------

## paul138

Maybe try to restart the nt-client service:

```
/etc/init.d/ntp-client restart
```

No errors? Must have fixed it  :Wink: 

Change the server program bit to non-executable:

```
chmod -x /usr/bin/server

/etc/init.d/ntp-client restart

```

Errors? That was the problem. Now change it back:

```
chmod +x /usr/bin/server

/etc/init.d/ntp-client restart

```

No error? That was it.

I'm assuming that the true test is to reboot.

(maybe overclocking screws up your clock?)

----------

## kallamej

Just curious, I don't have /usr/bin/server on my system and I'd like to know to which package it belongs. Dalek, can you do

```
qpkg -f /usr/bin/server
```

and post the output here, please? Requires gentoolkit.

----------

## paul138

 :Arrow:   net-www/mozilla *

----------

## kallamej

OK, thanks I don't have mozilla installed.

/me wonders what mozilla has to do with ntp{d,-client}.   :Shocked:   :Confused: 

----------

## paul138

 *kallamej wrote:*   

> /me wonders what mozilla has to do with ntp{d,-client}.   

 

Strange. I think there may have been something else. His error did not seem to be a ntp problem. It was more like depscan was halting on an error.

----------

## kallamej

Yeah, but mozilla shouldn't do anything with depscan, should it?

Anyway, from his last message it seems he has an empty /usr/bin/server file now. And it's not clear if he removed that stray ntpd line in /etc/conf.d/ntp-client.

----------

## dalek

Crap.  

```

root@smoker /home/dale # /etc/init.d/ntp-client restart

 * Setting clock via the ntp client 'ntpdate'...

Error : Name or service not known

 7 Jun 13:30:40 ntpdate[7512]: can't find host ntp-gatech.usno.navy.mi

 7 Jun 13:30:40 ntpdate[7512]: no servers can be used, exiting

 * Failed to set clock                                                                                       [ !! ]

root@smoker /home/dale # /etc/init.d/ntp-client restart

 * Setting clock via the ntp client 'ntpdate'...

Error : Name or service not known

 7 Jun 13:37:55 ntpdate[7686]: can't find host ntp-gatech.usno.navy.mi

 7 Jun 13:37:55 ntpdate[7686]: no servers can be used, exiting

 * Failed to set clock                                                                                       [ !! ]

root@smoker /home/dale #
```

Here is the other info you asked for.

```
root@smoker /home/dale # qpkg -f /usr/bin/server

net-www/mozilla *

root@smoker /home/dale # 

```

What does that have to do with the clock?    :Shocked:   :Confused: 

I'll find another server and try again.  Back in a bit.  <crosses fingers again>

Later

 :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy: 

----------

## kallamej

Do you really have the trailing 'l' missing: ntp-gatech.usno.navy.mi ?

----------

## paul138

 *kallamej wrote:*   

> Do you really have the trailing 'l' missing: ntp-gatech.usno.navy.mi ?

 

 :Laughing:   Yeah, the errors would be caused my ntpdate not being able to resolve that particular hostname. Double-check the config file.

(not laughing at you, laughing with you  :Wink:  )

----------

## dalek

Well, I put in another server, rebooted to make sure.  I got this now:

```
root@smoker /home/dale # /etc/init.d/ntp-client restart

 * Setting clock via the ntp client 'ntpdate'...

 7 Jun 13:50:43 ntpdate[6612]: the NTP socket is in use, exiting

 * Failed to set clock                                                                                       [ !! ]

root@smoker /home/dale #

```

This is the ntp processes running:

```
root@smoker /home/dale # ps aux | grep ntp

root      5318  0.0  0.3  3800 3800 ?        SL   13:46   0:00 ntpd

root      5373  0.0  0.3  3800 3800 ?        S    13:46   0:00 ntpd

root      5514  0.0  0.3  3800 3800 ?        SL   13:46   0:00 ntpd

root      5518  0.0  0.3  3800 3800 ?        S    13:46   0:00 ntpd

root      5809  0.0  0.3  3800 3800 ?        SL   13:46   0:00 ntpd

root      5813  0.0  0.3  3800 3800 ?        S    13:46   0:00 ntpd

root      6403  0.0  0.3  3804 3804 ?        SL   13:48   0:00 ntpd

root      6565  0.0  0.3  3804 3804 ?        SL   13:50   0:00 ntpd

root      6660  0.0  0.0  1540  496 pts/0    S    13:52   0:00 grep ntp

root@smoker /home/dale #

```

What up with ntpd still running?  I killed the ntpd thing and get the same error.

Me     :Confused: 

Any ideas?

 :Very Happy:   :Very Happy:   :Very Happy: 

Oh, not using tha other server anymore.  This one has numbers.  I get a new error now.    :Laughing:   :Laughing: 

----------

## kallamej

Hmm, is ntpd in another runlevel than default? Try 

```
rc-update del ntpd

/etc/init.d/ntpd stop
```

or more brutally

```
killall ntpd
```

----------

## dalek

Well this "guru" is confused.  Check out this bit:

```
root@smoker /home/dale # rc-update del ntpd

 * ntpd not found in any of the specified runlevels.

root@smoker /home/dale # /etc/init.d/ntpd stop

 * ERROR:  "ntpd" has not yet been started.

root@smoker /home/dale # ps aux | grep ntp

root      5318  0.0  0.3  3800 3800 ?        SL   14:03   0:00 ntpd

root      5366  0.0  0.3  3800 3800 ?        S    14:03   0:00 ntpd

root      5514  0.0  0.3  3800 3800 ?        SL   14:03   0:00 ntpd

root      5518  0.0  0.3  3800 3800 ?        S    14:03   0:00 ntpd

root      5809  0.0  0.3  3800 3800 ?        SL   14:03   0:00 ntpd

root      5813  0.0  0.3  3800 3800 ?        S    14:03   0:00 ntpd

root      7178  0.0  0.0  1540  496 pts/0    S    14:58   0:00 grep ntp

root@smoker /home/dale #
```

The killall works though.    :Rolling Eyes:    It just comes right back after I reboot.

Do I need to go get my hammer?    :Twisted Evil:   :Twisted Evil: 

I'm about ready to just cut the clock off and let it run wild.

But since you guys are trying to help, any more ideas?

 :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy: 

----------

## paul138

You don't have ntpd in somthing like /etc/conf.d/local.start or anything?

Show us the output of:

```
rc-update show | grep ntp
```

----------

## kallamej

 *dalek wrote:*   

> Do I need to remove this little thing?
> 
> ```
> NTPCLIENT_CMD="ntpdate"
> 
> ...

 

Did you ever remove that? It shouldn't be there. Do you get any messages relating to ntpd on boot? And did you restore /usr/bin/server?

----------

## dalek

OK, here you go:

```
root@smoker /home/dale # rc-update show | grep ntp

          ntp-client |      default

                ntpd |

root@smoker /home/dale #
```

See, no ntpd.  I did that earlier but since you asked.

local.start

```
# /etc/conf.d/local.start:

# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/conf.d/local.start,v 1.4 2002/11/18 19:39:22 azarah Exp $

# This is a good place to load any misc.

# programs on startup ( 1>&2 )

      

```

Nothing there.  Are you as confused as I am?    :Laughing:   :Laughing: 

Let me know what you think we should try next.  I can still go get that hammer.    :Rolling Eyes:    I got to have a sense of humor, almost spelled hummer.   :Embarassed: 

I did a find thingy with Konqueror.  No unusual finds for ntp files there.  I then did a search for things that contain ntp, nothing there either.  I wanted to see if there was a start command inside some other file somewhere.  No luck.

Keep those ideas coming.

 :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy: 

----------

## paul138

 *kallamej wrote:*   

> Did you ever remove that? It shouldn't be there. Do you get any messages relating to ntpd on boot? And did you restore /usr/bin/server?

 

I think it's safe to say that we can forget about the server bug for now as it is not related to this problem.

The config files are sourced before the daemon starts, so, when init sources /etc/conf.d/ntp-client and finds that ntpd there it executes it. Remove that from your config file and all should be well.

----------

## dalek

This is much better:

```
Password:

root@smoker /home/dale # ps aux | grep ntp

root      6359  0.0  0.0  1536  464 pts/0    S    15:20   0:00 grep ntp

root@smoker /home/dale # /etc/init.d/ntp-client restart

 * Setting clock via the ntp client 'ntpdate'...                                                             [ ok ]

root@smoker /home/dale #

```

It tries to set when I boot but I am on dial-up so it can't find the host/server thingy.

I don't know how that line got in there.  I put in the servers and that was it.

Question:  How does this thing work since I'm on dial-up?  Does it sense when I connect and set the clock or do I need to tell it to do it?

Now that it works, I would like to know how it works.

Rats.  I forgot to turn up the bus speed a bit more when I rebooted.

Thanks

 :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy: 

----------

## paul138

Glad to see it works now *phew*

How does it work? When it starts it syncs your clock with the server you specify using ntpdate. After that, it dies.

If you want something to run, say, every hour and sync your clock you may need to set up a cron job for that.

----------

## kallamej

 *paul138 wrote:*   

> The config files are sourced before the daemon starts, so, when init sources /etc/conf.d/ntp-client and finds that ntpd there it executes it. Remove that from your config file and all should be well.

 

Similarly for the server line, of course.  :Rolling Eyes:  How could I have missed that?  :Confused: 

And if we go the cron job route, it may just be an idea to run ntpd instead.  :Razz:  That way the clock will not only be set but actually disciplined to reduce the need for setting it.  :Smile: 

----------

## dalek

Is there a way to make it do this when I connect with Kppp?  Can I add /etc/init.d/ntp-client restart to the if-up file or something?

Thanks again, and again, and again.

 :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy: 

----------

## kallamej

Yes, I think that would be a possibility.

----------

## dalek

I put it like this.  

```
#!/bin/sh

# this is a script which is executed after connecting the ppp interface.

# look at man pppd for details

# the followings parameters are available:

# $1 = interface-name

# $2 = tty-device

# $3 = speed

# $4 = local-IP-address

# $5 = remote-IP-address

# $6 = ipparam

           

/etc/init.d/ntp-client restart

```

I watched gkrellm and I can't tell that it did anything.  If I do it manually I can see the data go across.

Hmmmmm.  May not work huh?

 :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy: 

----------

## paul138

Try this, it has a bit less overhead:

```
#!/bin/sh

/usr/bin/ntpdate -b your.server.here

# This is optional. Use it to be notified of sync failures.

# This requires that Gnome 2.x be installed.

if [ $? := 0 ]; then

    /usr/bin/zenity --error --text="Unable to sync time with server"

fi

```

If you're using gkrellm, you could set this to be the program that is run when you click on the clock.

So, copy it to a file and call it something like setclock.sh then chmod +x setclock.sh and copy it somewhere on your file system. Maybe /usr/local/bin/.

Of course, after all of this, I recall that the program can only be run as root. So, if you don't mind suid programs do a

```
chmod +s /usr/bin/ntpdate
```

----------

## dalek

OK, I went back to ntpd because it can slow the clock so it will not run away with me.  I have noticed this little boo boo though.

```
14 Jun 00:57:51 ntpd[13499]: frequency initialized -82.806 PPM from /var/lib/ntp/ntp.drift

14 Jun 00:57:51 ntpd[13499]: cap_set_proc() failed to drop root privileges: Operation not permitted
```

I got this from the ntpd log file.  What is that?  It says it is started but check this out:

```
root@smoker /home/dale # /etc/init.d/ntpd restart

 * Stopping ntpd...

start-stop-daemon: warning: failed to kill 13623: No such process

1 pids were not killed

No process in pidfile `/var/run/ntpd.pid' found running; none killed.

 * Failed to stop ntpd                                                                                       [ !! ]

 * Starting ntpd...                                                                                          [ ok ]

root@smoker /home/dale # ps aux | grep ntp

root     13720  0.0  0.0  1412  468 pts/0    S    01:00   0:00 grep ntp

root@smoker /home/dale #

```

If it started, why is it not running?  There is data in the drift file.  It is better but I would like to make it keep running.

Any ideas??

 :Shocked:   :Confused:   :Shocked:   :Confused: 

 :Very Happy:   :Very Happy: 

----------

## kallamej

See https://forums.gentoo.org/viewtopic.php?t=116871

----------

## dalek

Ok, recompiled kernel and fixed that boo boo.  I got a new one now.    :Shocked:   :Laughing:    You ready.  Here it is:

```
14 Jun 01:28:24 ntpd[6471]: frequency initialized -82.806 PPM from /var/lib/ntp/ntp.drift

14 Jun 01:28:32 ntpd[6471]: synchronized to 209.195.3.50, stratum=2

14 Jun 01:28:32 ntpd[6471]: time reset -0.579978 s

14 Jun 01:28:32 ntpd[6471]: kernel time sync disabled 0041

```

What does "kernel time sync disabled 0041" mean?  Is this normal?

I do have the process running now though.  See:

```
root@smoker /home/dale # ps aux | grep ntp

ntp       6471  0.0  0.3  3832 3832 ?        SL   01:28   0:00 /usr/bin/ntpd -p /var/run/ntpd.pid -u ntp:ntp

root      6580  0.0  0.0  1412  468 pts/0    S    01:33   0:00 grep ntp

root@smoker /home/dale #

```

Problems, problems.

Thanks for the link.  I didn't get that when I searched.    :Confused: 

Normal, don't worry about it or something needs fixin.

 :Very Happy:   :Very Happy:   :Very Happy: 

----------

## dalek

Hold that thought.  I just say it sync and this was added to log file:

```
14 Jun 01:35:36 ntpd[6652]: kernel time sync enabled 0001
```

Fixed itself I guess.    :Shocked: 

Wait and see what happens.

Thanks

 :Very Happy:   :Very Happy:   :Very Happy: 

----------

## dalek

Well I upgraded to 2.6.6 kernel while I was doing all this compiling.  I like to have never got Gkrelm to work.  No supermnt yet,   :Crying or Very sad:  .  Then I ran into Nvdia being masked, had to search for that fix.

Fix one thing and everything falls apart.  Now watch the next kernel come out.    :Rolling Eyes: 

With all that said, ntpd works now.    :Shocked:    Now to go fix all this other crap.

Thanks, hopefully it will work now.

 :Very Happy:   :Very Happy:   :Very Happy: 

misspelled some on purpose so search won't give false returns.

----------

## paul138

Good stuff, glad to hear it's working. Go tweak those other probelems  :Smile: 

TTFN

----------

## dalek

OK, this is getting on my nerve here.  I do some updates to programs and this stupid error comes back.

Is there any way to make it stop messing with the /usr/bin/server so I won't have to "fix" it all the time?

It does keep me clock set though.  It is "dead on".

 :Confused:   :Confused:   :Confused:   :Confused: 

----------

