{"id":39299244,"url":"https://github.com/torden/cpulimit","last_synced_at":"2026-01-18T01:28:38.451Z","repository":{"id":57834803,"uuid":"80604074","full_name":"torden/cpulimit","owner":"torden","description":"This project is CPULimit Patch for VM's CPU resource control,Forked from cpulimit project in sf.org","archived":false,"fork":false,"pushed_at":"2024-07-08T00:38:42.000Z","size":78,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-07-08T01:42:07.377Z","etag":null,"topics":["cgroups","cpulimit","kvm","linux","resource-limits","resource-management"],"latest_commit_sha":null,"homepage":"https://torden.github.io/cpulimit/","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/torden.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}},"created_at":"2017-02-01T09:08:37.000Z","updated_at":"2024-07-08T00:38:45.000Z","dependencies_parsed_at":"2023-01-17T19:30:17.188Z","dependency_job_id":null,"html_url":"https://github.com/torden/cpulimit","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/torden/cpulimit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torden%2Fcpulimit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torden%2Fcpulimit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torden%2Fcpulimit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torden%2Fcpulimit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/torden","download_url":"https://codeload.github.com/torden/cpulimit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/torden%2Fcpulimit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28526518,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"ssl_error","status_checked_at":"2026-01-18T00:39:39.467Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["cgroups","cpulimit","kvm","linux","resource-limits","resource-management"],"created_at":"2026-01-18T01:28:37.847Z","updated_at":"2026-01-18T01:28:38.439Z","avatar_url":"https://github.com/torden.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cpulimit\n\n[![Build Status](https://github.com/torden/cpulimit/actions/workflows/cpulimit.yml/badge.svg)](https://github.com/torden/cpulimit/actions)\n[![GitHub version](https://img.shields.io/github/v/release/torden/cpulimit)](https://github.com/torden/cpulimit)\n[![CodeQL](https://github.com/torden/cpulimit/workflows/CodeQL/badge.svg)](https://github.com/torden/cpulimit/actions/workflows/codeql-analysis.yml)\n\nThis CPULimit Project is not Original. it does patched a few features based on CPULimit Project (v1.1) in sf.org\n\n```\ncpulimit is written by Angelo Marletta. Thx Angelo, your project helped to my task\n```\n\n## How to Work\n\n* Real-Time Monitoring the Target process's cpu resource usage (-p) (expressed in percentage, not in cpu time)\n* If target process cpu usage is over the limit (-l), \"STOP\" signal send to target process.\n* If target process cpu usage is under the limit (-l), \"CONTINUE\" signal send to stopped process.\n\n## List of Patches \n\n* Support Daemonization\n* Support Detecting Multiple CPU Limit working about same process\n* Support Logging to SysLog\n* Support Make a static binary for use on the multiple platform\n* Support Few features control by command line options\n* Patched very longer kernel time issue\n* Patched Minor bugs and Issue\n\n## Tested\n\n* CnetOS(RHEL) 2, 3, 4, 6, 7, 8\n* Ubuntu\n\n## Requirement\n\n* Linux\n* gcc 3.x or Higher (gcc 2.95 not tested)\n* glibc\n* make\n\n## Compile\n\n### compile for generally\n\n* make\n\n```bash\n# make\nRemoving Garbage Files..\nComplete\nNormal compiling..\nComplete\n```\n\n### compile for generally\n\n* make static\n\n```bash\nStatic compiling..\nWarnning..\nCaution : Binary likely not working on Kernel 4.8.0-30-generic / Glibc 2.24 under version..\nComplete\n```\n\n\n### compile for debugging\n\n* make debug\n\n```bash\nSet Debug mode enviroment..\n    kernel.core_pattern=/tmp/%e.core.%u\n    kernel.suid_dumpable=1\n    fs.suid_dumpable=1\n    kernel.core_uses_pid=1\nComplete\nDebug compiling..\nComplete\n```\n\n\n## Support Parameters\n\n```bash\nUsage: cpulimit TARGET [OPTIONS...]\n  TARGET must be exactly one of these:\n      -p, --pid=N        pid of the process\n      -e, --exe=FILE     name of the executable program file\n      -P, --path=PATH    absolute path name of the executable program file\n      -L, --logpath      logfile path\n   OPTIONS\n      -l, --limit=N      percentage of cpu allowed from 0 to 100 (mandatory)\n      -v, --verbose      show control statistics\n      -z, --lazy         exit if there is no suitable target process, or if it die\n      -h, --help         display this help and exit\n      -d, --daemonize    damonization\n      -f, --fore         force run, killing prevent process with forcing muti run lock\n\n```\n\n### Madantory Parameters\n\n* -p or --pid=N : Target Process ID\n* -L or --logpath : CPULImit logfile full path\n* -l N or --limit=N : CPU Allow max usage(0 to 100) default value is 100%\n\n### Optional Parameters\n\n* -e or --exe=FILE : Executable Program File\n* -P or --path=PATH : Absolute Path anem of Excutable Program File\n* -v or --verbose : show control statistics\n* -z or --lazy : exit if there is no suitable target process or if it was die\n* -h or --help : display this help and exit\n* -d or --daemonize : damonization , if it does not use, cpulimited using foreground mode\n* -f or --force : forcing running mode , killing prevent process with forcing multiple run locking\n\n## How to Use\n\n```bash\n## find target process id\n# pgrep crond\n1234\n\n## run\n# ./cpulimit -p 1234 -l 10 -L /tmp/cpulimit.crond.log -d\n1234 is not working, please first check pid\n\n## force running when kill -9 `cpulimit` or after system shutdown or reboot or other\n# ./cpulimit -p 1234 -l 10 -L /tmp/cpulimit.crond.log -d\n# ./cpulimit -p 1234 -l 10 -L /tmp/cpulimit.crond.log -d\nAnother CPULimit daemon working.. (PID:1825), please first check it(1)\n# ./cpulimit -p 1234 -l 10 -L /tmp/cpulimit.crond.log -d -f\n\n# pgrep cpulimit\n1828\n\n# looking cpulimit log\n# tail /tmp/cpulimit.crond.log\n[2013-12-03 15:07:08 KST] Starting TARGET:1234,ME:1828,LIMIT:10\n```\n\n---\n\nMoved from bitbucket.org.\n\nAccording to Original Project's License.\n\nSee the this project based on CPULimit Project : http://cpulimit.sourceforge.net/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftorden%2Fcpulimit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftorden%2Fcpulimit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftorden%2Fcpulimit/lists"}