LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 09-05-2010, 10:24 PM   #1
Glenn D.
Member
 
Registered: May 2009
Location: ACT - Australia
Distribution: Opensuse x86_64 (Latest)
Posts: 62

Rep: Reputation: 16
How do I scan dmesg contonusly for warning or fatal messages


Hello,
- How do I scan dmesg continuously for warning or fatal messages and mail the lines containing the errors to someone.
- I presume a script can be used.
- How can this process involked at system startup ?
Thanks
 
Old 09-05-2010, 11:11 PM   #2
florenceit
LQ Newbie
 
Registered: Jul 2010
Location: MA
Distribution: was buggy ubuntu 10.04 LTS, now happy with MINT
Posts: 13

Rep: Reputation: 0
I can help with the scanning part at least:

tail -f /var/log/yourlog | grep "errorcode to lookfor" > output.txt

(or something VERY similar to above..) lookup above commands for exact syntax and examples.

I'm sure theres a way to grab that file when theres a change, if theres not a command for it its probably more advanced scripting than I can help with. I do email out log files to myself using a "mail" command after similar setup as above logs program output (backups, etc).
matt
 
Old 09-06-2010, 01:15 AM   #3
goldenbarb
Member
 
Registered: Aug 2010
Distribution: Fedora, Centos, Debian
Posts: 49

Rep: Reputation: 7
Code:
grep -i '(warning|error|fatal|something)' /var/log/messages | mail -s error_logs your@address.com
Besides you can set up logwatch.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Frightening DMESG messages kinetik Linux - General 8 02-07-2007 07:39 AM
PCI Warning on dmesg crud Slackware 1 06-07-2005 01:15 PM
Getting Messages Before Dmesg LinuxGeek Linux - Software 2 01-18-2005 07:10 AM
Boot messages not showing in dmesg... Nu-Bee Linux - General 4 01-25-2004 01:49 PM
Bootup messages not in dmesg? oneandoneis2 Slackware 3 01-05-2004 03:52 PM


All times are GMT -5. The time now is 12:34 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration