-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Add cli argument to limit run time #2428
Conversation
If a user is granted sudo access only to btrfsslower.py and not kill or timeout, then user is unable to limit the runtime of btrfsslower.py. The optional cli argument stops execution of program after specified number of seconds passes.
Add cli argument to limit run time
[buildbot, test this please] |
Maybe change the option from "-s" to "-d". We have a few other tools to use "-d" or "-D" to indicate the duration. Not sure whether signal handler is needed here. For example,
Not 100% precise, but should be close. Please also modify man page and example file. |
Now utilizes the timeout functionality of perf_buffer_poll() to check the time conditional every second instead of using signals.
Update btrfsslower_example.txt with optional duration parameter
Update based on shmsnoop_examples.txt
Added -d Duration based on shmsnoop.8
Added -d Duration based on shmsnoop.8
I've made changes to the implementation so that it's identical to shmsnoop and I have updated the exampls and man page. I'm not familiar with buildbot, but I'll start looking into how to run the tests. |
[buildbot, test this please] |
Please let me know if there's anything else you'd like me to add! |
[buildbot, test this please] |
Looks good. Thanks! |
If a user is granted sudo access only to btrfsslower.py and not kill or timeout, then user is unable to limit the runtime of btrfsslower.py. The optional cli argument stops execution of program after specified number of seconds passes.
If a user is granted sudo access only to btrfsslower.py and not kill or timeout, then user is unable to easily limit the runtime of btrfsslower.py. The optional cli argument stops execution of program after specified number of seconds passes.