Mailing List Archive

script to copy kern.log to another partition upon OOM
Hi,

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?

rsyslog.conf
+:msg, contains, "Out of memory..." ^/usr/local/bin/test.sh
+

test.sh
#!/bin/bash

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

thanks!
_______________________________________________
rsyslog mailing list
https://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
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.