-
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
What kind of regexes are used for --prefer and --avoid, and how can I test them? #285
Comments
For reference, I'm using
|
You can see which process would have been killed by running with |
As to your question: It is a POSIX regex, earlyoom uses the regexec ( https://man7.org/linux/man-pages/man3/regexec.3.html ) function. |
To complement the advice given by rfjakob above, earlyoom --dryrun -m 99 --prefer 'Discord' (where
Note:
shows the regex, which is useful to check the shell didn't mess with your regex
shows which process is sent a sigkill, which is useful to debug your regex if need be I did not find the |
the above suggestion with an option would be very useful to test-run a regexp on all the currently running processes. something like:
which would just iterate all the currently running processes and print the matches. |
This isn't a bug in the code, just a documentation issue.
There are subtly different regex varieties out there, and I can't tell which one is being used in earlyoom for the prefer and avoid command line options. How can I verify that a program matches the prefer or avoid regex I set before launching earlyoom?
I see that there is a test function for this in the command-line test suite, but I don't know how to run it.
The text was updated successfully, but these errors were encountered: