Date: Tue, 4 Nov 2003 11:25:54 -0800 From: Zev Thompson <zevt@schemasoft.com> To: freebsd-questions@freebsd.org Subject: Recursive renice? Message-ID: <B55D6E30-0EFC-11D8-AABE-000A27AFDA88@schemasoft.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B55D6E30-0EFC-11D8-AABE-000A27AFDA88>