⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 160

📁 Unix/Linux 网络时间协议版本3 Network Time Protocol Version 3 (NTP) distribution for Unix systems
💻
📖 第 1 页 / 共 5 页
字号:
Replied: Mon, 07 Jul 1997 20:24:24 -0400Replied: "Damon at work <dhd@exnet.com> "Replied: Mon, 07 Jul 1997 18:32:41 -0400Replied: "Damon at work <dhd@exnet.com> mills@udel.edu"Return-Path: dhd@exnet.com Return-Path: <dhd@exnet.com>Received: from mailgate.exnet.com ([204.137.193.226])	by whimsy.udel.edu (8.8.5/8.8.5) with SMTP id JAA08336	for <stenn@whimsy.udel.edu>; Mon, 7 Jul 1997 09:44:50 GMTReceived: from exnet.com (assam.exnet.com) by mailgate.exnet.com with SMTP id AA03149	(5.67a/IDA-1.4.4 for stenn@whimsy.udel.edu); Mon, 7 Jul 1997 10:44:12 +0100Received: from maildrop.exnet.com (oolong.exnet.com) by exnet.com with SMTP id AA10527	(5.67a/IDA-1.4.4); Mon, 7 Jul 1997 10:43:46 +0100From: Damon at work <dhd@exnet.com>Received: by maildrop.exnet.com (SMI-8.6/client-1.4DHD)	id KAA16049; Mon, 7 Jul 1997 10:43:43 +0100Date: Mon, 7 Jul 1997 10:43:43 +0100Message-Id: <199707070943.KAA16049@maildrop.exnet.com>To: mills@udel.edu, stenn@whimsy.udel.eduSubject: Updates to ARCRON clock driver.Cc: dhd@exnet.comContent-Type: X-sun-attachment----------X-Sun-Data-Type: textX-Sun-Data-Description: textX-Sun-Data-Name: textX-Sun-Charset: us-asciiX-Sun-Content-Lines: 57Hi folks,Some updates to the driver: 1) About half the memory footprint (most of my debugging code    disabled by default). 2) Some general tweaks and improvements, including an attempt    to increase sampling frequency at the point of a potential    leap-second action (though this did not seem to work on 30th June,    so it is disabled for now). 3) The code avoids the clock tty becoming the controlling tty.Diffs from the 5.90.2 code are supplied.Harlan, I believe I have preserved your changes for older compilers.BTW, we don't seemed to have turned up in the copyright document yet.And I was staking my reputation on it...Regards,DamonBTW, are you aware that (at least under 3.50[.0]): a) The current PARSE install/build stuff is way out of sync with    your new build structure (it still talks about the 3.3/4.3 style    build flags). b) Same with the kernel/ stuff. c) They ask you to build stuff into the kernel, and won't build the    PARSE stuff unless you have copied stuff into the sys area, but    that is unnecessary (and therefore a BadThing(TM) IMHO) under    Solaris-2. d) The PARSE module for Solaris-2 seems to blow the kernel (2.5/2.5.1)    up immediately (and at least one other poster on c.p.t.n had the    same experience). e) I think ppsclock paniced my kernel too, but I was getting confused    at that stage and gave up, since I did not want to modify my sys    area unnecessarily, and got fed up with hacking the config stuff.I only report some of these to you rather than Frank, since some of thepertinent docs have Dave's name on rather than Frank's.I have had much more success in the past with PARSE and indeed havewritten STREAMS modules under SunOS, so I'm sure I can fix all thiswhen I get a spare month...  B^>Would you like me to mail Frank directly with this, or would one of youfolks like to pass this on to him?Damon----------X-Sun-Data-Type: defaultX-Sun-Data-Description: defaultX-Sun-Data-Name: driver27_DIFFX-Sun-Charset: us-asciiX-Sun-Content-Lines: 2124,25c24,25< <p>This documentation describes version V1.1 (1997/06/23) of the source< and has been tested (amongst others) against xntpd3-5.90 on Solaris-1 (SunOS 4.1.3_U1 on---> <p>This documentation describes version V1.0 (1997/05/21) of the source> and has been tested against xntpd3-5.90 on Solaris-1 (SunOS 4.1.3_U1 on33,35d32< <p>This code has been significantly slimmed down since the V1.0 version,< roughly halving the memory footprint of its code and data.< 323,332d319< <dt><code>ARCRON_LEAPSECOND_KEEN</code></dt>< <dd>When is defined, we try to do a resync to MSF as soon as possible< in the first hour of the morning of the first day of the first and< seventh months, ie just after a leap-second insertion or deletion would< happen if it is going to.  This should help compensate for the fact< that this clock does not continuously sample MSF, which compounds the< fact that MSF itself gives no warning of an impending leap-second< event.  This code did not seem functional at the leap-second insertion< of 30th June 1997 so is by default disabled.< ----------X-Sun-Data-Type: defaultX-Sun-Data-Description: defaultX-Sun-Data-Name: refclock_arc_DIFFX-Sun-Charset: us-asciiX-Sun-Content-Lines: 35810d9<     static const char arc_version[] = { "V1.1 1997/06/23" };12c11< #undef ARCRON_DEBUG /* Define only while in development... */--->     static const char arc_version[] = { "V1.0 1997/05/21" };19,20c18< #ifndef ARCRON_OWN_FILTER< #undef ARCRON_OWN_FILTER /* Use own median filter only for versions before 3-5.90.1. */---> #define ARCRON_OWN_FILTER 1 /* Use own median filter to get round 3-5.90 bug. */22d19< #endif28,33d24< #ifndef ARCRON_NOT_LEAPSECOND_KEEN< #ifndef ARCRON_LEAPSECOND_KEEN< #undef ARCRON_LEAPSECOND_KEEN /* Respond quickly to leap seconds: doesn't work yet. */< #endif< #endif< 78,81d68< MAJOR CHANGES SINCE V1.0< ========================<  1) Removal of pollcnt variable that made the clock go permanently<     off-line once two time polls failed to gain responses.83,92d69<  2) Avoiding (at least on Solaris-2) terminal becoming the controlling<     terminal of the process when we do a low-level open().< <  3) Additional logic (conditional on ARCRON_LEAPSECOND_KEEN being<     defined) to try to resync quickly after a potential leap-second<     insertion or deletion.< <  4) Code significantly slimmer at run-time than V1.0.< < 217a195,197>   * Avoid /dev/arcX becoming our controlling terminal.  Do we really>     want a ^C or somesuch on the tty line aborting xntpd (would it)?> 227c207<     correction would be disabled by default).--->     correction would be disabled by defaulr).442,447d421< /* Flags for a raw open() of the clock serial device. */< #ifdef O_NOCTTY /* Good, we can avoid tty becoming controlling tty. */< #define OPEN_FLAGS (O_RDWR | O_NOCTTY)< #else           /* Oh well, it may not matter... */< #define OPEN_FLAGS (O_RDWR)< #endif449d422< 470a444>     int pollcnt;        /* Poll message counter. */487,489d460< #ifdef ARCRON_LEAPSECOND_KEEN<     /* The flag `possible_leap' is set non-zero when any MSF unit<        thinks a leap-second may have happened.491,511d461<        Set whenever we receive a valid time sample in the first hour of<        the first day of the first/seventh months.< <        Outside the special hour this value is unconditionally set<        to zero by the receive routine.< <        On finding itself in this timeslot, as long as the value is<        non-negative, the receive routine sets it to a positive value to<        indicate a resync to MSF should be performed.< <        In the poll routine, if this value is positive and we are not<        already resyncing (eg from a sync that started just before<        midnight), start resyncing and set this value negative to<        indicate that a leap-triggered resync has been started.  Having<        set this negative prevents the receive routine setting it<        positive and thus prevents multiple resyncs during the witching<        hour.<      */<     static int possible_leap = 0;       /* No resync required by default. */< #endif< 553d502< #ifdef ARCRON_DEBUG555d503< #endif576c524< #ifdef ARCRON_DEBUG---> 578d525< #endif586,592c533,534<         if(c != '\0') {<             if(write(pp->io.fd, &c, 1) != 1) {<                 syslog(LOG_NOTICE, "ARCRON: write to fd %d failed", pp->io.fd);<             }< #ifdef ARCRON_DEBUG<         else if(debug) { printf("arc: sent `%2.2x', fd %d.\n", c, pp->io.fd); }< #endif--->         if((c != '\0') && (write(pp->io.fd, &c, 1) != 1)) {>             syslog(LOG_NOTICE, "ARCRON: could not write to fd %d", pp->io.fd);593a536,539> >         if(debug && (c != '\0'))>             { printf("arc: sending `%2.2x' on fd %d.\n", c, pp->io.fd); }> 608a555>         int i;614d560< #ifdef ARCRON_DEBUG618d563< #endif628d572< #ifdef ARCRON_DEBUG630d573< #endif632,634c575< #ifdef DEBUG<             if(debug) { printf("arc: failed [TTYCLK] to open %s.\n", device); }< #endif--->             if(debug) { printf("Failed [TTYCLK] to open %s.\n", device); }638d578< #ifdef ARCRON_DEBUG640,641c580< #endif<         fd = open(device, OPEN_FLAGS);--->         fd = open(device, O_RDWR);643,645c582< #ifdef DEBUG<             if(debug) { printf("arc: failed [open()] to open %s.\n", device); }< #endif--->             if(debug) { printf("Failed [open()] to open %s.\n", device); }650c587< #ifdef ARCRON_DEBUG---> 652,653c589<             { printf("Opened RS232 port with file descriptor %d.\n", fd); }< #endif--->             { printf("Opening RS232 port with file descriptor %d.\n", fd); }678d613<         /* Set structure to all zeros... */695,696d629<         /* Spread out resyncs so that they should remain separated. */<         up->next_resync = current_time + INITIAL_RESYNC_DELAY + (67*unit)%1009;698,700c631< #if 0 /* Not needed because of zeroing of arcunit structure... */<         up->resyncing = 0;              /* Not resyncing yet. */<         up->saved_flags = 0;            /* Default is all flags off. */--->         up->pollcnt = 2;702,703d632<         {<         int i;705,707d633<         }< #endif< 715a642>         up->ev.next = up->ev.prev = 0;  /* Be ultra-cautious... */716a644,648> >         /* Spread out resyncs so that they should remain separated. */>         up->next_resync = current_time + INITIAL_RESYNC_DELAY + (67*unit)%1009;>         up->resyncing = 0;              /* Not resyncing yet. */>         up->saved_flags = 0;            /* Default is all flags off. */767c699< #ifdef ARCRON_DEBUG---> 769,771c701,702< #endif<     if(spaceleft < sl) { /* Should not normally happen... */< #ifdef ARCRON_DEBUG---> >     if(spaceleft < sl) {774d704< #endif825d754< #ifdef DEBUG827d755< #endif870a799> 872c801< #ifdef DEBUG---> 877d805< #endif890d817< #ifdef ARCRON_DEBUG895d821< #endif902c828< #ifdef ARCRON_DEBUG---> 913d838< #endif931d855< #ifdef ARCRON_DEBUG936a861> 944d868< #endif955d878< #ifdef ARCRON_DEBUG958d880< #endif980d901< #ifdef ARCRON_DEBUG982d902< #endif995d914< #ifdef ARCRON_DEBUG997d915< #endif1002d919< #ifdef DEBUG1004d920< #endif1006d921< #ifdef DEBUG1013d927< #endif1043d956< #ifdef ARCRON_DEBUG1045d957< #endif1049d960< #ifdef ARCRON_DEBUG1051d961< #endif1055a966,969> >         /* Give us some leeway before deciding that the clock is ill... */>         up->pollcnt = 2;> 1077,1078d990< #ifdef ARCRON_DEBUG<             /* Would expect to have caught major problems already... */1080d991< #endif1121c1032< #ifdef DEBUG---> 1128d1038< #endif1146d1055<                 up->status = status;1182d1090< #ifdef ARCRON_DEBUG

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -