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 2>&1 > /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]