Operating System - Linux
1831275 Members
2937 Online
110022 Solutions
New Discussion

DMESG - Is there a way to turn it off??

 
Ian Derringer
Regular Advisor

DMESG - Is there a way to turn it off??

I am running RHAS 3.0 on Itanium server w/Oracle 10g - Is there a way for me to turn off certain message? Do I have to worry about this "dmesg" running out of space??

If someone can explain to me on how this dmesg work.

Thank you in advance.
Ian
9 REPLIES 9
Dave Falloon
Trusted Contributor

Re: DMESG - Is there a way to turn it off??

dmesg is the log of everything that happened at boot, its useful to the point of essential for debugging problems.

What are you trying to remove from your boot messages?

Your boot messages consist of two parts the kernel/driver loading, and the output from daemons loading. Dmesg is the record of kernel and drivers loading.

Say you want to remove error messages from dmesg you need to fix the underlying problem that the kernel/driver is encountering. The messages are also logged in /var/log/dmesg ( at least they are on my system ). If the log isn't being cleaned up as it should you need to look at your log daemon setup.

If you are trying to eliminate messages at boot that do not show up with the dmesg command you need to look at the daemon loading scripts on you machine.

I don't run AS 3 but I assume they still follow the sys V init script scheme. If so, depending on the init level you are at, init levels ( also known as run levels ) work like this:

0 - poweroff
1 - single user, no disks/network/daemons/
2 - server processes, disks should be mounted, syslog active, and essential services started.
3-5 - multiuser environment, I can't remember for sure and if I'm wrong I hope someone else corrects me, but usually run level 3 is where you start X windows.
6 - Reboot level

You choose what daemons to start at which run levels, based on the symbolic links in /etc/rc.d/rc[1-6].d/. The symlinks will be something like S99apache or K99apache. You symlink these to the init scripts in /etc/rc.d/init.d/

Everything in these directories is executed when you enter or leave a specific run level. A simlink that starts with S will be run with the arguments start, one that starts with K will be run with stop as its arguments. The output from these scripts is printed to the console, so you change what they output you change what shows up.

I hope that helps,

--Dave
Clothes make the man, Naked people have little to no effect on society
Dave Falloon
Trusted Contributor

Re: DMESG - Is there a way to turn it off??

from the dmesg man page ( #man dmesg )

dmesg is used to examine or control the kernel ring buffer.

to clear the kernel ring buffer:

dmesg -c


--Dave
Clothes make the man, Naked people have little to no effect on society
Stuart Browne
Honored Contributor

Re: DMESG - Is there a way to turn it off??

And no, there's no way to turn it off, and it's a ring-buffer, so it just cycles out old information when it fills up (thus the '-s' to say how big your want it).

It most certainly isn't something you need to worry about.

But dave isn't quite right, 'dmesg' is just 'boot up messages'. You'll find that when significant events occur during the running of the server (kernel messages in pariticular of which don't get handled by syslog/klog) show up on the console. These are usually what 'dmesg' is getting.

i.e. when there's an issue with a device.. when you plug a new device in.. Output that can occur before any logging daemons are running (output from drivers) etc. etc.
One long-haired git at your service...
Ian Derringer
Regular Advisor

Re: DMESG - Is there a way to turn it off??

Thanks for all the responses so far.

Someone told me to try this "dmesg -n4"

Does anyone know what will this do for me?

Btw, I have some floating-point errors messages.

Thanks,
Ian
Steven E. Protter
Exalted Contributor

Re: DMESG - Is there a way to turn it off??

You don't want to turn dmesg off. If you found a hack to do it, your system would be unsupportable.

Floating point errors are either caused by poorly written software or CPU math problems. A hardware issue would probably cause a kernel panic.

I'd now start to look at what you are running and see if there is anything that could be causing the issue.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Ian Derringer
Regular Advisor

Re: DMESG - Is there a way to turn it off??

Great info!! The only thing that's running on this server is Oracle 10G with RAC & ASM (I think). I was not seeing this error until we started to run Oracle RAC or ASM.

Where do I start by looking for these error messages?

Again, thanks everyone!!

Ian
Ian Derringer
Regular Advisor

Re: DMESG - Is there a way to turn it off??

Has anyone seen this error " 192.168.xx.xxx sent an invalid ICMP type 11, code 0 error to a broadcast: 192.168.x.xxx on eth0 "

I do have valid IP address on my eth0 NIC interface.

Please help!

Thank you in advance.
Ian
Wim Van den Wyngaert
Honored Contributor

Re: DMESG - Is there a way to turn it off??

Don't know for sure but this could help.
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=111681

Wim
Wim
Florian Heigl (new acc)
Honored Contributor

Re: DMESG - Is there a way to turn it off??

dmesg is a buffer in the kernel, it can't become 'full' - as soon as the available size is reached old entries are flushed. after bootup the file /var/run/dmesg.boot (or however it's called on RHEL) gets a copy of the boot-up messages before the filesystems where available and newer messages are appended.
so this is the only thing that could fill up a filesystem, but usually You'll see that repeating errors are recognized by syslogd.

i.e.:

date host vmunix: soft scsi error at somewhere
date host vmunix: soft scsi error at somewhere
date host vmunix: soft scsi error at somewhere
date last message repeated 5000 times

also, dmesg would be hard to disable, and I think it's a risky decision, too, as dmesg is a good means of getting an overview of system hardware config and critical error messages. specific messages can't be filtered out, I'm afraid.
(of course by solving their source You can get rid of them ;)
yesterday I stood at the edge. Today I'm one step ahead.