On Monday 12 April 2004 22:18, you wrote: > Hi, > > On Mon, Apr 12, 2004 at 10:23:48AM -0400, Jesse Guardiani wrote: > > Sure. Here's mine: > > Before I comment on your, can you tell why this won't work. > > set daemon 120 > set alert payal > > check process clamd > with pidfile "/var/run/clamd.pid" > start program "/usr/local/sbin/clamd"
Is that actually the location of your pid file? Do you have pid file creation enabled in your clamav.conf? What messages do you get in your logs? Have you tried running the monit daemon with -v (verbose) and see what that does? > > start program = "/usr/local/bin/clamdctl start" > > Where did you get this clamdctl? Or did you make it yourself? I made it myself and the ClamAV people have been kind enough to include it in the base ClamAV distro. You can find it here: http://www.clamav.net/doc/0.70/clamd_supervised/clamd-daemontools-guide.txt > > if failed unixsocket /tmp/clamd > > send "VERSION\r\n" > > expect "clamd / ClamAV.*" > > then restart > > OT, but what does this part do, if you have time please tell from shell > programming point of view. A quick look at the monit manual here: http://www.tildeslash.com/monit/monit.html#connection_testing Will go a long way toward explaining what the above does. But in plain english it basically opens the UNIX socket /tmp/clamd and writes the text "VERSION\r\n" (without the quotes). It then expects the clamd daemon to return something that matches the regular expression "clamd / ClamAV.*" (again, without the quotes). If clamd doesn't return the expected result or if the 5 second default Monit timeout is reached then monit will restart the clamd daemon. This protects against the worst sort of clamd failure where the daemon will HANG, but fail to terminate. > > if memory is greater than 30% then restart > > if loadavg(1min) is greater than 10.0 then restart > > alert [EMAIL PROTECTED] > > Why is this necessary? Because the versions of clamd that I run (CVS releases, mostly) can be quite buggy. Sometimes they leak memory. Sometimes they start chewing up CPU. Both are undesirable, and this remedies the problem. > Thanks a lot for the mail. You're welcome. Good luck! > With warm regards, > -Payal -- Jesse Guardiani, Systems Administrator WingNET Internet Services, P.O. Box 2605 // Cleveland, TN 37320-2605 423-559-LINK (v) 423-559-5145 (f) http://www.wingnet.net ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Qmail-scanner-general mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/qmail-scanner-general