Bug#306579: clamav-freshclam: does not use --quiet option within cron script
Stephen Gran a écrit : This one time, at band camp, KaalH! said: Stephen Gran a ecrit : This one time, at band camp, KaalH! said: you may use /usr/bin/freshclam --quiet instead of /usr/bin/freshclam /dev/null within cron script. No, that will miss warning messages. This decision was made on purpose. Is there a reason you want it changed? yes, freshclam jobs sometimes hang after an update (once or twice a day with hourly run). I'm using runit to run cron ( cron -f -l ). on another host with the --quiet option, got no hanged freshclam for 2 days. don't know if it's related, but seems better. Redirection of output seems hardly likely to hang a process. Does this other host that doesn't hang use runit? yes. I'm using vservers, the other host is a copy running on the same machine. You see, what's going on is that there are 4 categories of messages output by freshclam error goes to stderr warning goes to stderr info goes to stdout verbose goes to stdout You only get verbose messages if you run -v Using --quiet suppresses info and warning messages. So the only way to get warning and error is redirect stdout to /dev/null, but retain the stderr stream, and not use --quiet. This is actually fairly standard practice - take a look at logrotate scripts and the like. They frequently contain /etc/init.d/foo reload /dev/null hum, you're right about the standard practice, but isn't invoke-rc.d --quiet foo reload /dev/null better ? I think ...freshclam /dev/null redirect stdout only, and ...freshclam 21 /dev/null redirect stderr to stdout to /dev/null, am I wrong ? as a postrotate script. If you are getting ahngs in freshclam, there is either a problem with freshclam itself, or with the envirnment calling it. An investigation in that direction seems in order. The redirection of output itself seems unlikely to cause any harm, unless there is something wierd with your environment. yes, smthg may be broken. I'm testing for several days, and the --quiet really makes a difference, even if I don't know exactly why. what about ...freshclam --quiet /dev/null ? -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#306579: clamav-freshclam: does not use --quiet option within cron script
This one time, at band camp, KaalH! said: Stephen Gran a écrit : hum, you're right about the standard practice, but isn't invoke-rc.d --quiet foo reload /dev/null better ? I think ...freshclam /dev/null redirect stdout only, and ...freshclam 21 /dev/null redirect stderr to stdout to /dev/null, am I wrong ? That is correct. as a postrotate script. If you are getting ahngs in freshclam, there is either a problem with freshclam itself, or with the envirnment calling it. An investigation in that direction seems in order. The redirection of output itself seems unlikely to cause any harm, unless there is something wierd with your environment. yes, smthg may be broken. I'm testing for several days, and the --quiet really makes a difference, even if I don't know exactly why. what about ...freshclam --quiet /dev/null ? Again, that misses warning messages. --quiet eliminates messages at level verbose, normal, and warning. I would like the admin to see messages at level warning and error. Since warning and error level messages go to stderr, the script only needs to throw away stdout in order to achieve the desired effect. You say you're on a vserver - do you not have /dev/null, or is it inaccessible to you? That would be odd, but I suppose it's possible. -- - | ,''`.Stephen Gran | | : :' :[EMAIL PROTECTED] | | `. `'Debian user, admin, and developer | |`- http://www.debian.org | - pgpoKy0s0YzAn.pgp Description: PGP signature
Bug#306579: clamav-freshclam: does not use --quiet option within cron script
Stephen Gran a écrit : This one time, at band camp, KaalH! said: Stephen Gran a écrit : hum, you're right about the standard practice, but isn't invoke-rc.d --quiet foo reload /dev/null better ? I think ...freshclam /dev/null redirect stdout only, and ...freshclam 21 /dev/null redirect stderr to stdout to /dev/null, am I wrong ? That is correct. as a postrotate script. If you are getting ahngs in freshclam, there is either a problem with freshclam itself, or with the envirnment calling it. An investigation in that direction seems in order. The redirection of output itself seems unlikely to cause any harm, unless there is something wierd with your environment. yes, smthg may be broken. I'm testing for several days, and the --quiet really makes a difference, even if I don't know exactly why. what about ...freshclam --quiet /dev/null ? Again, that misses warning messages. --quiet eliminates messages at level verbose, normal, and warning. I would like the admin to see messages at level warning and error. Since warning and error level messages go to stderr, the script only needs to throw away stdout in order to achieve the desired effect. You say you're on a vserver - do you not have /dev/null, or is it inaccessible to you? That would be odd, but I suppose it's possible. Got it ! freshclam hang was related to clamd notification, googling tell about softlimit trouble with clamd. I'm actually running clamd with exec chpst -uclamav -m 4000 /usr/sbin/clamd, i will increase this limit and see what happends. I'm surprising getting trouble with limit to 4000 bytes for just virus database update notification ( no scanning activity, these are hopfully dev vservers). differences between my vservers were due to mistaking clamav database files permissions, sorry about the noise and thank you for your time, please close this bug. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Bug#306579: clamav-freshclam: does not use --quiet option within cron script
Stephen Gran a crit: This one time, at band camp, KaalH! said: you may use "/usr/bin/freshclam --quiet" instead of " /usr/bin/freshclam /dev/null" within cron script. No, that will miss warning messages. This decision was made on purpose. Is there a reason you want it changed? yes, freshclam jobs sometimes hang after an update (once or twice a day with hourly run). I'm using runit to run cron ( cron -f -l ). on another host with the --quiet option, got no hanged freshclam for 2 days. don't know if it's related, but seems better. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug#306579: clamav-freshclam: does not use --quiet option within cron script
This one time, at band camp, KaalH! said: Stephen Gran a ecrit : This one time, at band camp, KaalH! said: you may use /usr/bin/freshclam --quiet instead of /usr/bin/freshclam /dev/null within cron script. No, that will miss warning messages. This decision was made on purpose. Is there a reason you want it changed? yes, freshclam jobs sometimes hang after an update (once or twice a day with hourly run). I'm using runit to run cron ( cron -f -l ). on another host with the --quiet option, got no hanged freshclam for 2 days. don't know if it's related, but seems better. Redirection of output seems hardly likely to hang a process. Does this other host that doesn't hang use runit? You see, what's going on is that there are 4 categories of messages output by freshclam error goes to stderr warning goes to stderr info goes to stdout verbose goes to stdout You only get verbose messages if you run -v Using --quiet suppresses info and warning messages. So the only way to get warning and error is redirect stdout to /dev/null, but retain the stderr stream, and not use --quiet. This is actually fairly standard practice - take a look at logrotate scripts and the like. They frequently contain /etc/init.d/foo reload /dev/null as a postrotate script. If you are getting ahngs in freshclam, there is either a problem with freshclam itself, or with the envirnment calling it. An investigation in that direction seems in order. The redirection of output itself seems unlikely to cause any harm, unless there is something wierd with your environment. -- - | ,''`.Stephen Gran | | : :' :[EMAIL PROTECTED] | | `. `'Debian user, admin, and developer | |`- http://www.debian.org | - pgpjiB8iylkZS.pgp Description: PGP signature
Bug#306579: clamav-freshclam: does not use --quiet option within cron script
This one time, at band camp, KaalH! said: you may use /usr/bin/freshclam --quiet instead of /usr/bin/freshclam /dev/null within cron script. No, that will miss warning messages. This decision was made on purpose. Is there a reason you want it changed? -- - | ,''`.Stephen Gran | | : :' :[EMAIL PROTECTED] | | `. `'Debian user, admin, and developer | |`- http://www.debian.org | - pgpfZeidObyOc.pgp Description: PGP signature