RItalMan wrote:Hello enzo.
You can add the nice utility at the compilation time by modifying the default busybox configuration :
OpenWrt Package Selection > Busybox configuration > Processess Utilities > renice
Or you can simply edit the file : package/busybox/config/procps/Config.in, locate these lines :
config BUSYBOX_CONFIG_RENICE
bool "renice"
default n
help
Renice alters the scheduling priority of one or more running
processes.
and replace "default n", by "default y"
Thanks. But I recommend to make it part of the standard distribution, as I think it's an important component...
Enzo
P.S. Doesn't that include "renice" rather than "nice"? Well, anyway that would be sufficient, because this script can implement the latter through the former:
#!/bin/sh
local ADJUST=10
case "_$1" in
_)
renice 0 0 | sed -e 's/.*priority \([0-9]\+\),.*/\1/'
exit
;;
_-n)
ADJUST=$2
shift;shift
;;
_--adjustment=*)
ADJUST=${1#--adjustment=}
shift
;;
_-*)
ADJUST=${1#-}
shift
;;
esac
if expr "$ADJUST" : '[+-]\?[0-9]\+$' >/dev/null ; then
exec sh -c "renice $ADJUST \$$ >/dev/null ; exec $* "
else
echo >&2 "$(basename $0): invalid option '$ADJUST'"
exit 1
fi
(Last edited by enzo on 13 Nov 2005, 14:55)