2001-10-01 23:46:00

by Jordan Breeding

[permalink] [raw]
Subject: Increasing dmesg buffer size?

What kernel parameter do I need to modify in the source to allow a
larger dmesg buffer? I have a lot of boot messages and I currently
loose about 10-20 lines immediately and they can not even be seen in
/var/log/dmesg because that file gets dumped after those lines are
already gone. Thanks to anyone who can help.

Jordan Breeding


2001-10-01 23:50:51

by Mike Fedyk

[permalink] [raw]
Subject: Re: Increasing dmesg buffer size?

On Mon, Oct 01, 2001 at 06:46:01PM -0500, Jordan Breeding wrote:
> What kernel parameter do I need to modify in the source to allow a
> larger dmesg buffer? I have a lot of boot messages and I currently
> loose about 10-20 lines immediately and they can not even be seen in
> /var/log/dmesg because that file gets dumped after those lines are
> already gone. Thanks to anyone who can help.
>

Does dmesg wrap around before klogd can grab the info? Check
/var/log/kern.log (in debian, your filename may vary...) to see...

Mike

2001-10-01 23:51:40

by Randy.Dunlap

[permalink] [raw]
Subject: Re: Increasing dmesg buffer size?

Jordan Breeding wrote:
>
> What kernel parameter do I need to modify in the source to allow a
> larger dmesg buffer? I have a lot of boot messages and I currently
> loose about 10-20 lines immediately and they can not even be seen in
> /var/log/dmesg because that file gets dumped after those lines are
> already gone. Thanks to anyone who can help.

That would be a #define of LOG_BUF_LEN in linux/kernel/printk.c.

Be sure to keep it a power of 2.

There have been several patch files for this on the kernel
mailing list, but it's easy enough to DIY.

~Randy

2001-10-01 23:55:20

by James Simmons

[permalink] [raw]
Subject: Re: Increasing dmesg buffer size?


> What kernel parameter do I need to modify in the source to allow a
> larger dmesg buffer? I have a lot of boot messages and I currently
> loose about 10-20 lines immediately and they can not even be seen in
> /var/log/dmesg because that file gets dumped after those lines are
> already gone. Thanks to anyone who can help.

No command line paramter. Go into linux/kernel/printk.c and increase the
value of LOG_BUF_LEN. It must be a power of two.

2001-10-02 01:13:57

by Tim Moore

[permalink] [raw]
Subject: Re: Increasing dmesg buffer size?

Jordan Breeding wrote:
>
> What kernel parameter do I need to modify in the source to allow a
> larger dmesg buffer? I have a lot of boot messages and I currently

Note the -s flag.

rgds,
tim.

DMESG(8) DMESG(8)

NAME
dmesg - print or control the kernel ring buffer

SYNOPSIS
dmesg [ -c ] [ -n level ] [ -s bufsize ]


--