continued, because too long for one posting...
- - - - - - - - - - - - - -
3. dirty workaround be me:
Code:
--------------------
if [ "${START_SLIMS}" = "yes" ]
then
# set variable to an empty string if not set
if [ "${SLIMS_OPTIONS+1}" = "" ]
then
SLIMS_OPTIONS=''
fi
[...]
cd ${ssdir}/
su - slims -s /bin/sh -c "export LANG=${def_charset}; \
${ssdir}/slimserver.pl --daemon --logdir=${logdir} --prefsdir=${prefsdir}
\
${prefsoption} --pidfile=${pidfile} --logfile=${logfile} ${SLIMS_OPTIONS} \
--noimage --novideo" >> ${startlogfile} 2>> ${startlogfile}
# Restart to avoid um 100% CPU-usage
sleep 10
curl -silent -X POST -d
'{"id":0,"params":["",["restartserver"]],"method":"slim.request"}'
http://localhost:9000/jsonrpc.js
--------------------
ps ax | grep slims
Code:
--------------------
5090 ? SNs 0:20 /usr/bin/perl
/usr/local/slimserver/slimserver.pl /usr/local/slimserver/slimserver.pl
--logdir=/var/slims/log --prefsdir=/var/slims/prefs
--pidfile=/var/run/slimserver.pid --logfile=/var/slims/log/slimserver.log
--noimage --novideo
5133 pts/1 SN+ 0:00 /bin/sh /bin/grep slims
--------------------
(double "slimserver.pl" and no "--daemon" anymore)
Processor load under 2%
- - - - - - - - - - - - - -
4. modified /etc/init.d/slims not using "--daemon" but sending process
in the backround instead (the script returns nearly immediatly to the
command prompt, perhaps a sleep is nescessary at some point to avoid
collisions with other commands):
Code:
--------------------
if [ "${START_SLIMS}" = "yes" ]
then
# set variable to an empty string if not set
if [ "${SLIMS_OPTIONS+1}" = "" ]
then
SLIMS_OPTIONS=''
fi
[...]
cd ${ssdir}/
su - slims -s /bin/sh -c "export LANG=${def_charset}; \
${ssdir}/slimserver.pl --logdir=${logdir} --prefsdir=${prefsdir} \
${prefsoption} --pidfile=${pidfile} --logfile=${logfile} ${SLIMS_OPTIONS} \
--noimage --novideo" >> ${startlogfile} 2>> ${startlogfile} &
--------------------
ps ax | grep slims
Code:
--------------------
5245 pts/0 SN 0:00 su - slims -s /bin/sh -c export
LANG=de_DE.utf-8;
/usr/local/slimserver/slimserver.pl --logdir=/var/slims/log
--prefsdir=/var/slims/prefs
--pidfile=/var/run/slimserver.pid --logfile=/var/slims/log/slimserver.log
--noimage --novideo
5254 ? SNs 0:00 -sh -c export LANG=de_DE.utf-8;
/usr/local/slimserver/slimserver.pl --logdir=/var/slims/log
--prefsdir=/var/slims/prefs
--pidfile=/var/run/slimserver.pid --logfile=/var/slims/log/slimserver.log
--noimage --novideo
5271 ? SN 0:11 /usr/bin/perl /usr/local/slimserver/slimserver.pl
--logdir=/var/slims/log --prefsdir=/var/slims/prefs
--pidfile=/var/run/slimserver.pid --logfile=/var/slims/log/slimserver.log
--noimage --novideo
5305 pts/1 SN+ 0:00 /bin/sh /bin/grep slims
--------------------
When deleting those additional spaces in the command I get a more user
readable
Code:
--------------------
6172 pts/0 SN 0:00 su - slims -s /bin/sh -c export
LANG=de_DE.utf-8; /usr/local/slimserver/slimserver.pl --logdir=/var/slims/log
--prefsdir=/var/slims/prefs --pidfile=/var/run/slimserver.pid
--logfile=/var/slims/log/slimserver.log --noimage --novideo
6181 ? SNs 0:00 -sh -c export LANG=de_DE.utf-8;
/usr/local/slimserver/slimserver.pl --logdir=/var/slims/log
--prefsdir=/var/slims/prefs --pidfile=/var/run/slimserver.pid
--logfile=/var/slims/log/slimserver.log --noimage --novideo
6198 ? RN 0:07 /usr/bin/perl /usr/local/slimserver/slimserver.pl
--logdir=/var/slims/log --prefsdir=/var/slims/prefs
--pidfile=/var/run/slimserver.pid --logfile=/var/slims/log/slimserver.log
--noimage --novideo
6232 pts/1 SN+ 0:00 /bin/sh /bin/grep slims
--------------------
(despite the two additional processes slimserver can still be stopped
correctly using /etc/init.d/slims stop)
Processor load 2%
- - - - - - - - - - - - - -
I've also tried Michaels suggestion without any extra spaces in line 170
and following, but without success, Processor load still at 100%.
So, ist really seems that there is a bug in the "--daemon" option. But
I'm really not qualified / skilled enough to go into the depth of
slimserver.pl myself.
Greetings
René
- - - - - - - - - - - - - -
------------------------------------------------------------------------
hanker's Profile: http://forums.slimdevices.com/member.php?userid=52397
View this thread: http://forums.slimdevices.com/showthread.php?t=105987
_______________________________________________
Squeezecenter mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/squeezecenter