{"id":15704082,"url":"https://github.com/benapetr/terminator","last_synced_at":"2025-07-15T19:21:10.834Z","repository":{"id":145672626,"uuid":"10970739","full_name":"benapetr/terminator","owner":"benapetr","description":"Daemon which watches / renice or kill problematic processes","archived":false,"fork":false,"pushed_at":"2017-01-10T10:47:15.000Z","size":114,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-05-12T16:47:57.500Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","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/benapetr.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":"2013-06-26T14:54:05.000Z","updated_at":"2023-05-16T12:12:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"4b80628b-0adc-4488-be80-542d27856e1c","html_url":"https://github.com/benapetr/terminator","commit_stats":{"total_commits":79,"total_committers":2,"mean_commits":39.5,"dds":0.07594936708860756,"last_synced_commit":"59d826fe13203015a81fa242d68712b5a48e799a"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/benapetr/terminator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benapetr%2Fterminator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benapetr%2Fterminator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benapetr%2Fterminator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benapetr%2Fterminator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benapetr","download_url":"https://codeload.github.com/benapetr/terminator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benapetr%2Fterminator/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265454258,"owners_count":23768305,"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":[],"created_at":"2024-10-03T20:10:16.196Z","updated_at":"2025-07-15T19:21:10.812Z","avatar_url":"https://github.com/benapetr.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"Terminator daemon\n==================\n\nThis is a simple c++ resource watchdog service which can help you keep your system clean. It serves similar\npurposes as OOM killer, but is easier to configure and not so fatal.\n\nBasically this daemon watches your system and if any process exceeds the limits, it can be\nkilled based on preferences in order to prevent your system from crashing\n\n\nWhere it can be used\n=====================\n\nOn every server which needs to carefuly handle OOM without risk that critical service would get killed.\nYou can specify very precise conditions of which processes may be killed and which must not be,\nso that system will never get to point when kernel OOM killer start killing random processes.\n\nTerminator has 2 uses: it can watch the processes for exceeding process limits (for example 1gb of ram\nper process) and kill them if they exceed it, and it can watch the system resources and randomly\nstart killing processes when system is reaching OOM.\n\n\nBuild\n======\nYou can compile this application just by running\n\n```\ncd terminatord\nscons\n```\n\nYou need to have scons and either libprocps-dev or libproc-dev installed for it to build\n\nConfiguration\n==============\nProgram is configured using parameters, there is no configuration file, but you can create a wrapper for it\n\n -h [--help]: Display help\n\n -k [--kill]: Will kill processes if they exceed the limits, if this is not specified, the terminatord will only\n              report the processes that exceeds the limit.\n\n --quiet: Be much less verbose.\n\n --soft limit in MB: Set a soft memory limit, any process that exceed this will get killed if --kill option\n                     is provided, if not it will get reported\n\n --hard limit in MB: Set a hard memory limit, any process that exceed this will get killed with -9 option\n\n --ssoft limit in MB: Set a soft system memory limit which is a lowest possible free memory, if free memory is lower\n                      system will randomly kill processes that are causing most troubles\n\n --shard limit in MB: Set a hard system memory limit which is a lowest possible free memory, if free memory is lower\n                      system will randomly kill processes with SIGKILL that are causing most troubles\n\n --root: Kill even system processes if they exceed the limit\n\n --ignore 1,2...: Set a list of uid to ignore, separated by comma (with no spaces), processes running from any of\n                  these users will not be killed\n\n --killexec \u003cpath to executable\u003e: Will execute a command upon kill. You can use this to hook into event after process\n                                  get killed.\n\n --dry: Never kill any process this is useful when you need to test your configuration\n\n --testexec: Run a command before kill of process with parameters: \u003cpid\u003e \u003ccmd\u003e \u003cuserid\u003e \u003cmemoryused in KB\u003e \u003cmemory free in bytes\u003e\n             if this command return non zero, the process will not be killed\n\n -d: Run in a daemon mode, this is currently only supported mode and you always need to pass it in order to start\n\n -v [--verbose]: Increase verbosity\n\n\n\nExamples\n=========\n\nKill all processes that use more than 400mb of ram, except for user apache and root\n\n\n    # get uid of apache\n    grep apache /etc/passwd\n    # let's say apache is user 20, now we test it\n    terminatord -dvvv --soft 400 --hard 420 --ignore 20 --dry\n    # if everything is ok\n    terminatord -d --soft 400 --hard 420 --ignore 20 --kill\n\n\nKill random processes in case that system has less than 100mb of free ram, except for root\n\n    # test it\n    terminatord -dvvv --ssoft 100 --shard 60 --quiet --dry\n\n\nCombine both examples, in this example unlike the previous one, apache processes will not be killed,\nwhen system go OOM\n\n    # let's say apache is user 20, now we test it\n    terminatord -dvvv --soft 400 --hard 420 --ignore 20 --shard 60 --ssoft 100 --dry\n    # if everything is ok\n    terminatord -d --soft 400 --hard 420 --ignore 20 --kill --shard 60 --ssoft 100\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenapetr%2Fterminator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenapetr%2Fterminator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenapetr%2Fterminator/lists"}