1844286 Members
2643 Online
110230 Solutions
New Discussion

Re: dmesg: Kernel Buffer

 
Sudip Hore_1
Occasional Contributor

dmesg: Kernel Buffer

Hi All,

Is there any way we can increase Kernel dmesg buffer?

TIA,

Sudip
6 REPLIES 6
Anthony Goonetilleke
Esteemed Contributor

Re: dmesg: Kernel Buffer

A better idea is to do something like this in your cron

0,15,30,45 * * * * /usr/sbin/dmesg - >> /var/adm/messages

This will keep a ful copy of everything rather than increasing the buffer size of dmesg.
Minimum effort maximum output!
Rick Garland
Honored Contributor

Re: dmesg: Kernel Buffer

Don't know about a kernel param but as another option -

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

dmesg will append the new messages since the last time it was run. Can place into cron to run, say q15m, and the new entries will be added to the /var/adm/messages file.
Manju Kampli
Trusted Contributor

Re: dmesg: Kernel Buffer

The system error message buffer is of small, finite size. dmesg is run only every few minutes, so there is no guarantee that all error messages will be logged. To keep track of the previous error messages, it is highly recommended that a cron job is run for every 10 mins "dmesg - >> $FILE " the file can be anywhere where you want to store this log file. This file will get appended with the new messages generated after the previous dmesg was executed.
Never stop "LEARNING"
Andreas Voss
Honored Contributor

Re: dmesg: Kernel Buffer

Hi,

if you are using HP-UX 10.x ore higher you can use the file /var/adm/syslog/syslog.log to view system logs which are written to the dmesg buffer.

Regards

Andrew
Trevor Dyson
Trusted Contributor

Re: dmesg: Kernel Buffer

Hi,

I do not know of a way to increase the buffer but it is no longer necessary (at least from HP-UX 11) to use dmesg at all as kernel messages are logged to syslog (/var/adm/syslog/syslog.log). This may alos be the case for 10.20 but I do not have a 10.X system to test this on.

I hope this helps - Trevor
I've got a little black book with me poems in
Ramesh Donti
Frequent Advisor

Re: dmesg: Kernel Buffer

Sudip,
Basically all the messages which will be logged to dmesg buffer will be logged to syslog.log.
I don't know find any reason why someone should look at dmesg. Anyhow, dmesg doesn't put any timestap, so you can't really findout when exactly you got errors.

If you are looking at some hardware information like RAM size, etc, it might be a better idea to use sam or adb.

If you have any specific requirement to look at dmesg, pls post it, so that I can have a look.
Always Keep Smiling