Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

/var/run/dmesg.boot (was: Hello)

0 views
Skip to first unread message

Mike Meyer

unread,
May 14, 2001, 12:52:01 PM5/14/01
to
robinson <robin...@yahoo.com> types:
> This is a multi-part message in MIME format.

> ------=_NextPart_000_001F_01C0DC56.95D905A0
> Content-Type: text/plain;
> charset="iso-8859-1"
> Content-Transfer-Encoding: quoted-printable

First, please choose subject lines that are relevant. Second, please
send only plain text to the list, not HTML and not both.

> I want to ask a silly question. My computer runs Freebsd 4.2, when =
> booting system, It displays many booting messages and writes same =
> messages to the file /var/run/dmesg.boot.=20
> Why one printf statement can do that two works?=20

I'm not sure what the question is. If you're asking how both of those
happen, it's because kernel messages are saved in an internal buffer,
and can be dumped later. See the dmesg man page for information on how
to dump them, and the /etc/rc script for how /var/run/dmesg.boot gets
created.

If you're asking why we do both, the second was presumably added to
guarantee you could always recover the boot dmesg, no matter what else
has happened on the system.

<mike

> Robinson
>
> ------=_NextPart_000_001F_01C0DC56.95D905A0
> Content-Type: text/html;
> charset="iso-8859-1"
> Content-Transfer-Encoding: quoted-printable
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML><HEAD>
> <META http-equiv=3DContent-Type content=3D"text/html; =
> charset=3Diso-8859-1">
> <META content=3D"MSHTML 5.50.4611.1300" name=3DGENERATOR>
> <STYLE></STYLE>
> </HEAD>
> <BODY bgColor=3D#ffffff>
> <DIV><FONT face=3DArial size=3D2>Hello,</FONT></DIV>
> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
> <DIV><FONT face=3DArial size=3D2>I want to ask a silly question. My =
> computer runs=20
> Freebsd 4.2, when booting system, It displays many booting messages =
> and&nbsp;=20
> writes same messages to the file /var/run/dmesg.boot. </FONT></DIV>
> <DIV><FONT face=3DArial size=3D2>Why one printf statement can do that =
> two=20
> works?&nbsp;</FONT></DIV>
> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
> <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
> <DIV><FONT face=3DArial size=3D2>Robinson</FONT></DIV></BODY></HTML>
>
> ------=_NextPart_000_001F_01C0DC56.95D905A0--
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
> To Unsubscribe: send mail to majo...@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message
>
--
Mike Meyer <m...@mired.org> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.

To Unsubscribe: send mail to majo...@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message

robinson

unread,
May 14, 2001, 1:23:52 PM5/14/01
to
Hello,

Each time, when I boot the system, the system will display a lot of
messages. If I don't want the message display and only save them in
/var/run/dmesg.boot, How do this?

Thanks

Robinson

Mike Meyer

unread,
May 14, 2001, 8:00:23 PM5/14/01
to
robinson <robin...@yahoo.com> types:

> Each time, when I boot the system, the system will display a lot of
> messages. If I don't want the message display and only save them in
> /var/run/dmesg.boot, How do this?

Edit the kernel sources, and fix it so that it quits sending those
messages to the console. You really don't want to do that anyway.
Contemplate trying to fix a system after you've done this and it fails
to come up completely.

<mike


--
Mike Meyer <m...@mired.org> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.

To Unsubscribe: send mail to majo...@FreeBSD.org

Siegbert Baude

unread,
May 14, 2001, 11:06:21 PM5/14/01
to
> Each time, when I boot the system, the system will display a lot of
> messages. If I don't want the message display and only save them in
> /var/run/dmesg.boot, How do this?

My question is the other way round. I would like to have the output
of the rc scripts (mounting disks, network initialization, Linux ABI,
...) also in dmesg. Is there an easy way to achieve this, without
editing all rc scripts manually?
Are those messages in any other log by default?

Thanks in advance

Siegbert

Christoph Sold

unread,
May 15, 2001, 1:57:37 AM5/15/01
to
Siegbert Baude wrote:

>>Each time, when I boot the system, the system will display a lot of
>>messages. If I don't want the message display and only save them in
>>/var/run/dmesg.boot, How do this?
>>
>
> My question is the other way round. I would like to have the output
> of the rc scripts (mounting disks, network initialization, Linux ABI,
> ...) also in dmesg. Is there an easy way to achieve this, without
> editing all rc scripts manually?
> Are those messages in any other log by default?


For exactly this reason, I added a small script to /etc/rc.local:
<snip>
#!/bin/sh
#
# bootlog: log the boot messages into a separate file in case the dmesg
# buffer overflows

$f = "boot."`date '+%y%m%d%H%M'`".log"
dmesg > $f
</snip>

HTH
-Christoph Sold

Siegbert Baude

unread,
May 15, 2001, 8:51:46 AM5/15/01
to
> > My question is the other way round. I would like to have the output
> > of the rc scripts (mounting disks, network initialization, Linux ABI,
> > ...) also in dmesg. Is there an easy way to achieve this, without
> > editing all rc scripts manually?
> > Are those messages in any other log by default?
>
> For exactly this reason, I added a small script to /etc/rc.local:
> <snip>
> #!/bin/sh
> #
> # bootlog: log the boot messages into a separate file in case the dmesg
> # buffer overflows
>
> $f = "boot."`date '+%y%m%d%H%M'`".log"
> dmesg > $f
> </snip>

That saves dmesg (BTW, in which directory? /root ?), but doesn't add
the messages of the rc scripts. After a boot my dmesg for example ends
with:

<snip>
cd1 at sym0 bus 0 target 4 lun 0
cd1: <TEAC CD-ROM CD-532S 3.0A> Removable CD-ROM SCSI-2 device
cd1: 10.000MB/s transfers (10.000MHz, offset 8)
cd1: Attempt to query device size failed: NOT READY, Medium not
present
cd0 at sym0 bus 0 target 3 lun 0
cd0: <YAMAHA CRW4416S 1.0j> Removable CD-ROM SCSI-2 device
cd0: 8.333MB/s transfers (8.333MHz, offset 8)
cd0: Attempt to query device size failed: NOT READY, Medium not
present - tray closed


But on the screen I see in addition the output of the rc scripts,
like:

swapon: adding /dev/ad0s3b as swap device
Automatic boot in progress...
/dev/ad0s3a: FILESYSTEM CLEAN; SKIPPING CHECKS
/dev/ad0s3a: clean, 10711 free (399 frags, 1289 blocks, 0.8%
fragmentation)
/dev/ad0s3f: FILESYSTEM CLEAN; SKIPPING CHECKS
/dev/ad0s3f: clean, 76161 free (1761 frags, 9300 blocks, 0.9%
fragmentation)
/dev/ad2s1d: FILESYSTEM CLEAN; SKIPPING CHECKS
/dev/ad2s1d: clean, 460027 free (39907 frags, 52515 blocks, 2.0%
fragmentation)
/dev/ad0s3e: FILESYSTEM CLEAN; SKIPPING CHECKS
/dev/ad0s3e: clean, 11260 free (444 frags, 1352 blocks, 2.2%
fragmentation)
/dev/ad0s9h: FILESYSTEM CLEAN; SKIPPING CHECKS
/dev/ad0s9h: clean, 219958 free (4294 frags, 26958 blocks, 0.8%
fragmentation)
Doing initial network setup: hostname.
rl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
<snip>
Additional routing options: tcp extensions=NO TCP keepalive=YES.
Routing daemons:.
Additional daemons: syslogd.
Doing additional network setup: ntpdate portmap.
Starting final network daemons:.
ELF ldconfig path: /usr/lib /usr/lib/compat /usr/X11R6/lib
/usr/local/lib
a.out ldconfig path: /usr/lib/aout /usr/lib/compat/aout
/usr/X11R6/lib/aout
Starting standard daemons: inetd cron printer sshd usbd.
Initial rc.i386 initialization: apm apmd.
Configuring syscons: keymap font8x16 font8x14 font8x8 blank_time
screensaver mou
sed.
Additional ABI support: linux.
Local package initialization: /usr/local/etc/rc.d/rc.local: healthd
mixer settin
g.
Additional TCP options:.


How can I save them to a file, preferred to dmsg?

Ciao
Siegbert

Mike Meyer

unread,
May 15, 2001, 12:28:39 PM5/15/01
to
Siegbert Baude <siegber...@gmx.de> types:

> > Each time, when I boot the system, the system will display a lot of
> > messages. If I don't want the message display and only save them in
> > /var/run/dmesg.boot, How do this?
>
> My question is the other way round. I would like to have the output
> of the rc scripts (mounting disks, network initialization, Linux ABI,
> ...) also in dmesg. Is there an easy way to achieve this, without
> editing all rc scripts manually?
> Are those messages in any other log by default?

As of 4.3-RELEASE, they are in /var/console.log.

<mike
--
Mike Meyer <m...@mired.org> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.

To Unsubscribe: send mail to majo...@FreeBSD.org

0 new messages