Recursive renice?
Zev Thompson
zevt at schemasoft.com
Tue Nov 4 11:24:24 PST 2003
Hi all,
I'm curious whether there's an easy way to renice(8) a process and all
of its children in one simple command. For example, I might start a
recursive make, which spawns lots of processes, and want them all to
change priority at once.
The command I want is this:
renice +10 -r process-ID
Except for the fact that -r is not a valid flag. The pstree utility, in
the ports, seems like it might be a good start to hack this
functionality in. I searched google for "recursive renice" and found
someone had made a sed script, but it's for linux, where the pstree
output is different. Here's some example pstree output:
| \-+- 14187 zevt gmake
| \-+- 14189 zevt gmake all-recursive
| \-+- 14190 zevt /bin/sh -c set fnord ;
| \-+- 14807 zevt /bin/sh -c set fnord ;
[etc.]
Google result that's relevant:
http://mail.gnu.org/archive/html/bug-coreutils/2003-10/msg00033.html
Any hints? Thanks in advance to any answers.
Zev
More information about the freebsd-questions
mailing list