Mailing List Archive

script to copy kern.log to another partition upon OOM

I want to copy /var/log/kern.log to another partition (which is persistent)
upon OOM.

I am adding the following line in rsyslog.conf but the script is not kicked
off. What might be the possible reasons? Any tips on how I can debug this?

+:msg, contains, "Out of memory..." ^/usr/local/bin/

cp /var/log/kern.log /data/kern.log

rsyslog mailing list
What's up with rsyslog? Follow
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE THAT.