home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / protocol / time / ntp / 837 < prev    next >
Encoding:
Text File  |  1992-08-25  |  2.1 KB  |  66 lines

  1. Path: sparky!uunet!dtix!darwin.sura.net!jhunix.hcf.jhu.edu!andy
  2. From: andy@jhunix.hcf.jhu.edu (Andy Poling)
  3. Newsgroups: comp.protocols.time.ntp
  4. Subject: Re: Problems running xntp v3 on SGI Indigo
  5. Keywords: tick, tickadj, SGI
  6. Message-ID: <1992Aug25.185749.29102@jhunix.hcf.jhu.edu>
  7. Date: 25 Aug 92 18:57:49 GMT
  8. References: <2A9A652F.8451@orion.oac.uci.edu>
  9. Followup-To: comp.protocols.time.ntp
  10. Organization: HAC - Johns Hopkins University, Baltimore
  11. Lines: 53
  12.  
  13. In article <2A9A652F.8451@orion.oac.uci.edu> iglesias@draco.acs.uci.edu (Mike Iglesias) writes:
  14. >I'm trying to run the latest release of xntp v3 on an SGI Indigo running
  15. >v4.0.1 of the OS.  xntpd is having trouble keeping the clock in sync,
  16. >generating lots of STEP adjustments in the syslog file.  Since the
  17. >SGI build uses -DNOKMEM, it's using the built-in values for tick and
  18. >tickadj.  I'm assuming these are wrong for the SGI Indigo and that
  19. >is what is causing the problem.  Does anyone have a good idea for
  20. >tick and tickadj values for Indigos?
  21.  
  22. From ntp_unixclock.c in my xntpdv2 (xntpv3 is still on my todo list) port
  23. which ticks nicely on a 4D/300:
  24.  
  25. void
  26. clock_parms(tickadj, tick)
  27.     u_long *tickadj;
  28.     u_long *tick;
  29. {
  30. #ifdef sgi
  31.         /*
  32.      * no use screwing around in memory when you've got system calls that
  33.      * can tell you all you need to know - ASP
  34.      */
  35. #include <unistd.h>
  36.     /*
  37.      * all IRIX clocks will run at 100 HZ if fastclock is disabled.
  38.      * Therefore 100 is a good default value if the sysconf call fails -
  39.      * ASP
  40.      */
  41.        if ((*tick = sysconf(_SC_CLK_TCK)) <= 0)
  42.         *tick = (unsigned long)100L;
  43.         /*
  44.      * It's difficult to figure out which IRIX kernel value corresponds to
  45.      * BSD's tickadj, so we fake it... - ASP
  46.      */
  47.     *tickadj = (unsigned long)1L;
  48. #ifdef DEBUG
  49.     if (debug)
  50.         printf("tick = %d, tickadj = %d\n", *tick, *tickadj);
  51. #endif
  52. return;
  53. #endif
  54. .
  55. .
  56. .
  57.  
  58. -Andy
  59.  
  60. Andy Poling                              Internet: andy@jhunix.hcf.jhu.edu
  61. UNIX Systems Programmer                  Bitnet: ANDY@JHUNIX
  62. Homewood Academic Computing              Voice: (410)516-8096    
  63. Johns Hopkins University                 UUCP: uunet!mimsy!aplcen!jhunix!andy
  64.  
  65.     
  66.