LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 03-06-2007, 11:28 PM   #1
jsteffe
LQ Newbie
 
Registered: Jul 2005
Posts: 4

Rep: Reputation: 0
Determining kernel ring buffer size


I know that you can use "dmesg" to resize the kernel ring buffer.

What I'd like to know is how to determine what the current size is. Something similar to "cat /proc/meminfo".

Please let me know.

Thanks,

John
 
Old 03-07-2007, 04:00 PM   #2
Quigi
Member
 
Registered: Mar 2003
Location: Cambridge, MA, USA
Distribution: Ubuntu (Dapper and Heron)
Posts: 376

Rep: Reputation: 31
Lightbulb

Quote:
Originally Posted by jsteffe
I know that you can use "dmesg" to resize the kernel ring buffer.
You cannot resize the ring buffer. It's compiled into the kernel. Googling for your question took me to the following lines from the kernel source printk.c, which seem relevant:
Code:
#define __LOG_BUF_LEN   (1 << CONFIG_LOG_BUF_SHIFT)
static char __log_buf[__LOG_BUF_LEN];
static int log_buf_len = __LOG_BUF_LEN;
So CONFIG_LOG_BUF_SHIFT is the base-2 logarithm of the size.
Quote:
What I'd like to know is how to determine what the current size is. Something similar to "cat /proc/meminfo".
zgrep LOG_BUF_SHIFT /proc/config.gz
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What Kernel Ring Buffer Contains? Nishant Desai Linux - Kernel 4 02-07-2011 01:47 PM
How to increase the serial transmit buffer size in the Kernel. pwlodarczyk Programming 13 01-21-2009 04:39 PM
determining directory size supersucker Linux - Newbie 2 05-12-2005 12:47 PM
tput - determining window size subu_s Programming 2 12-06-2004 10:46 PM
kernel's ring buffer sixth_sense Linux - General 1 04-01-2004 02:58 AM


All times are GMT -5. The time now is 09:59 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration