{"id":20509598,"url":"https://github.com/lukeshirnia/oom-killer-score","last_synced_at":"2025-06-14T10:33:55.045Z","repository":{"id":98842128,"uuid":"57156927","full_name":"LukeShirnia/OOM-Killer-score","owner":"LukeShirnia","description":"Python and bash scripts to analyze all system process oom_scores and sort by the highest value (most likely to get killed)","archived":false,"fork":false,"pushed_at":"2023-02-14T14:38:00.000Z","size":6,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-13T22:35:04.958Z","etag":null,"topics":["bash","linux","oom","out-of-memory","python"],"latest_commit_sha":null,"homepage":"","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/LukeShirnia.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-04-26T19:42:28.000Z","updated_at":"2024-05-09T01:25:09.000Z","dependencies_parsed_at":"2023-03-13T15:54:00.993Z","dependency_job_id":null,"html_url":"https://github.com/LukeShirnia/OOM-Killer-score","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/LukeShirnia/OOM-Killer-score","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LukeShirnia%2FOOM-Killer-score","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LukeShirnia%2FOOM-Killer-score/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LukeShirnia%2FOOM-Killer-score/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LukeShirnia%2FOOM-Killer-score/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LukeShirnia","download_url":"https://codeload.github.com/LukeShirnia/OOM-Killer-score/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LukeShirnia%2FOOM-Killer-score/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259802542,"owners_count":22913650,"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":["bash","linux","oom","out-of-memory","python"],"created_at":"2024-11-15T20:25:38.928Z","updated_at":"2025-06-14T10:33:55.015Z","avatar_url":"https://github.com/LukeShirnia.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OOM-Killer\nHere are 2 scripts designed to asses the systems processes and their oom_score. \u003cbr\u003e\nThe oom score will dictate which process is most likely to be killed next by the kernel when oom-killer is invoked (due to low memory (ram))\n \n  \nSafest way to run the script: \u003cbr\u003e\n`git clone https://github.com/LukeShirnia/OOM-Killer-score.git` \u003cbr\u003e\n`cd OOM-Killer-score` \u003cbr\u003e\n`python score_check.py` \u003cbr\u003e\n\nTo run script:\nNote: the python script runs faster than the bash script. \u003cbr\u003e\n`curl -s https://raw.githubusercontent.com/LukeShirnia/OOM-Killer-score/master/score_check.sh | bash` \u003cbr\u003e\n`curl -s https://raw.githubusercontent.com/LukeShirnia/OOM-Killer-score/master/score_check.py | python`\n\n\nOr you can use the following bash one-liner (but again, python is quicker):\n\n `for i in $(find /proc -maxdepth 1 -type d); do if [ -f \"$i\"/oom_score ]; then printf \"$(cat \"$i\"/oom_score) \"; pid=$(echo \"$i\" | awk -F'/' '{print $3}';); if [ \"$(cat \"$i\"/oom_score)\" -ge 1 ];then printf \"$(ps -p \"$pid\" -o comm=) \"; fi; printf \"$i/oom_score \\n\"; fi; done | awk '$1 \u003e 1' | sort -nr -k1 `\n \n\n## Example output:\n\n\n```\n121 mysqld /proc/24828/oom_score\n103 rackspace-monit /proc/15168/oom_score \n94 varnishd /proc/13528/oom_score \n84 varnishd /proc/13527/oom_score \n45 php-fpm /proc/25685/oom_score \n44 php-fpm /proc/25686/oom_score \n42 php-fpm /proc/6820/oom_score \n42 php-fpm /proc/25687/oom_score \n41 php-fpm /proc/25684/oom_score \n40 php-fpm /proc/25683/oom_score \n39 php-fpm /proc/26555/oom_score \n36 php-fpm /proc/2879/oom_score \n36 php-fpm /proc/2868/oom_score \n19 php-fpm /proc/25681/oom_score \n17 firewalld /proc/529/oom_score \n16 driveclient /proc/21200/oom_score \n13 python /proc/10338/oom_score \n10 tuned /proc/871/oom_score \n9 polkitd /proc/4899/oom_score \n8 fail2ban-server /proc/13549/oom_score \n6 php-fpm /proc/25692/oom_score \n6 php-fpm /proc/25691/oom_score \n6 php-fpm /proc/25690/oom_score \n6 php-fpm /proc/25689/oom_score \n6 php-fpm /proc/25688/oom_score\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukeshirnia%2Foom-killer-score","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukeshirnia%2Foom-killer-score","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukeshirnia%2Foom-killer-score/lists"}