re-nice processes basing on custom rules
Project description
petique
petique adjusts nice, ionice and OOM adjust score of processes based on custom rules defined in a config file.
Configuration
Configuration is a TOML file consisting of independant rules:
[vlc] # rule name, name is only significant to you
name = "vlc" # regular expression, matches process name
nice = 10 # when rule is matched, sets nice of process to 10
# nice can go from -20 (most prioritary) to 19 (least prioritary)
# though only root can set negative values
# see `nice(1)` manual page
[borg]
exe = "/usr/bin/borg" # regular expression, matches binary path
ionice = "idle" # when rule is matched, sets ionice of process to "idle" mode
# ionice values can be "b1" to "b7" (best-effort, from more prioritary to least prioritary)
# or "idle" (even less prioritary than b7) or "rt" (real-time, high-priority, only for root user)
# see `ionice(1)` manual page
[firefox_tab]
cmdline = ".*firefox -contentproc.*" # regular expression, matches full command line with args
oom_adj = 1000 # when rule is matched, sets oom adjust of process to 1000
# oom_adj can be from -1000 (immune against OOM-killer) to 1000 (more likely to be killed)
# see `choom(1)` manual page
Rules match processes based on their process name, binary or full command-line, and adjust nice, ionice or oom-adjust score.
Run petique --list to see all processes and their name, exe, cmdline. This is handy for writing rules patterns.
Usage
petique [-n | --dry-run] [-v | --verbose] [--rule NAME] [--config FILE]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file petique-0.1.0.tar.gz.
File metadata
- Download URL: petique-0.1.0.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e426272640a79f19309a6e929139d48fcd3585fb16639839686d75522c4ac000
|
|
| MD5 |
ee64fedb26903d9dd61539ac607c74c6
|
|
| BLAKE2b-256 |
e0f81c57d07a08314e5875b29e8ca33978259f0f9488668ffa2b64f37b201b39
|
File details
Details for the file petique-0.1.0-py3-none-any.whl.
File metadata
- Download URL: petique-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
904a053a4108f4b295d299b7f128b5d68a958178e2094e8856184331cd6bf436
|
|
| MD5 |
6301c1369716def7f5552f7e805acd69
|
|
| BLAKE2b-256 |
dcd3c36f3e77d0b684f14f7bf9f324e890bf6e145845b32153e8f171b6398693
|