Multiple instances of squeezeboxserver_safe happen at least (ie may also
happen other times) after my script has detected a CPU hogging problem.
The other morning (2am) it did this three or 4 times in a row (3 minutes
apart) Im now thinking its possibly another red herring as I think the
restart command fails to complete within 3 minutes as SB is taking
100%CPU. So if another restart is issued before the last one completed
(and it may never complete I guess) that might cause the multiple _safe
instances? But not have anything to do with the CPU hogging. 

For the record, the script (via sudo cron, */3) looks like this, and
reliably detects when SB is unreponsive as experenced by end users (ie
SB disconnect, script runs and usually successfull restarts SB :


Code:
--------------------
    
  wget --timeout=5 --tries=1 --spider http://192.168.4.80:9000 1>/tmp/zzsbmon 
2>/tmp/zzsbmon
  sbstat=$(grep "200 OK" /tmp/zzsbmon | wc -w)
  
  if [ $sbstat -eq 0 ]
  then
  zz=$(tail -n 50 /var/log/squeezeboxserver/server.log)
  echo "Squeezebox (LtMediaServer)  needed restarting, log was :  \n \n $zz" | 
mailx -v -s "SB restarted $(date)" [email protected]
  service logitechmediaserver restart
  fi
  
--------------------
 


> 
> Then let us see the output of:
> > 
Code:
--------------------
  >   > 
  > # chkconfig --list | sort | grep "[1-5]:on"
  > 
--------------------
> > 

which looks like this :


Code:
--------------------
    
  acpi-support              0:off  1:off  2:on   3:on   4:on   5:on   6:off
  apache2                   0:off  1:off  2:on   3:on   4:on   5:on   6:off
  dns-clean                 0:off  1:on   2:on   3:on   4:on   5:on   6:off
  grub-common               0:off  1:off  2:on   3:on   4:on   5:on   6:off
  kerneloops                0:off  1:off  2:on   3:on   4:on   5:on   6:off
  killprocs                 0:off  1:on   2:off  3:off  4:off  5:off  6:off
  logitechmediaserver       0:off  1:off  2:on   3:on   4:on   5:on   6:off
  ondemand                  0:off  1:off  2:on   3:on   4:on   5:on   6:off
  postfix                   0:off  1:off  2:on   3:on   4:on   5:on   6:off
  pppd-dns                  0:off  1:on   2:on   3:on   4:on   5:on   6:off
  pulseaudio                0:off  1:off  2:on   3:on   4:on   5:on   6:off
  rc.local                  0:off  1:off  2:on   3:on   4:on   5:on   6:off
  rsync                     0:off  1:off  2:on   3:on   4:on   5:on   6:off
  saned                     0:off  1:off  2:on   3:on   4:on   5:on   6:off
  speech-dispatcher         0:off  1:off  2:on   3:on   4:on   5:on   6:off
  sudo                      0:off  1:off  2:on   3:on   4:on   5:on   6:off
  vboxballoonctrl-service   0:off  1:off  2:on   3:on   4:on   5:on   6:off
  vboxdrv                   0:off  1:off  2:on   3:on   4:on   5:on   6:off
  vboxtoolinit              0:off  1:off  2:on   3:on   4:on   5:on   6:off
  vboxweb-service           0:off  1:off  2:on   3:on   4:on   5:on   6:off
  winbind                   0:off  1:off  2:on   3:on   4:on   5:on   6:off
  
--------------------



> 
> You might try seeing if there is a correlation between your freeze-up
> times and cron activity:
> 

On the suggestion for CRON, I took a look at various entries, but all I
see is my SB monitoring job and the occasional other backup script of
mine but nowhere near the time of failure. For example, the last time a
SBserver CPU hogging was detected, it was on 18th at 08:44 when syslog
looked like this :


Code:
--------------------
    
  Jul 18 08:18:01 Gonzalez CRON[9297]: (root) CMD (/home/colic/scripts/sbmon)
  Jul 18 08:20:01 Gonzalez CRON[9526]: (root) CMD (/home/colic/scripts/sbmon)
  Jul 18 08:22:01 Gonzalez CRON[9751]: (root) CMD (/home/colic/scripts/sbmon)
  Jul 18 08:24:01 Gonzalez CRON[9980]: (root) CMD (/home/colic/scripts/sbmon)
  Jul 18 08:26:01 Gonzalez CRON[10204]: (root) CMD (/home/colic/scripts/sbmon)
  Jul 18 08:28:01 Gonzalez CRON[10429]: (root) CMD (/home/colic/scripts/sbmon)
  Jul 18 08:30:01 Gonzalez CRON[10658]: (root) CMD (/home/colic/scripts/sbmon)
  Jul 18 08:32:01 Gonzalez CRON[10886]: (root) CMD (/home/colic/scripts/sbmon)
  Jul 18 08:34:02 Gonzalez CRON[11114]: (root) CMD (/home/colic/scripts/sbmon)
  Jul 18 08:36:01 Gonzalez CRON[11339]: (root) CMD (/home/colic/scripts/sbmon)
  Jul 18 08:38:01 Gonzalez CRON[11577]: (root) CMD (/home/colic/scripts/sbmon)
  Jul 18 08:40:01 Gonzalez CRON[11785]: (root) CMD (/home/colic/scripts/sbmon)
  Jul 18 08:44:01 Gonzalez CRON[12315]: (root) CMD (/home/colic/scripts/sbmon)
  Jul 18 08:48:01 Gonzalez CRON[12450]: (root) CMD (/home/colic/scripts/sbmon)
  Jul 18 08:52:01 Gonzalez CRON[12467]: (root) CMD (/home/colic/scripts/sbmon)
  Jul 18 08:56:01 Gonzalez CRON[12570]: (root) CMD (/home/colic/scripts/sbmon)
  Jul 18 09:00:01 Gonzalez CRON[12770]: (root) CMD (/home/colic/scripts/sbmon)
  Jul 18 09:04:10 Gonzalez CRON[12825]: (root) CMD (/home/colic/scripts/sbmon)
  Jul 18 09:08:02 Gonzalez CRON[12989]: (root) CMD (/home/colic/scripts/sbmon)
  Jul 18 09:12:01 Gonzalez CRON[13000]: (root) CMD (/home/colic/scripts/sbmon)
  Jul 18 09:16:01 Gonzalez CRON[13016]: (root) CMD (/home/colic/scripts/sbmon)
  Jul 18 09:17:01 Gonzalez CRON[13027]: (root) CMD (   cd / && run-parts 
--report /etc/cron.hourly)
  
--------------------


Nothing suspicious that I can see Im afraid? 

Im wondering if I should turn on SB logging debug, although its a shot
in the dark because the output traffic is huge, and it may be nothing to
do with any of them?

Thanks for all your help - I consider myself reasonably technically
competent (but not in a refined way :-)), but this one has me stumped.


------------------------------------------------------------------------
Slates's Profile: http://forums.slimdevices.com/member.php?userid=47333
View this thread: http://forums.slimdevices.com/showthread.php?t=95579

_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix

Reply via email to