1833776 Members
2317 Online
110063 Solutions
New Discussion

Re: dmesg

 
SOLVED
Go to solution
MikeL_4
Super Advisor

dmesg

Is there a way for dmesg to ignore certain messages ??

I have some database file systems that are always 100% full, and dmesg keeps recording the problem, which I don't care about ....

Thanks
1 REPLY 1
Pete Randall
Outstanding Contributor
Solution

Re: dmesg

From the man page:

"If the - argument is
specified, dmesg computes (incrementally) the new messages since the
last time it was run and places these on the standard output. This is
typically used with cron (see cron(1)) to produce the error log
/var/adm/messages by running the command:

/usr/sbin/dmesg - >> /var/adm/messages

every 10 minutes."


You could adapt this technique to filter out the unwanted messages (with "grep -v") and check the /var/adm/messages file rather then dmesg itself.


Pete

Pete