{"id":15067273,"url":"https://github.com/npanuhin/edu-dmp-stats-module","last_synced_at":"2025-10-05T04:31:48.893Z","repository":{"id":221608753,"uuid":"752717966","full_name":"npanuhin/edu-dmp-stats-module","owner":"npanuhin","description":"Educational project about the Device Mapper Proxy (dmp) Module with statistics","archived":true,"fork":false,"pushed_at":"2024-02-08T22:41:17.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-09-29T11:45:29.917Z","etag":null,"topics":["device-mapper","kernel-module","linux-kernel"],"latest_commit_sha":null,"homepage":"","language":"C","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/npanuhin.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}},"created_at":"2024-02-04T16:06:52.000Z","updated_at":"2024-04-19T21:04:46.000Z","dependencies_parsed_at":"2024-02-09T01:14:35.030Z","dependency_job_id":"3625a4ff-e03e-4803-8f14-e6463954458f","html_url":"https://github.com/npanuhin/edu-dmp-stats-module","commit_stats":null,"previous_names":["npanuhin/edu-dmp-stats-module"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npanuhin%2Fedu-dmp-stats-module","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npanuhin%2Fedu-dmp-stats-module/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npanuhin%2Fedu-dmp-stats-module/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npanuhin%2Fedu-dmp-stats-module/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/npanuhin","download_url":"https://codeload.github.com/npanuhin/edu-dmp-stats-module/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235364887,"owners_count":18978257,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["device-mapper","kernel-module","linux-kernel"],"created_at":"2024-09-25T01:18:59.337Z","updated_at":"2025-10-05T04:31:43.640Z","avatar_url":"https://github.com/npanuhin.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eDevice Mapper Proxy (dmp) module with statistics\u003c/h1\u003e\n\nDevice Mapper Proxy (dmp) is a kernel module for the Linux operating system that creates virtual block devices on top of existing devices using the [device mapper framework](https://en.wikipedia.org/wiki/Device_mapper). The module also monitors and provides statistics on the performed operations, which are accessible through the [`sysfs`](https://en.wikipedia.org/wiki/Sysfs) interface.\n\n## Remarks\n\nI used `Ubuntu 22.04.3 LTS` with the `5.15.0-92-generic` kernel for building and testing the module\n\n## Installation\n\nClone the repository:\n\n```bash\ngit clone https://github.com/npanuhin/edu-dmp-stats-module\n```\n\n## Building and Testing\n\nTo build and intially test the module, run `run.sh`. It will give a nice summary of the operations performed and will run a simple test to check the module's functionality.\n\n```bash\nsh ./run.sh\n```\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to see the output\u003c/summary\u003e\n\n```bash\n=============================================== Updating the code ===============================================\nRemoving .Module.symvers.cmd\nRemoving .dmp.ko.cmd\nRemoving .dmp.mod.cmd\nRemoving .dmp.mod.o.cmd\nRemoving .dmp.o.cmd\nRemoving .modules.order.cmd\nRemoving Module.symvers\nRemoving dmp.ko\nRemoving dmp.mod\nRemoving dmp.mod.c\nRemoving dmp.mod.o\nRemoving dmp.o\nRemoving modules.order\nAlready up to date.\n\n=============== Removing previously inserted module, zero device and device-mapper proxy device ===============\n\n============================================== Building the module =============================================\nmake -C /lib/modules/5.15.0-92-generic/build M=/home/npanuhin/tools/edu-dm-proxy-stats-module modules\nmake[1]: Entering directory '/usr/src/linux-headers-5.15.0-92-generic'\n  CC [M]  /home/npanuhin/tools/edu-dm-proxy-stats-module/dmp.o\n  MODPOST /home/npanuhin/tools/edu-dm-proxy-stats-module/Module.symvers\n  CC [M]  /home/npanuhin/tools/edu-dm-proxy-stats-module/dmp.mod.o\n  LD [M]  /home/npanuhin/tools/edu-dm-proxy-stats-module/dmp.ko\n  BTF [M] /home/npanuhin/tools/edu-dm-proxy-stats-module/dmp.ko\nSkipping BTF generation for /home/npanuhin/tools/edu-dm-proxy-stats-module/dmp.ko due to unavailability of vmlinux\nmake[1]: Leaving directory '/usr/src/linux-headers-5.15.0-92-generic'\n\n=============================================== Creating devices ==============================================\ncrw------- 1 root root 10, 236 фев  9 00:10 /dev/mapper/control\nlrwxrwxrwx 1 root root       7 фев  9 00:17 /dev/mapper/zero1 -\u003e ../dm-0\ncrw------- 1 root root 10, 236 фев  9 00:10 /dev/mapper/control\nlrwxrwxrwx 1 root root       7 фев  9 00:17 /dev/mapper/dmp1 -\u003e ../dm-1\nlrwxrwxrwx 1 root root       7 фев  9 00:17 /dev/mapper/zero1 -\u003e ../dm-0\n\n============================================== Testing the module =============================================\n1+0 records in\n1+0 records out\n4096 bytes (4,1 kB, 4,0 KiB) copied, 0,00151003 s, 2,7 MB/s\n1+0 records in\n1+0 records out\n4096 bytes (4,1 kB, 4,0 KiB) copied, 0,000888471 s, 4,6 MB/s\n\n=============================================== Module statistics =============================================\nread:\n  reqs: 2286\n  avg size: 1004\nwrite:\n  reqs: 8\n  avg size: 512\ntotal:\n  reqs: 2294\n  avg size: 1003\n```\n\u003c/details\u003e\n\n## Further Usage\n\n- To reset the statistics, run:\n\n\t```bash\n\techo \u003e /sys/module/dmp/stat/volumes\n\t```\n\n- To view the statistics, run:\n\n\t```bash\n\tcat /sys/module/dmp/stat/volumes\n\t```\n\n\t\u003cdetails\u003e\n\t\u003csummary\u003eClick to see the sample output\u003c/summary\u003e\n\n\t```bash\n\tread:\n\t  reqs: 83\n\t  avg size: 1875\n\twrite:\n\t  reqs: 0\n\t  avg size: 0\n\ttotal:\n\t  reqs: 83\n\t  avg size: 1875\n\t```\n\t\u003c/details\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnpanuhin%2Fedu-dmp-stats-module","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnpanuhin%2Fedu-dmp-stats-module","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnpanuhin%2Fedu-dmp-stats-module/lists"}