A comprehensive dmesg?

If none of the more specific forums is the right place to ask

A comprehensive dmesg?

Postby zwerg » 2006-05-19 06:25

I'd like to use dmesg to display all of the information that scrolls past when the box boots. As things stand, I get a portion of it.

Is this a matter of buffer sizes? The man page for dmesg mentions that the default buffer size is 16,392, and then says something about the size of the kernel ring buffer. Will it help to double the dmesg buffer? And how, exactly, would that command be entered? So far I've not been able to expand the output of dmesg -- I'm pretty sure I'm not getting the syntax right.

As for increasing the size of the kernel ring buffer, that makes no sense to me. The output that goes to the monitor during boot is what I want, and since it is there but not accessible (via dmesg, yet), I can't imagine that those messages need to come from a larger buffer. CMIIAW, please.

I want to set dmesg to give the fuil story. Or: I'd like to know how to generate a file that contains ALL of what I see whizzing past when I boot. Is there a log that has it all?

Any ideas?

TIA
zwerg
 
Posts: 117
Joined: 2006-02-17 12:16
Location: Bangkok, Thailand

Postby lacek » 2006-05-19 08:40

What you're looking for is the /var/log/dmesg file. It should contain all messages.
lacek
Moderator Team Member
 
Posts: 769
Joined: 2004-03-11 18:49
Location: Budapest, Hungary

Postby zwerg » 2006-05-19 10:05

Well, no, the /var/log/dmesg file actually contains less than the output of the dmesg command. And neither contains everything that whooshes past on the monitor as boot proceeds.

I'm confident that I'm correct, because I created two files, one using the dmesg command, and one a copy of /var/log/dmesg, and viewed them together (in Xemacs with a split screen). Then I went over them, comparing them line by line. The file /var/log/dmesg is missing 27 lines that are present at the end of the file created with the dmesg command. I supose if you try this, YMMV.

OK, let's consider the contents of man dmesg. Can I use the -sbufsize option to force dmesg to give me a complete copy of the data shown on boot? I haven't had any luck so far; every file I create is of identical size. So what's the proper syntax for that option? Or is that not how it's done? How IS it done??
zwerg
 
Posts: 117
Joined: 2006-02-17 12:16
Location: Bangkok, Thailand

Postby Grifter » 2006-05-19 11:07

You don't get all the output, but the output you don't get is usually redundant anyway. If you do not have a display manager that starts right after boot, you can always just hit shift-pageup for the last few pages of it. But if you switch VTs (or use a gdm) you will lose the scrollback buffer.
Eagles may soar, but weasels don't get sucked into jet engines...
Grifter
 
Posts: 1572
Joined: 2006-05-04 07:53
Location: Svea Rike

Postby lacek » 2006-05-19 11:20

To my knowledge, the size of the kernel ring buffer is hardwired into the kernel (specified by the CONFIG_LOG_BUF_SHIFT config option). It is probably a very bad idea to hold all of the buffer in the memory, because dmesg can continuously grow, consuming more and more memory.
That's why you can't really ask dmesg to print all of the messages, since they aren't kept in the memory.
Take a look at the log files (/var/log/messages for example), perhaps they contain what you are looking for.
lacek
Moderator Team Member
 
Posts: 769
Joined: 2004-03-11 18:49
Location: Budapest, Hungary

Postby zwerg » 2006-05-19 16:15

Thanks for the replies!

1. I figured the kernel ring buffer was a non-starter. Now I know why it is.

2. No luck with the shift-pageup trick; the text did move up into the boot display, but only a few lines.

3. No relevant messages found in /var/log.

So I'll ask everybody to consider just this aspect of the question:

OK, let's consider the contents of man dmesg. Can I use the -sbufsize option to force dmesg to give me a complete copy of the data shown on boot? I haven't had any luck so far; every file I create is of identical size. So what's the proper syntax for that option? Or is that not how it's done? How IS it done??

In other words, is it the small size of dmesg's buffer that is preventing the output of the dmesg command from being comprehensive?

And above all, am I wasting time trying to do something that can't be done??
zwerg
 
Posts: 117
Joined: 2006-02-17 12:16
Location: Bangkok, Thailand

Postby Grifter » 2006-05-19 23:12

I think the errors you get simply don't get logged, trying to expand dmesg seems futile to me, but don't take my word for it. Personally I can scroll up pretty far during bootup, and if you run a framebuffer, you can try to increase the resolution so you can fit even more text on it.
Eagles may soar, but weasels don't get sucked into jet engines...
Grifter
 
Posts: 1572
Joined: 2006-05-04 07:53
Location: Svea Rike

Postby zwerg » 2006-05-20 04:35

Grifter:

Thanks for the comments. I confess I don't know what errors you are referring to when you say, "I think the errors you get simply don't get logged," but the frame buffer may be of some help. I'll look into it. A friend here tells me he can't get dmesg to do anything interesting when he tries to increase its buffer, too, so that looks, as you say, futile.

I think I'm trying to push a rope.

Anybody else have any ideas??

TIA
zwerg
 
Posts: 117
Joined: 2006-02-17 12:16
Location: Bangkok, Thailand

Postby Harold » 2006-05-20 14:37

During startup, messages scrolling by on the console are initially generated by the kernel, and these get logged into dmesg. Towards the end of startup, the messages are no longer being generated by the kernel, but by the init routine. These don't get logged, and I suspect this is what zwerg is trying to read. The screen can be halted any time during startup by pressing, iirc, the scroll lock key. If it isn't the scroll lock key, then it is one of the keys to either side of it.
Harold
 
Posts: 1502
Joined: 2005-01-07 00:15

Postby zwerg » 2006-05-20 15:38

That gives me something to work on. Thanks, Harold.
zwerg
 
Posts: 117
Joined: 2006-02-17 12:16
Location: Bangkok, Thailand

Postby Lux » 2006-05-20 16:37

Init messages are not logged by default but this can be enabled in /etc/default/bootlogd. Once bootlogd has been enabled, the log can be read in /var/log/boot.
"Hit the philistines three times over the head with the Elisp reference manual."
-- Michael A. Petonic --
User avatar
Lux
 
Posts: 474
Joined: 2006-01-25 13:00
Location: Finland

Postby zwerg » 2006-05-21 07:39

1. Default changed from "No" to "Yes" in /etc/default/bootlogd.

2. File (or dir) /var/log/boot not found. No relevant file with "boot" in its name found in /var.

3. Tedious comparision of output of dmesg with the file /var/log/messages shows that neither is an abbreviated version of the other; each includes some data not found in the other.

4. No other relevant files found in /var/log.

5. No way found to halt scrolling during boot process: keys "Print Screen SysRq," "Scroll Lock," "Pause Break" do not do the trick.

6. It appears that the scrolling data on the monitor during boot contain info not yet located in any file.

In the event that anyone wants to discuss the command dmesg and its options, I'll be interested.

Thanks to all who have contributed!
zwerg
 
Posts: 117
Joined: 2006-02-17 12:16
Location: Bangkok, Thailand


Return to General Questions

Who is online

Users browsing this forum: No registered users and 16 guests

fashionable