{"id":19710163,"url":"https://github.com/imacat/vsntp","last_synced_at":"2026-07-12T13:32:09.235Z","repository":{"id":146004267,"uuid":"336588629","full_name":"imacat/vsntp","owner":"imacat","description":"An SNTP client daemon for machines without a sane system time","archived":false,"fork":false,"pushed_at":"2021-02-06T17:00:04.000Z","size":62,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-25T15:36:52.701Z","etag":null,"topics":["sntp","time-sync","time-synchronization","virtual-machine"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/imacat.png","metadata":{"files":{"readme":"README","changelog":"ChangeLog","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-06T16:57:55.000Z","updated_at":"2021-02-08T06:08:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"a0376c98-a6b6-47da-83a7-e8f9d38779b6","html_url":"https://github.com/imacat/vsntp","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/imacat/vsntp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imacat%2Fvsntp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imacat%2Fvsntp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imacat%2Fvsntp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imacat%2Fvsntp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imacat","download_url":"https://codeload.github.com/imacat/vsntp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imacat%2Fvsntp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35393398,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-12T02:00:06.386Z","response_time":87,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["sntp","time-sync","time-synchronization","virtual-machine"],"created_at":"2024-11-11T22:06:35.817Z","updated_at":"2026-07-12T13:32:09.208Z","avatar_url":"https://github.com/imacat.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"vsntp README\n\n    See INSTALL for details on how to install and run vsntp.\n\nObtaining the Newest Information\n\n    vsntp's official website is at...\n\n      vsntp project on GitHub: https://github.com/imacat/vsntp\n      vsntp project on SourceForge: https://sf.net/p/vsntp\n\n    You can always download the newest version of vsntp from...\n\n      vsntp download on SourceForge: https://sourceforge.net/projects/vsntp/files\n      Tavern IMACAT's FTP directory: https://ftp.imacat.idv.tw/pub/vsntp/\n\n    imacat's PGP public key is at...\n\n      Tavern IMACAT's: https://www.imacat.idv.tw/me/pgpkey.asc\n\nIntroduction:\n\n    vsntp is an SNTP client daemon for machines without a sane system\ntime.  The word \"vsntp\" stands for \"SNTP for Virtual PC\".  It was\noriginally designed for my GNU/Linux server running on Connectix\nVirtual PC.  It runs according to RFC 1769 SNTP, connecting the NTP\nserver on UDP port 123.\n\n    Without Virtual PC Additions, the system time on Virtual PC is\ncompletely insane.  It's RTC (Real Time Clock, or CMOS time, or\nhardware clock) is software emulated, which does not seems to be\nrunning.  The GNU/Linux kernel hardly maintains a system time itself.\nWith smooth run it goes 4 seconds ahead per minute, which is nearly\n1.5 hours per day.  That is insane.  You can even tell it with your\neyes.\n\n    David L. Mills' ntp does not work here.  It uses a method that\nlearns the clock frequency drift first, and adjust the kernel clock\nwith adjtimex() so that time adjustment goes smoothly, from the point\nof view of system and applications.  This assumes an existing fix-\nspeed system clock.  But this is not the case of Virtual PC.  The\nsystem clock on Virtual PC is software emulated.  It can be faster\nor slower now and then, depending on the load of the hosting machine.\nThere is no fixed clock speed.  The frequency drift does not exist,\nthen.  It dooms to fail to measure it.\n\n    There is an sntp client that comes with David L. Mills' ntp\npackage.  It is suggested to be run from crontab.  But crontab runs\nby minutes, and Virtual PC goes 4 seconds ahead per minute.  Rolling\nback 4 seconds every minute is insane for most applications.  It also\nincreases system load heavily to run one instance per minute.\n\n    vsntp is a workaround on this.  It runs as a daemon to eliminates\nthe additional system load on every synchronization. It uses\nsettimeofday() to synchronize the time.  It synchronizes the time\nwith an arbitrary interval, so that time can be accurate within a\nsecond.\n\n    There are some defects.  Synchronizing the time too often\nintroduces heavy network load.  It introduces heavy load on the\ntarget NTP server, too.  You should have a working NTP server nearby\nthat is owned by you.  Also, since settimeofday() is called so often,\nhigh-accurate time operations like timer, etc., may not run\ncorrectly.\n\n    vsntp uses sleep() as the synchronization scheduler.  Reports show\nthat on some systems sleep() may not function normally.  If you find\nvsntp stops synchronization after running for some time, that the\nsleep() is not functioning normally on your system, you may want to\nswitch to the alarm() scheduler with the \"-a\" switch.\n\n    If you ever encounter any problem, you may check your syslog.\nvsntp logs detailed debugging information to syslog in log level\nLOG_DEBUG with facility LOG_DAEMON.  You may turn it on in your\n/etc/syslog.conf with the following line:\n\n      daemon.debug  /var/log/debug\n\nand check the /var/log/debug file for the debugging message.  Remember\nto remove this afterwards, for the amount of the debugging messages\nmay be huge and may use up your hard disk in a very short time.  To the\nleast it may slow down your system for frequent hard disk I/O.\n\n    vsntp was originally written for GNU/Linux.  It uses POSIX\ncompatible system calls.  It should work on any POSIX compatible\nsystem.  But I have yet only tested it on Cygwin.  Cygwin is known to\nwork.  I don't have others to test and run on.  Please let me know\n(and submit the patch if needed) if you can port it to other systems.\nI know it does not work on MSWin32, for the way it handles the PID\nfile path.\n\n    Please tell me if you have successfully running vsntp on other\nvirtual machines, like VMWare.\n\n    Generally, please tell me if you are using vsntp.  I would like\nto know that I am really doing some good for the world, *^_^*  but not\nhaving fun myself. :p\n\n    This is my first daemon, my first socket program and my first\npublic-released C program.  Any comment or suggestion is welcome. ^_*'\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimacat%2Fvsntp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimacat%2Fvsntp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimacat%2Fvsntp/lists"}