rtprio + su - doesn't work
Chuck Swiger
cswiger at mac.com
Fri Aug 22 00:28:22 UTC 2008
On Aug 21, 2008, at 2:04 PM, Wojciech Puchar wrote:
> i run such command
>
> /usr/sbin/rtprio 31 /usr/bin/su centrala -c \
> "/usr/local/bin/asterisk -C /centrala/etc/asterisk.conf"
>
> tu run (at startup) asterisk PBX as user centrala with realtime
> priority.
>
> asterisk is started, but without realtime priority.
Yes, you'd be running the su process with realtime priority. :-)
> how to do this right?
>
> i run asterisk as user (not root), but this server is used to other
> things, so asterisk must have absolute priority over other things.
> now i have to do this manually by searching for asterisk's PID and
> doing
>
> rtprio 31 -PID
Well, you have to run rtprio as root, or else make it setuid-root
(which probably isn't a great idea). Presumably this thing has a
startup script which runs it, and it probably creates a PID file
under /var/run which you could use to adjust the priority during
system startup via:
rtprio 31 -`cat /var/run/asterix.pid`
--
-Chuck
More information about the freebsd-questions
mailing list