On Mon, Oct 18, 2010 at 1:32 PM, Kyle Spencer <[email protected]> wrote:
> Hi Richard, > > One way is to use something like Nagios to monitor the "last-modified" > time/date of Squid's access.log. If the file hasn't been updated/modified > within, say, 30 minutes, Nagios considers that a problem and restarts the > daemon. If doing things this way, be sure to take night-time activity (if > any) into account when you set the "problem" number. > > The alternative to what Kyle just offered is to use SNMP with NAGIOS to handle the restarting. With snmptraps, you can automagically start up squid if it goes down. But before you get into all that, try find out why it going dead... You did not mention what OS you were running this on, but something like this should help you start looking into why: squid-server# script -a -k /var/log/squid.debug squid-server# gdb squid GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-marcel-freebsd"...(no debugging symbols found)... (gdb) run < It will dump a whole lot of things on screen. But dont worry about it, the 'script' command above will capture everything in that session and send it to squid.debug file. When squid dies out, type this> (gdb) bt It will give you a backtrace and point out what went wrong. This information can then help you out in solving your problem, or you can submit a bug report to the squid-dev team for them to figure it out. PS: No to loose your session, using the screen utility can ensure that you log out and when you log back in, can resume the session. squid-server# screen It should provide you a terminal within a terminal. To exit without loosing your session, CTRL+A,D. Press CTRL hold it down and press 'a', release and then press d. This logs you out of the screen session. To resume the screen session; squid-server# screed -rd have fun tracing the fault. -- Mike Of course, you might discount this possibility, but remember that one in a million chances happen 99% of the time. ------------------------------------------------------------
_______________________________________________ LUG mailing list [email protected] http://kym.net/mailman/listinfo/lug LUG is generously hosted by INFOCOM http://www.infocom.co.ug/ All Archives can be found at http://www.mail-archive.com/[email protected]/ The above comments and data are owned by whoever posted them (including attachments if any). The List's Host is not responsible for them in any way. ---------------------------------------
