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

📄 vsntp.8

📁 一个开源的NTP客户端程序
💻 8
字号:
.\" Process this file with.\" groff -man -Tascii vsntp.8.\".TH VSNTP 8 "MARCH 2007" VSNTP "System Administration Tools".SH NAMEvsntp \- SNTP client for Virtual PC.SH SYNOPSIS.BI "vsntp [-i " n "] [-p " file "] [-a|-s] " server.SH DESCRIPTION.B vsntpis an.SM SNTPclient daemon for machines without a sane system time.  The word.B vsntpstands for.BR "SNTP for Virtual PC" .It was originally designed for my.I GNU/Linuxserver running on Connectix Virtual PC.  It runs according to.SM RFC1769.SM SNTP, connecting the.SM NTPserver on.SM UDPport 123.  It has only been compiled and run on.I GNU/Linuxbefore.Without "Virtual.SM PCAdditions", the system time on Virtual.SM PCis completely insane.  It's.SM RTC(Real Time Clock, or.SM CMOStime, or hardware clock) is software emulated, which does not seemsto be running.  The.I GNU/Linuxkernel hardly maintains a system time itself.  With smooth run itgoes 4 seconds ahead per minute, which is nearly 1.5 hours per day.That is insane.  You can even tell it with your eyes.David L. Mills'.B ntpdoes not work here.  It uses a method that learns the clock frequencydrift first, and adjust the kerenl clock with.B adjtimex()so that time adjustment goes smoothly, from the point of view ofsystem and applications.  This assumes an existing fix-speed systemclock.  But this is not the case here.  The system clock on Virtual.SM PCis software emulated.  It goes faster or slower now and then,depending on the load of the hosting machine.  There is no fixedclock speed.  The frequency drift does not exist, then.  It dooms tofail to measure it.There is an.B sntpclient that comes with David L. Mills'.B ntppackage.It is suggested to be run from crontab.  But crontab runs by minutes,and Virtual.SM PCgoes 4 seconds ahead per minute.  Rolling back 4 seconds every minuteis insane for most applications.  It also increases system loadheavily to run one instance per minute..B vsntpis a workaround on this.  It runs as a daemon to to eliminates theadditional system load on every synchronization.  It uses.B settimeofday()to synchronize the time.  It synchronizes thetime with an arbitrary interval, so that time can be accurate withina second.There are some defects.  Synchronizing the time too often introducesheavy network load.  It introduces heavy load on the target.SM NTPserver, too.  You should have a working.SM NTPserver nearby that is owned by you.  Also, since.B settimeofday()is called so often, highly-accurate time operations like timer, etc.,may not run correctly..B vsntpuses.BI sleep()as the synchronization scheduler.  Reports show that on some systems.BI sleep()may not function normally.  If you find.BI vsntpstops synchronization after running for some time, that the.BI sleep()is not functioning normally on your system, you may want to switchto the.BI alarm()scheduler with the.B -aswitch..B vsntpwas originally written for.I GNU/Linux .It uses.SM POSIXcompatible system calls.  It should work on any.SM POSIXcompatible system.  But I have yet only tested it on Cygwin.  Cygwinis known to work.  I don't have others to test and run on.  Please letme know (and submit the patch if needed) if you can port it to othersystems.  I know it does not work on MSWin32, for the way it handlesthe.SM PIDfile path.Please tell me if you have successfully running vsntp on other virtualmachines, like.BR "VMWare" .Generally, please tell me if you are using.B "vsntp" .I would like to know that I am really doing some good for the world,*^_^*  but not having fun myself. :pThis is my first daemon, my first socket program and my firstpublic-released C program.  Any comment or suggestion is welcome. ^_*'.SH OPTIONS.IP "-i,--interval n"Set the synchronization interval to.I nseconds.  Default is 900 seconds (15 minutes)..IP "-p,--pidfile file"The.SM PIDfile location.  Default to.IR /var/run/vsntp.pid ..IP -s,--sleepUse.BI sleep()as the scheduler.  This is currently the default..IP -a,--alarmUse.BI alarm()as the scheduler..IP -h,--helpDisplay the help message..IP -v,--versionDisplay version information..SH FILES.I /var/run/vsntp.pid.RSThe.SM PIDof the running daemon..SH DIAGNOSTICSIf you ever encounter any problem, you may check your syslog..B vsntplogs detailed debugging information to syslog in log level.B LOG_DEBUGwith facility.B LOG_DAEMON .You may turn it on in your.I /etc/syslog.confwith the following line:  daemon.debug   /var/log/debugand check the.I /var/log/debugfile for the debugging message.  Remember to remove this afterwards,for the amount of the debugging messages may be huge and may use upyour harddisk in a very short time.  To the least it may slow downyour system for frequent harddisk.SM "I/O" ..SH BUGS.B vsntpis hosted on SourceForge and Tavern IMACAT's.  For the latestinfomation, see:  http://vsntp.sourceforge.net/  https://sourceforge.net/projects/vsntp/  http://www.imacat.idv.tw/tech/vsntp.html.B vsntp has a mailing list hosted at SourceForge:vsntp-users@lists.sourceforge.net .  Please submit your questions,suggestions or bug reports there.  It is a Mailman mailing list.For more information, see:  https://lists.sourceforge.net/lists/listinfo/vsntp-usersAlternatively, you can send a mail to:vsntp-users-request@lists.sourceforge.net with the subject.B helpfor a list of available e-mail commands..SH AUTHORimacat <imacat@mail.imacat.idv.tw>..SH "SEE ALSO".BR settimeofday (2),.BR adjtimex (2),.BR sleep (3),.BR alarm (2)..BR ntp :http://www.ntp.org/ ..SM RFC1769.SM SNTP: http://www.faqs.org/rfcs/rfc1769.html ..SM RFC1305.SM NTP: http://www.faqs.org/rfcs/rfc1305.html .

⌨️ 快捷键说明

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