For now I have put something like this that reaps these mails:
# Start cleanup
for i in "`ps -Cmail -o pid,etime,state|grep -v ELAPSED`"
do
PID=`echo "$i"|awk '{ print $1 }'`
ELAPSED_MINUTES=`echo "$i"|awk '{ print $2 }'|cut -d: -f1`
STATUS=`echo "$i"|awk '{ print $3 }'`
if [ $STATUS == "S" ] && [ $ELAPSED_MINUTES -gt 0 ]
then
echo "will kill $PID"
kill $PID
else
echo "will not kill $PID"
fi
done
# End cleanup
I run it every hour
On Fri, 2002-12-27 at 09:21, Tarus Balog wrote:
>
> Gusar Roman said:
>
> > I have one problem with Notifications(OpenNMS-1.1.0-1, SuSE 8.1).
> >
> > I take "ps x | grep mail":
> >
> > 25503 pts/8 SN 0:00 /bin/mail -s Notice #248: Node information
> > changed. admin@...
> > 25505 pts/8 SN 0:00 /bin/mail -s Notice #249: xx.xxx
> > ......
>
> snip
>
> > 2002-12-24 16:33:02,073 DEBUG [Thread-55] *CommandExecutor: Command
> > timed out (30 seconds)*
>
> Check the archives. This is a problem with the Java 1.4.1 JDK. I believe
> versions 1.4.0-0 to 1.4.0-2 work. There is a code fix that will be added
> in 1.1.1 and to CVS by the new year.
>
> -T
>
> --
> Tarus Balog
> Consultant
> Sortova Consulting Group, http://www.sortova.com
> +1-919-696-7625
> tarus@...
>
>
>
> _______________________________________________
> discuss mailing list (discuss@...)
> To subscribe, unsubscribe, or change your list options, go to:
> http://lists.opennms.org/mailman/listinfo/discuss
|