[ntp:questions] ntpd not running

Aggie c.kevin.lam at gmail.com
Tue Oct 9 22:41:14 UTC 2007


Dear all,

I have been trying to port ntp to vxworks. I finally got it compiled
and semi-running on vxworks last week. But here's come another
problem. I couldn't start the ntpd service on vxworks. It just got
stuck at the infinite loop. Here's what I saw at the
1 Jan 00:00:35 ntpd[49458416]: ntpd 4.2.4p4 at 1.1520 Tue Oct  9 20:50:22
GMT 2007 (1)
1 Jan 00:00:39 ntpd[49458416]: precision = 20000.000 usec
1 Jan 00:00:39 ntpd[49458416]: ntp_io: estimated max descriptors: 30,
initial socket boundary: 20
1 Jan 00:00:39 ntpd[49458416]: ntp_io: selecting new socket boundary:
10
1 Jan 00:00:39 ntpd[49458416]: ntp_io: selecting new socket boundary:
0
1 Jan 00:00:39 ntpd[49458416]: Listening on interface #0 wildcard,
0.0.0.0#123 Disabled
1 Jan 00:00:39 ntpd[49458416]: Listening on interface #1
wildcard, ::#123 Disabled
1 Jan 00:00:39 ntpd[49458416]: Listening on interface #2 lo0,
127.0.0.1#123 Enabled
1 Jan 00:00:39 ntpd[49458416]: Listening on interface #3 lo0, ::1#123
Enabled
1 Jan 00:00:39 ntpd[49458416]: Listening on interface #4 xemac0,
192.168.0.3#123 Enabled
1 Jan 00:00:39 ntpd[49458416]: Listening on routing socket on fd #11
for interface updates

============
I found out the nfound is always = 0 in ntpd.c,

#  if defined(VMS) || defined(SYS_VXWORKS)
/* make select() wake up after one second */
{
  struct timeval t1;
  t1.tv_sec = 1; t1.tv_usec = 0;
  nfound = select(maxactivefd+1, &rdfdes, (fd_set *)0,
  (fd_set *)0, &t1);
}
#  else
  nfound = select(maxactivefd+1, &rdfdes, (fd_set *)0,
  (fd_set *)0, (struct timeval *)0);
#  endif /* VMS */
if (nfound > 0)
{
  l_fp ts;
  get_systime(&ts);
  (void)input_handler(&ts);
}

since nfound is always equal for 0 for me, so i will never call
input_handler() to do the work. Does anyone know why nfound is 0??
what went wrong? Thanks...




More information about the questions mailing list