On Mon, Jun 08, 2009 at 03:56:48PM +0100, Gaby Vanhegan wrote: > I have a machine that is running 4.3 bsd.mp, MySQL and one single site > of PHP scripts which keep crashing. The frustrating thing is that it > doesn't panic the kernel so I can't get any DDB output, the machine > just locks up. Looking at it over the KVM it just shows the login > prompt with the cursor flashing but not responding. <SNIP> > Any suggestions about how I can try and figure out what's killing it?
My guess would be since you mention 4.3 and Apache, that you are running out of amap. $ vmstat -m | grep '^ *UVM amap' Compare MemUse to the Limit. Since updating to 4.5 I haven't had the problem. This worked for Nagios. * * * * * /usr/local/libexec/nagios/check_amap > /dev/null || /home/andrew/apachectl stop wait start #!/bin/sh . /usr/local/libexec/nagios/utils.sh _sizes=`vmstat -m | awk '/^ *UVM amap/ { gsub("K", " "); print $4 " " $6}'` _free=`dc -e "5 k ${_sizes} sm sc lm lc - lm / 100 * f" | sed -e 's/\.*0*$//'` if [ ${_free%.*} -lt 25 ]; then echo WARNING: less than 25% amap free [${_free}%]! exit $STATE_WARNING fi if [ ${_free%.*} -lt 10 ]; then echo CRITICAL: less than 10% amap free [${_free}%]! exit $STATE_CRITICAL fi echo OK: [${_free}%] free exit $STATE_OK and you probably need $ diff -u /usr/sbin/apachectl apachectl --- /usr/sbin/apachectl Tue May 5 21:44:28 2009 +++ apachectl Wed Nov 19 09:49:28 2008 @@ -153,6 +153,19 @@ fi fi ;; + wait) + echo -n "$0 $ARG: " + while [ $RUNNING -eq 1 ]; do + if kill -0 $PID 2>/dev/null ; then + #echo -n . + sleep 1 + else + STATUS="httpd (pid $PID) not running" + RUNNING=0 + fi + done + echo ' httpd stopped' + ;; status) $LYNX $STATUSURL | awk ' /process$/ { print; exit } { print } ' ;; l8rZ, -- andrew - ICQ# 253198 - Jabber: and...@rraz.net BOFH excuse of the day: Our ISP is having {switching,routing,SMDS,frame relay} problems