BLU Discuss list archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Discuss] Corralling Processes on Linux
- Subject: [Discuss] Corralling Processes on Linux
- From: kentborg at borg.org (Kent Borg)
- Date: Sat, 20 Jan 2018 16:42:01 -0500
- In-reply-to: <20180120210934.GH25482@angus.ind.wpi.edu>
- References: <054a4346-ed8c-4df7-a444-823b3f269c6c@borg.org> <20180120210934.GH25482@angus.ind.wpi.edu>
On 01/20/2018 04:09 PM, Chuck Anderson wrote: > systemd has a few features which might work well for your use case: > https://linuxaria.com/article/how-to-manage-processes-with-cgroup-on-systemd > To heck with systemd, it looks like control groups will do the trick! ?- create a control group, details about all the switches unclear but this seems to at least come close: sudo cgcreate -t kentborg:kentborg -g cpu:foogroup?? # Yes, root needs to do that, but it's one-off (per boot?). ?- create my processes in that group: $ cgexec -g cpu:foogroup watch ls & ??? [1] 16137 ??? $ cgexec -g cpu:foogroup watch ps & ??? [2] 16162 ?- Find them in a pseudo file: ??? $ cat /sys/fs/cgroup/cpu/foogroup/tasks ??? 16137 ??? 16162 ?- fg and kill one, check again: ??? $ cat /sys/fs/cgroup/cpu/foogroup/tasks ??? 16137 Cool! Thanks, -kb P.S. Less important, but could be useful: Anyone know if Mac OS has something like this?
- Follow-Ups:
- [Discuss] Corralling Processes on Linux
- From: kentborg at borg.org (Kent Borg)
- [Discuss] Corralling Processes on Linux
- References:
- [Discuss] Corralling Processes on Linux
- From: kentborg at borg.org (Kent Borg)
- [Discuss] Corralling Processes on Linux
- From: cra at WPI.EDU (Chuck Anderson)
- [Discuss] Corralling Processes on Linux
- Prev by Date: [Discuss] Corralling Processes on Linux
- Next by Date: [Discuss] Corralling Processes on Linux
- Previous by thread: [Discuss] Corralling Processes on Linux
- Next by thread: [Discuss] Corralling Processes on Linux
- Index(es):