LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Get rid off an annoying kernel message (https://www.linuxquestions.org/questions/linux-general-1/get-rid-off-an-annoying-kernel-message-437732/)

kloss 04-22-2006 09:48 AM

Get rid off an annoying kernel message
 
Hello,
When you get a message from a program foo (say: WARNING from FOO: blah blah blah!) in a tty, how can you get rid of it?
I know it is possible to change syslog.conf to redirect some messages (ie all critical ones, all cron-related ones, etc.), but how can you drop THE message which bothers you?
I would like to tell my box: all messages like "*blah*" => /dev/null, that is, using a regexp to filter the system messages.
They are sometimes very annoying! When I am working in a vt I hate being always disturbed by the same stupid warning...
Thanks for your help
/kloss

XavierP 04-22-2006 10:09 AM

What's the full message? It may be something critical and better not ignored.

kloss 04-22-2006 11:32 AM

The most annoying message is:

Code:

hdb: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hdb: dma_intr: error=0x84 { DriveStatusError BadCRC }

It seems really useless: the hdd and the ide cables are fine. It appears quite often... grrr.

/kloss

btmiller 04-22-2006 11:36 AM

Actually, that is a rather serious warning message. It looks like there is a problem with hdb (1st IDE slave). Even if the drive appears normal, there could be a problem internally (bad sectors, for example). I'd suggest backing up all your files on that drive, dropping to signle user mode, and running fsck on all hdb's partitions and badblocks on the drive as a whole.

FWIW, I don't think the normal Linux syslogd can filter via regex but some more advanced syslogds, e.g. syslog-ng, can. SuSE actually uses syslog-ng by default and it can be installed on your distro (you can probably apt-get it).

haertig 04-22-2006 12:21 PM

Quote:

Originally Posted by kloss
The most annoying message is:

Code:

hdb: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hdb: dma_intr: error=0x84 { DriveStatusError BadCRC }

It seems really useless: the hdd and the ide cables are fine. It appears quite often... grrr.

/kloss

Like btmiller said, this one could be quite serious. And probably is. If I ran into that one myself (and I actually HAVE, come to think of it!), I'd be backing up my harddrive data pronto, and looking for a replacement drive. Try running a low level diagnostic tool from your harddisk vendor and you may find that your drive is not in as good a shape as you're thinking. If you can access the S.M.A.R.T. data from your drive, it will probably bear equally bad news. Check out http://smartmontools.sourceforge.net/ for a S.M.A.R.T. data monitoring utility.

If it's a Seagate drive, they provide something called "SeaTools" that does a lowlevel diagnostic. I'm sure other manufactures provide something similar.
Quote:

It appears quite often... grrr.
Is "grrr" a reference to the noise your harddisk makes when this error occurs???!!!

kloss 04-22-2006 01:30 PM

Quote:

Originally Posted by btmiller
Actually, that is a rather serious warning message. It looks like there is a problem with hdb (1st IDE slave). Even if the drive appears normal, there could be a problem internally (bad sectors, for example). I'd suggest backing up all your files on that drive, dropping to signle user mode, and running fsck on all hdb's partitions and badblocks on the drive as a whole.

fsck did not help, but I backed up all files on hda :) I think I will stick with my hard drive. If the drive is still alive in -say- 3 months, I will reasonably suppose that these warnings are not relevant.

Quote:

Originally Posted by btmiller
FWIW, I don't think the normal Linux syslogd can filter via regex but some more advanced syslogds, e.g. syslog-ng, can.

Right! I have apt-installed syslog-ng and tweaked the config file; so far I have not seen the message. Thanks for this advice!

Quote:

Originally Posted by haertig
Check out http://smartmontools.sourceforge.net/ for a S.M.A.R.T. data monitoring utility.

Smartmontools detects a lot of DMA errors... There is something strange: when a lot of errors are outputted, my system disables DMA on hda (and not hdb), I don't know why.

Quote:

Originally Posted by haertig
Is "grrr" a reference to the noise your harddisk makes when this error occurs???!!!

That's me when I'm grumbling indistinctly :D

/kloss

primo 04-22-2006 01:47 PM

Test with another distribution (live-CD) to see whether it's the configuration, maybe hdparm(8) or some obscure BIOS settings. Post the output of "hdparm -v".

haertig 04-22-2006 02:58 PM

Quote:

Originally Posted by kloss
If the drive is still alive in -say- 3 months, I will reasonably suppose that these warnings are not relevant.

Whatever, ...it's your data. In the meantime, while you're waiting for it to catch on fire as positive proof of problems :confused: , I would recommend very frequent backups of any important stuff left on this harddrive.

gilead 04-22-2006 03:14 PM

Have a look in your kernel config - you may be able to fix this with a kernel recompile. In the docs for IDE setup (/usr/src/linux/drivers/ide/Kconfig) it mentions that you can set IDEDISK_MULTI_MODE to Y if you get either of these errors:
Code:

          hda: set_multmode: status=0x51 { DriveReady SeekComplete Error }
          hda: set_multmode: error=0x04 { DriveStatusError }


kloss 04-22-2006 03:45 PM

Quote:

Originally Posted by primo
Test with another distribution (live-CD) to see whether it's the configuration

With knoppix, DMA is disabled on hda and hdb.
With slax (= non debian-based), DMA is disabled on hda. I have the errors described above with hdb.

Quote:

Originally Posted by primo
Post the output of "hdparm -v".

Code:

bratwurst:~# hdparm -i /dev/hda

/dev/hda:

 Model=Maxtor 6Y080L0, FwRev=YAR41BW0, SerialNo=Y2NQC7DE
 Config={ Fixed }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=57
 BuffType=DualPortCache, BuffSize=2048kB, MaxMultSect=16, MultSect=off
 CurCHS=4047/16/255, CurSects=16511760, LBA=yes, LBAsects=160086528
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio1 pio2 pio3 pio4
 DMA modes:  mdma0 mdma1 mdma2
 UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5 udma6
 AdvancedPM=yes: disabled (255) WriteCache=enabled
 Drive conforms to: (null):

 * signifies the current active mode

Code:

bratwurst:~# hdparm -i /dev/hdb

/dev/hdb:

 Model=IC35L080AVVA07-0, FwRev=VA4OA52A, SerialNo=VNC402A4CZ89LA
 Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=52
 BuffType=DualPortCache, BuffSize=1863kB, MaxMultSect=16, MultSect=off
 CurCHS=4047/16/255, CurSects=16511760, LBA=yes, LBAsects=160836480
 IORDY=on/off, tPIO={min:240,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio1 pio2 pio3 pio4
 DMA modes:  mdma0 mdma1 mdma2
 UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5
 AdvancedPM=yes: disabled (255) WriteCache=enabled
 Drive conforms to: ATA/ATAPI-5 T13 1321D revision 1:

 * signifies the current active mode

Quote:

Originally Posted by haertig
while you're waiting for it to catch on fire as positive proof of problems :confused: , I would recommend very frequent backups of any important stuff left on this harddrive.

In fact the hard drive is already a backup drive... I think it is unlikely that both the original data (eg my laptop is stolen) and the backup data (eg the hdd burns) are lost at the same time. ;)

Quote:

Originally Posted by gilead
Have a look in your kernel config, etc.

Thanks for the tip, but the errors look different: set_multmode vs dma_intr.

/kloss

billymayday 04-22-2006 05:10 PM

As said above, you may not want to lose warnings, but as a general point, isn't "dmesg" the tool for determining what gets dropped?

G4T4EVA 04-23-2006 12:51 PM

Hi everyone :)

I'm kina new here and dont know very much about computers but well I'm just wondering getting of topic - Sorry hehe.. - whats a Kernel???

Thanks

win32sux 04-23-2006 01:02 PM

Quote:

Originally Posted by G4T4EVA
I'm kina new here and dont know very much about computers but well I'm just wondering getting of topic - Sorry hehe.. - whats a Kernel???

hi there... welcome to LQ!!! these links will help you:

Quote:

In computer science, the kernel is the core piece of most operating systems. It is a piece of software responsible for hardware and software components to communicate.
http://en.wikipedia.org/wiki/Kernel_...ter_science%29


Quote:

The Linux kernel is a Unix-like operating system kernel that was begun by Linus Torvalds in 1991 and subsequently developed with the assistance of developers worldwide.
http://en.wikipedia.org/wiki/Linux_kernel


please try to not veer threads off-topic like this... you should instead start your own thread in the appropriate forum (after having searched to see if your question has already been asked/answered), which in this case is this one:

http://www.linuxquestions.org/questi...isplay.php?f=8

good luck...

gilead 04-23-2006 02:06 PM

Quote:

Originally Posted by kloss
the errors look different: set_multmode vs dma_intr.

Sorry about that - I used too short a search string while I was grepping the kernel sources...

PTrenholme 04-23-2006 02:33 PM

And all of the above suggests that your hdb is not properly responding to direct memory access (DMA) commands. Perhaps there is a BIOS setting you've neglected, or maybe you should just turn off DMA for hdb. (I believe you can do that using hdparam.)


All times are GMT -5. The time now is 07:06 AM.