-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extend regex expressions to match more detailed process info via /proc/PID/cmdline #196
Comments
You can use https://github.com/hakavlad/nohang It supports multiple and flexible regex matching with cmdline, exe realpath, cwd, cgroup and other. Look at the config example https://github.com/hakavlad/nohang/blob/master/conf/nohang/nohang.conf.in |
I had a look into nohang but I did not found a way to start killing processes in the way earlyoom is doing it (if X % memory and X % swap is left start killing). To my understanding nohang can be configured only to act based on the PSI information which is to late for my point of view. |
Would be very useful to target various electron processes with |
It is default values. |
@FichteFoll How to do this with nohang |
At now regex expressions for
--avoid
and--prefer
options only match process base name, that often too short and not contain useful info.For example, all Node.js processes have
node
as basename, so there are no ways to prefer only specific node processes, not all running. Same problem withphp
processes and many other programs.So, please, allow extend regular expressions for match more detailed process information!
As I understand, earlyoom get current process info from
/proc/PID/status
file, that contain not so much info. Can we extend this info with data from/proc/PID/cmdline
?For not broke current behavior, we can add additional keys like
--prefer-cmdline
regexps.And for not reduce performance of process listener, we can make regex matches two stepped:
--prefer
, like now--prefer-cmdline
), get pids of matched processes from first step, loadcmdline
info and match it via regex.What do you think about this idea?
The text was updated successfully, but these errors were encountered: