| Crates.io | preoomkiller |
| lib.rs | preoomkiller |
| version | 0.1.0 |
| created_at | 2017-01-23 03:35:30.345571+00 |
| updated_at | 2021-11-02 03:04:52.691353+00 |
| description | Softly kills your process with SIGTERM before it runs out of memory. |
| homepage | https://github.com/grosser/preoomkiller |
| repository | |
| max_upload_size | |
| id | 8190 |
| size | 14,522 |
Softly kills your process with SIGTERM before it runs out of memory.
/sys/fs/cgroup/memory/memory.usage_in_bytes and /sys/fs/cgroup/memory/memory.statWritten in Rust to consume minimal resources.
Version: 0.1.0
Download the binary you need from target/your-arch or cargo install preoomkiller.
Usage: target/debug/preoomkiller [options] args
Options:
-m, --max-memory-file PATH
set file to read maximum memory from, default:
/sys/fs/cgroup/memory/memory.stat
-u, --used-memory-file PATH
set file to read used memory from, default:
/sys/fs/cgroup/memory/memory.usage_in_bytes
-i, --interval SECONDS
how often to check memory usage, default: 1
-p, --percent PERCENT
maximum memory usage percent, default: 90
-h, --help print this help menu
-v, --version show version
cargo buildTested with Ruby to have readable / expressive tests.
gem install bundler ... needs ruby installedbundlebundle exec rakebundle exec rake bump:patchbundle exec rake releaseregex dependency by splitting string and searching manuallyrake bump release for multiple targets and commit all changes--signal option ... support numbers and ideally USR1 etc words--restart option to not kill but restart ... maybe don't since this is tricky / needs a limit