Gentoo Archives: gentoo-user

From: Joseph <syscon@×××××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] asterisk_nice -5
Date: Fri, 05 Aug 2005 22:55:05
Message-Id: 1123282255.8239.30.camel@sysconcept.ca
In Reply to: Re: [gentoo-user] asterisk_nice -5 by martin nicolas
1 Here is how to script ends and asterisk is started from this command:
2
3 fi
4 start-stop-daemon --start --exec /usr/sbin/asterisk \
5 ${OPTS} -- ${ASTERISK_OPTS}
6
7 I've change it to:
8 fi
9 start-stop-daemon --start --exec /usr/bin/nice -n
10 -15 /usr/sbin/asterisk \
11 ${OPTS} -- ${ASTERISK_OPTS}
12
13 Doesn't matter what value I use it "-n -5" or "-n -15" asterisk runs at
14 nice value 10 instead of -5 or -15.
15
16 --
17 #Joseph
18
19 On Sat, 2005-08-06 at 00:14 +0200, martin nicolas wrote:
20 > Hi.
21 > There is a configuration file for this script in /etc/conf.d/ ?
22 > Maybe in this file there is a vrarible that specify the value of
23 > ASTERISK_NICE
24 >
25 > On 8/5/05, Joseph <syscon@×××××××××.com> wrote:
26 > Can any body give am a helping hand how to modify asterisk
27 > startup
28 > script to start it with let say nice -5
29 > I think I'll need to modify something in the beginning in this
30 > section,
31 > but I don't exactly know how.
32 >
33 > depend() {
34 > need net
35 > use zaptel
36 > }
37 >
38 > start() {
39 > local OPTS USER GROUP
40 >
41 > if [[ -n "${ASTERISK_NICE}" ]]; then
42 > if [[ ${ASTERISK_NICE} -ge -20 ]] && \
43 > [[ ${ASTERISK_NICE} -le 19 ]]; then
44 > OPTS="--nicelevel ${ASTERISK_NICE}"
45 > else
46 > eerror "Nice value must be between -20
47 > and 19"
48 > fi
49 >
50 > Asterisk run at the same nice level "0" as apache and when the
51 > fax comes
52 > in sometimes I get a lot of bad lines.
53 > So, adjusting nice level to -5 for asterisk might help.
54 > Asterisk intercept faxes and forwards it to a fax extension.
55 >
56 > --
57 > #Joseph
58 > --
59 > gentoo-user@g.o mailing list
60 >
61 >
62 >
63 >
64 > --
65 > Nicolas
66
67 --
68 gentoo-user@g.o mailing list