可以觸發某字串的script - Linux
By Valerie
at 2010-06-01T09:42
at 2010-06-01T09:42
Table of Contents
如果我想用script來觸發/var/log中某些事件
舉個例子
#tail err.log
Jun 1 09:28:57 p dovecot: IMAP(vivienne):
file_dotlock_open(/var/maildir/vivienne/dovecot-uidlist) failed: Read-only
file system
Jun 1 09:28:57 p dovecot: IMAP(vivienne): open() failed with index file
/var/maildir/vivienne/dovecot.index: Read-only file system
Jun 1 09:28:57 p dovecot: IMAP(vivienne): Sending log messages too fast,
throttling..
如果有Read-only file system出現 我就執行某些動作
有用過tail -f err.log去撈Read-only file system
可是常有誤判的情形
不知道有人有寫觸發的script經驗可以分享嗎?
--
舉個例子
#tail err.log
Jun 1 09:28:57 p dovecot: IMAP(vivienne):
file_dotlock_open(/var/maildir/vivienne/dovecot-uidlist) failed: Read-only
file system
Jun 1 09:28:57 p dovecot: IMAP(vivienne): open() failed with index file
/var/maildir/vivienne/dovecot.index: Read-only file system
Jun 1 09:28:57 p dovecot: IMAP(vivienne): Sending log messages too fast,
throttling..
如果有Read-only file system出現 我就執行某些動作
有用過tail -f err.log去撈Read-only file system
可是常有誤判的情形
不知道有人有寫觸發的script經驗可以分享嗎?
--
Tags:
Linux
All Comments
By Joseph
at 2010-06-03T11:07
at 2010-06-03T11:07
Related Posts
Opera
By Harry
at 2010-05-30T18:54
at 2010-05-30T18:54
如何安裝 Android 應用程式(apk)至 Neo
By Hedwig
at 2010-05-30T17:07
at 2010-05-30T17:07
Opera
By Elvira
at 2010-05-30T15:47
at 2010-05-30T15:47
開機選單
By Rosalind
at 2010-05-30T04:01
at 2010-05-30T04:01
怎麼用USB stick安裝Fedora 13 ??
By Selena
at 2010-05-30T00:55
at 2010-05-30T00:55