dmesg output [solved]

All other questions
Paul99
Posts: 4
Joined: 09 Dec 2011, 08:57

dmesg output [solved]

Postby Paul99 » 09 Dec 2011, 09:04

Hello
I'm, using sysresccd booting off a USB flash disk.
As the computer will be used to fault-find USB devices, we will be calling
dmesg very often.
Where exactly is the circular buffer written to by dmesg?
Is it on the USB disk or in /root (which is essentially in RAM)
or is it in /var/log/dmesg ?

The reason I ask is that I would like to avoid repeated writes to the USB flash disk
and thereby reducing it's lifespan.

Thanking you in advance.
Paul.

gernot
Posts: 1127
Joined: 07 Apr 2010, 16:19

Re: dmesg output

Postby gernot » 09 Dec 2011, 11:00

dmesg don`t write in a buffer.
dmesg print only the content of the kernel ring buffer to standard out.
The ringbuffer is stored in kernal RAM.

Gernot

Paul99
Posts: 4
Joined: 09 Dec 2011, 08:57

Re: dmesg output

Postby Paul99 » 09 Dec 2011, 11:03

Fantastic, thank you Gernot.

Paul99
Posts: 4
Joined: 09 Dec 2011, 08:57

Re: dmesg output [solved]

Postby Paul99 » 12 Dec 2011, 21:13

Hi Gernot

Sorry one more question relating to using Sysresccd to test USB devices.
You mentioned that dmesg only uses kernel RAM, so I am happy that it's not
writing to the USB flash drive everytime.
However what about /var/log/messages ?
I see that everytime I connect or disconnect a USB device, /var/log/messages is updated.
Is this not being saved to the USB flash drive that Sysresccd is booting from?
or is it also only in RAM?

Thank you.
Paul.

gernot
Posts: 1127
Joined: 07 Apr 2010, 16:19

Re: dmesg output [solved]

Postby gernot » 12 Dec 2011, 21:19

/var/log/messages is stored on /dev/memory
If you use backstore this points to the the stick.
Without backstore to RAM.

You can configure syslogd to control this messages.

Gernot

Paul99
Posts: 4
Joined: 09 Dec 2011, 08:57

Re: dmesg output [solved]

Postby Paul99 » 12 Dec 2011, 21:25

OK, thanks.
So if I understand you correctly, if I don't add a backstore
and leave sysresccd pretty much as is, there are no writes to the stick.

Paul.

gernot
Posts: 1127
Joined: 07 Apr 2010, 16:19

Re: dmesg output [solved]

Postby gernot » 13 Dec 2011, 05:10

Yes. sysrcd don't write to flash by default. All changes are made in RAM.

Gernot


Return to “Other”

Who is online

Users browsing this forum: No registered users and 4 guests