{"id":28321885,"url":"https://github.com/haksham/linux-project","last_synced_at":"2026-04-11T03:34:08.379Z","repository":{"id":295343542,"uuid":"989414186","full_name":"Haksham/Linux-project","owner":"Haksham","description":"A dynamic web-based simulation of real-time clock (RTC) management and synchronization across OS partitions","archived":false,"fork":false,"pushed_at":"2025-05-25T01:31:25.000Z","size":1183,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-22T01:38:17.791Z","etag":null,"topics":["expressjs","linux-kernel","makefile","nextjs","real-time-clock","socket-io"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Haksham.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-24T03:51:01.000Z","updated_at":"2025-06-18T12:44:10.000Z","dependencies_parsed_at":"2025-05-25T02:39:11.373Z","dependency_job_id":"132da01d-6ae9-4536-8236-eed224872293","html_url":"https://github.com/Haksham/Linux-project","commit_stats":null,"previous_names":["haksham/linux-project"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Haksham/Linux-project","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Haksham%2FLinux-project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Haksham%2FLinux-project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Haksham%2FLinux-project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Haksham%2FLinux-project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Haksham","download_url":"https://codeload.github.com/Haksham/Linux-project/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Haksham%2FLinux-project/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31668049,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-10T17:19:37.612Z","status":"online","status_checked_at":"2026-04-11T02:00:05.776Z","response_time":54,"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":["expressjs","linux-kernel","makefile","nextjs","real-time-clock","socket-io"],"created_at":"2025-05-25T13:09:45.161Z","updated_at":"2026-04-11T03:34:08.371Z","avatar_url":"https://github.com/Haksham.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🕒 Real-Time Clock Partition Simulator\n\nA dynamic, interactive web-based simulation of real-time clock (RTC) management and synchronization across OS partitions.  \nBuilt for Linux session.\n\n---\n\n## 🚀 Overview\n\nThis project demonstrates **master-slave RTC synchronization** in a multi-partition system:\n\n- **Linux** acts as the **Master Partition**, reading time from the hardware clock.\n- **Windows OS** and **Ubuntu** are **Slave Partitions** whose clocks can drift and become out of sync.\n- You can simulate clock drift, observe out-of-sync states, and manually synchronize all partitions—just like using `timedatectl set-local-rtc 1` in Linux.\n\n---\n\n## ✨ Features\n\n- **Live RTC Simulation:** Visualize how clocks drift and sync in real time.\n- **Master-Slave Architecture:** Linux (master) always stays in sync; others can drift.\n- **Manual \u0026 Bulk Sync:** Instantly synchronize all slave partitions with a single click.\n- **Visual Feedback:** Out-of-sync states are clearly highlighted.\n- **Modern UI:** Responsive, attractive interface using React and Next.js.\n- **Command Simulation:** Simulate Linux RTC commands and observe their effects.\n\n---\n\n## 🖼️ Screenshots\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"pics/p1.png\" alt=\"RTC Dashboard\" width=\"600\"/\u003e\n  \u003cbr\u003e\u003cbr\u003e\n  \u003cimg src=\"pics/p2.png\" alt=\"Out of Sync Example\" width=\"600\"/\u003e\n  \u003cbr\u003e\u003cbr\u003e\n  \u003cimg src=\"pics/p3.png\" alt=\"Sync All Example\" width=\"600\"/\u003e\n  \u003cbr\u003e\u003cbr\u003e\n  \u003cimg src=\"pics/p4.png\" alt=\"Sync All Example\" width=\"600\"/\u003e\n  \u003cbr\u003e\u003cbr\u003e\n  \u003cimg src=\"pics/p5.png\" alt=\"Sync All Example\" width=\"600\"/\u003e\n\u003c/div\u003e\n\n---\n\n## 🛠️ Getting Started\n\n### 1. Clone the repository\n\n```bash\ngit clone https://github.com/yourusername/linux-proj.git\ncd linux-proj\n```\n\n### 2. Start the RTC Master Server\n\n```bash\ncd rtc-sim\nnpm install\nnode index.js\n```\n\n### 3. Start the Frontend\n\n```bash\ncd ../frontend\nnpm install\nnpm run dev\n```\n\nOpen [http://localhost:3000](http://localhost:3000) in your browser.\n\n---\n\n## 🏗️ Project Structure\n\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003e📁 linux-proj/ (Root)\u003c/b\u003e\u003c/summary\u003e\n\n\u003csummary\u003e├── \u003cb\u003efrontend/\u003c/b\u003e \u003ci\u003e(Next.js frontend)\u003c/i\u003e\u003c/summary\u003e\n\u003csummary\u003e│   ├── \u003cb\u003eapp/\u003c/b\u003e\u003c/summary\u003e\n\n│   │   ├── layout.js  \n│   │   ├── page.js  \n│   │   └── globals.css  \n│   ├── \u003cb\u003ecomponents/\u003c/b\u003e\u003cbr\u003e\n│   │   └── PartitionClock.js  \n│   ├── \u003cb\u003epic/\u003c/b\u003e \u003ci\u003e(Screenshots \u0026 images)\u003c/i\u003e\u003cbr\u003e\n│   │   ├── p1.png  \n│   │   ├── p2.png  \n│   │   ├── p3.png  \n│   │   ├── p4.png  \n│   │   ├── p5.png  \n│   ├── .gitignore  \n│   ├── jsconfig.json  \n│   ├── next.config.mjs  \n│   ├── package.json  \n│   ├── postcss.config.mjs  \n│   ├── README.md  \n│   ├── requirements.txt  \n│   └── tailwind.config.mjs  \n├── \u003cb\u003ertc-sim/\u003c/b\u003e \u003ci\u003e(Node.js backend)\u003c/i\u003e\u003cbr\u003e\n│   ├── .gitignore  \n│   ├── index.js  \n│   ├── package.json  \n│   └── requirements.txt  \n├── .gitignore  \n├── Commands.txt  \n├── LICENSE  \n├── Makefile  \n├── README.md  \n├── rtc_slave.c  \n├── rtc_sync.c  \n\n\u003c/details\u003e\n\n---\n\n## ⚙️ How It Works\n\n- **Master Clock:** The backend (`rtc-sim/index.js`) broadcasts the current time to all partitions.\n- **Partitions:** Each partition (component) simulates its own clock, which may drift.\n- **Synchronization:** Slave partitions periodically sync to the master, or can be manually synced via UI buttons.\n- **Command Simulation:** Use the UI to simulate commands like `timedatectl set-local-rtc 1` for instant synchronization.\n\n---\n\n## 🖥️ Useful Commands\n\nThe following commands (from [`Commands.txt`](Commands.txt)) are useful for working with the kernel RTC module:\n\n```bash\nmake\n\nsudo insmod rtc_sync.ko\n\nsudo dmesg | grep rtc_shm\n\nls -l /dev/rtc_shm\n\ncat /dev/rtc_shm\n\ngcc rtc_slave.c -o rtc_slave\n\nsudo ./rtc_slave\n\nsudo rmmod rtc_sync\n```\n\n---\n\n## 📚 References\n\n- [Linux Kernel RTC Subsystem](https://www.kernel.org/doc/html/latest/driver-api/rtc.html)\n- [timedatectl Documentation](https://www.freedesktop.org/software/systemd/man/latest/timedatectl.html)\n- [Socket.io](https://socket.io/)\n- [Next.js](https://nextjs.org/)\n\n---\n\n## 👨‍💻 Authors\n\n- **Harsh V M**\n- **Karthik Hegde**\n\n---\n\n## 📝 License\n\nThis project is licensed under the MIT License. See [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaksham%2Flinux-project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaksham%2Flinux-project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaksham%2Flinux-project/lists"}