{"id":13587908,"url":"https://github.com/Saruspete/oom_manager","last_synced_at":"2025-04-08T02:34:20.577Z","repository":{"id":21812165,"uuid":"25134875","full_name":"Saruspete/oom_manager","owner":"Saruspete","description":"Script to configure and manage Linux Out-Of-Memory killer ","archived":false,"fork":false,"pushed_at":"2020-09-30T16:59:13.000Z","size":59,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-02-14T21:59:29.474Z","etag":null,"topics":["linux","memory-killer","oom","oom-manager","out-of-memory"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Saruspete.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":"2014-10-12T23:11:09.000Z","updated_at":"2024-01-03T01:35:21.000Z","dependencies_parsed_at":"2022-07-22T03:47:02.298Z","dependency_job_id":null,"html_url":"https://github.com/Saruspete/oom_manager","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Saruspete%2Foom_manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Saruspete%2Foom_manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Saruspete%2Foom_manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Saruspete%2Foom_manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Saruspete","download_url":"https://codeload.github.com/Saruspete/oom_manager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247765058,"owners_count":20992227,"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":["linux","memory-killer","oom","oom-manager","out-of-memory"],"created_at":"2024-08-01T15:06:25.206Z","updated_at":"2025-04-08T02:34:20.277Z","avatar_url":"https://github.com/Saruspete.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"OOM-Manager / javamine\n======================\n\nScript to configure and manage Linux Out-Of-Memory killer.\n\n\nFeatures\n--------\n  * **Change the oom_score parameter based on patterns**. The default score script provides the following filters :\n    * user (UserName)\n    * uid (UserID)\n    * ruid (real-UserID)\n    * pid (ProcessID)\n    * ppid (parent-ProcessID)\n    * process (process name)\n    * score (OOM-Score)\n  * **Trigger OOM at defined RAM \u0026 Swap usage**. This is particularely useful to generate an OOM before all memory is used and system is totally unresponsive\n  * **Logs all disruptive action** by default. Verbosity level configurable\n  * Management scripts runs as *root*, while scoring script runs as user *nobody*\n  * scoring script is replaceable by any application that reads stdin for processlist and outputs \n\n\nPackaging\n---------\n\nRPM Specfile is provided in *goodies/oom_manager.spec*\n\nTo build it:\n\n\t# Ensure you have the package \"rpm-build\" installed.\n\t\n\t# Create the ~/rpmbuild tree\n\trpmdev-setuptree -d\n\t\n\t# Downlad the latest version of goodies/oom_manager.spec to ~/rpmbuild/SPECS\n\twget https://raw.githubusercontent.com/Saruspete/oom_manager/master/goodies/oom_manager.spec -O ~/rpmbuild/SPECS/oom_manager.spec\n\t\n\t# If your rpmbuild version doesn't support \"source auto-download\", \n\t# download the target release from https://github.com/Saruspete/oom_manager/releases \n\t# and put it into ~/rpmbuild/SOURCES/\n\trpmbuild --undefine=_disable_source_fetch -ba ~/rpmbuild/SPECS/oom_manager.spec\n\t\n\t# Your RPM should be available in: \n\t# ~/rpmbuild/RPMS/noarch/oom_manager-*.noarch.rpm\n\t\n\nManual (non-packaged) Installation\n-----------------------------------\n\nIf you can't create a package, you can place the script as-is in /usr/local:\n\n\t# Set your target folder\n\tOOMMGR_PATH=\"/usr/local\"\n\t\n\t# Download and extract to /usr/local\n\twget https://github.com/Saruspete/oom_manager/archive/master.tar.gz -O - | tar -zxv --strip=1 -C $OOMMGR_PATH\n\t\n\t# Edit and copy the configuration to standard folder\n\techo \"PATH_BASE=$OOMMGR_PATH\" \u003e\u003e $OOMMGR_PATH/etc/sysconfig/oom_manager\n\tmv $OOMMGR_PATH/etc/sysconfig/oom_manager /etc/sysconfig/\n\t\n\t# Copy the service file depending on the system init\n\t\n\t# systemd\n\tif [[ \"$(\u003c/proc/1/comm)\" == \"systemd\" ]]; then\n\t\tfor unitpath in $(systemctl show | grep ^UnitPath|cut -d'=' -f 2-); do\n\t\t\t[[ -d $unitpath ]] || continue\n\t\t\tmv $OOMMGR_PATH/goodies/oom_manager.service $unitpath/ \u0026\u0026 \\\n\t\t\t\techo \"Copied to $unitpath\" \u0026\u0026 \\\n\t\t\t\tbreak\n\t\tdone\n\t\n\t# init-script\n\telse\n\t\tmv $OOMMGR_PATH/goodies/oom_manager.rcinit /etc/rc.d/init.d/oom_manager\n\tfi\n\t\n\t# You can now edit /etc/sysconfig/oom_manager to enable pre-oom and change its values\n\t# You should auto add the script to auto-start\n\t# systemd: systemctl enable --now oom_manager\n\t# initrc:  chkconfig --enable oom_manager\n\t\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSaruspete%2Foom_manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSaruspete%2Foom_manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSaruspete%2Foom_manager/lists"}