{"id":28983478,"url":"https://github.com/imranity/py-lslock","last_synced_at":"2026-07-01T18:31:27.846Z","repository":{"id":80459704,"uuid":"73510130","full_name":"imranity/py-lslock","owner":"imranity","description":"Python program to check locked files in a Dir.","archived":false,"fork":false,"pushed_at":"2016-11-14T11:47:06.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-30T01:10:35.310Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/imranity.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2016-11-11T20:43:39.000Z","updated_at":"2016-11-14T11:02:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"e03cf308-0a52-40d1-a988-d5a46e9d00ca","html_url":"https://github.com/imranity/py-lslock","commit_stats":null,"previous_names":["imranity/py-lslock"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/imranity/py-lslock","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imranity%2Fpy-lslock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imranity%2Fpy-lslock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imranity%2Fpy-lslock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imranity%2Fpy-lslock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imranity","download_url":"https://codeload.github.com/imranity/py-lslock/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imranity%2Fpy-lslock/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35019030,"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-01T02:00:05.325Z","response_time":130,"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":[],"created_at":"2025-06-24T16:45:04.953Z","updated_at":"2026-07-01T18:31:27.840Z","avatar_url":"https://github.com/imranity.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# py-lslock\nShow list of files locked with flock syscall for a given directory(passed as argument to program) on Linux.\n\n\n### Overview\n\npy-lslock uses `/proc/locks` file to read and determine which of files have been locked using flock. \nNOTE: `/proc/locks` is a feature in linux kernel so this utility must be run on linux based system.\n\n### Usage\n\nRun the main program that list locks as following:\n```python\npython py-lslock.py /tmp/lslock-test\n```\n\nHere `/tmp/lslock-test` is given as argument where `.lock` files are checked.\n\n\n### Test\n\nTo test, the test program must be run in separate shell.\nRun as :\n```python\npython py-lslock-test.py /tmp/lslock-test 15\n```\nhere 15 is number of iterations, i.e. # of lock operations performed in given subdirectory.  \nIn other terminal run the main `py-lslock.py` to check the locked files in same directory.\n\n```python\npython py-lslock.py /tmp/lslock-test\n```\n\n###Sample output\n\n```\nroot@imran-ThinkPad-W530:/home/imran/Desktop/py-lslock# python py-lslock.py /tmp/lslock\nresult of all locked files found in directory /tmp/lslock \nLOCKED_FILE\n/tmp/lslock/0.lock\n/tmp/lslock/1.lock\n/tmp/lslock/2.lock\n/tmp/lslock/3.lock\n/tmp/lslock/4.lock\n/tmp/lslock/5.lock\n/tmp/lslock/6.lock\n/tmp/lslock/7.lock\n/tmp/lslock/8.lock\n/tmp/lslock/9.lock\n/tmp/lslock/10.lock\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimranity%2Fpy-lslock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimranity%2Fpy-lslock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimranity%2Fpy-lslock/lists"}