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

📄 4

📁 Unix/Linux 网络时间协议版本3 Network Time Protocol Version 3 (NTP) distribution for Unix systems
💻
字号:
Return-Path: harlan@mumps.pfcs.comReceived: from mumps.pfcs.com (mumps.pfcs.com [192.52.69.11]) by pcpsj.pfcs.com (8.6.12/8.6.9) with SMTP id BAA12458 for <stenn@whimsy.udel.edu>; Mon, 28 Apr 1997 01:29:48 -0400Received: from brown.pfcs.com by mumps.pfcs.com with SMTP id AA15664  (5.67b/IDA-1.5 for <stenn@whimsy.udel.edu>); Mon, 28 Apr 1997 01:29:33 -0400Received: (harlan@localhost) by brown.pfcs.com (8.7.5/8.6.9) id BAA07527 for stenn@whimsy.udel.edu; Mon, 28 Apr 1997 01:29:47 -0400 (EDT)From: michael shiplett <walrus@fuseki.aa.ans.net>Subject: Re: Solaris 2.5.1 ntp sourceNewsgroups: comp.protocols.time.ntpDate: 25 Apr 1997 21:10:23 -0400Organization: ANSPath: news.fred.net!www.nntp.primenet.com!nntp.primenet.com!news.maxwell.syr.edu!cpk-news-hub1.bbnplanet.com!news.bbnplanet.com!mindspring!cssun.mathcs.emory.edu!cronkite.cc.uga.edu!news-feed-1.peachnet.edu!paperboy.engeast.baynetworks.com!news-w.ans.net!newsfeeds.ans.net!riley.aa.ans.net!news.aa.ans.net!not-for-mailLines: 66Distribution: inetMessage-Id: <xm7rafysi68.fsf@fuseki.aa.ans.net>References: <01bc4b51$af52bac0$9357b89d@sophie.noc.lexmark.com>	<5jiq52$5ah@gap.cco.caltech.edu> <5jkt4h$ruq@engnews2.Eng.Sun.COM>	<5jojml$fk7@lilypad.rutgers.edu> <5jq934$5s5@engnews2.Eng.Sun.COM>Nntp-Posting-Host: fuseki.aa.ans.netX-Newsreader: Gnus v5.2.40/Emacs 19.34Xref: news.fred.net comp.protocols.time.ntp:8175Apparently-To: <stenn@whimsy.udel.edu>bmc@kiowa.eng.sun.com (Bryan Cantrill) writes:  Thanks for the very helpful explanation, code, and promise of thekernel patch script. I did run into an error in gettime.c and theexplanation of the fields.> void> dump_gnuplot(int ignore)> {[...]> 	for (i = 1; i < cursec; i++) {> 		sprintf(c, "%d %lld %lld %lld ", i,> 		    lhs = (before[i] - before[0]) / (hrtime_t) 1000,> 		    rhs = (hrtime_t) (tp[i].tv_sec - tp[0].tv_sec) *> 		    (hrtime_t) MICROSEC  + (hrtime_t) (tp[i].tv_usec -> 		    tp[0].tv_usec), lhs - rhs,> 		    (after[i] - before[i]) / (hrtime_t) 1000);  sprintf() has 5 arguments but only 4 format operators. It looks likethe format string should be 		sprintf(c, "%d %lld %lld %lld %lld", i,This omission had me confused when I read your explanation of theoutput as the first output had 4 columns, but the useful output forhow to locate TOD clock actions) had 5 columns :)> Going from left to right, we have the number of wall seconds> elapsed, the gethrtime() in microseconds, the gettimeofday() in> microseconds, and the number of nanoseconds between the straddling> gethrtime()'s  With the correct version you end up with the same output except thepenultimate column (going left to right) is the difference betweeenelapsed gettimeofday() and elapsed gethrtime() in microseconds. Ofcourse, one gets this output even without the format fix, but it'sexplanation is in the code.  One thing I've noticed is every so often I end up witha large (> 15 microseconds) difference between the two gethrtime()calls. Sometimes the gettimeofday() result jumps forward and back atthis time as well. This is on an afs client but with the `-nosettime'option and no time daemons running.    255 255014940 255014928 12 3    256 256014925 256014912 13 4    257 257014881 257015022 -141 157    258 258014868 258014856 12 3    259 259014844 259014832 12 4    ...    1021 1021009233 1021009221 12 3    1022 1022009216 1022009204 12 4    1023 1023009204 1023009192 12 153    1024 1024009166 1024009154 12 3    1025 1025009158 1025009146 12 4    ...    1279 1279013832 1279013820 12 4    1280 1280013797 1280013785 12 4    1281 1281013774 1281013916 -142 159    1282 1282013757 1282013745 12 3    1283 1283013726 1283013714 12 4  Anyway, thanks again for the code, and I look forward to the kernelpatch.michael

⌨️ 快捷键说明

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