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

dmesg and root-tail

52 views
Skip to first unread message

lee

unread,
Jul 11, 2009, 5:10:06 AM7/11/09
to
Hi,

is there a way to have root-tail display what dmesg puts out?

Like "dmesg | root-tail" --- but dmesg creates output only once.


--
To UNSUBSCRIBE, email to debian-us...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Osamu Aoki

unread,
Jul 11, 2009, 1:00:16 PM7/11/09
to
On Sat, Jul 11, 2009 at 03:08:40AM -0600, lee wrote:
> Hi,
>
> is there a way to have root-tail display what dmesg puts out?
>
> Like "dmesg | root-tail" --- but dmesg creates output only once.

I do not know about "root-tail" command but ..

"dmesg | tail -f" may do interesting thing

Chris Hiestand

unread,
Jul 11, 2009, 1:30:09 PM7/11/09
to
Why not just do this:

> tail -f /var/log/kern.log

lee

unread,
Jul 11, 2009, 2:40:08 PM7/11/09
to
On Sun, Jul 12, 2009 at 01:33:21AM +0900, Osamu Aoki wrote:
> On Sat, Jul 11, 2009 at 03:08:40AM -0600, lee wrote:
> > Hi,
> >
> > is there a way to have root-tail display what dmesg puts out?
> >
> > Like "dmesg | root-tail" --- but dmesg creates output only once.
>
> I do not know about "root-tail" command but ..
>
> "dmesg | tail -f" may do interesting thing

The "tail -f" waits for more output from dmesg, but dmesg won't
produce any more output. dmesg is supposed to print the contents of
the kernel buffer; it does exactly that and then ends. It also doesn't
have an option like -f to tell it to "keep printing" ...

lee

unread,
Jul 11, 2009, 5:50:07 PM7/11/09
to
On Sat, Jul 11, 2009 at 10:24:01AM -0700, Chris Hiestand wrote:
> Why not just do this:
>
>> tail -f /var/log/kern.log

That log file is empty ...

Chris Jones

unread,
Jul 11, 2009, 6:10:08 PM7/11/09
to
On Sat, Jul 11, 2009 at 02:32:59PM EDT, lee wrote:

> The "tail -f" waits for more output from dmesg, but dmesg won't
> produce any more output. dmesg is supposed to print the contents of
> the kernel buffer; it does exactly that and then ends. It also doesn't
> have an option like -f to tell it to "keep printing" ...

Not sure why the OP wants to use dmesg - on my run-of-the-mill lenny
system nothing appears to be written to the kernel ring buffer after
booting anyway - and that's after issuing a "dmesg -n 8" to try to raise
the logging level (at least that's what I'm guessing after reading the
dmesg man page).

Maybe he could tell us what he wants to achieve?

In most circumstances, the contents of /var/log/{messages|syslog} would
seem to be more appropriate if all he wants is to keep an eye on system
activity.

?

Note that one feature of "less" that I have found to be useful is that
it can be caused to refresh the display automatically via the Shift-f
command.

Hit Ctrl-C to leave update mode and then you can page up to check what
went down previously.

CJ

Tzafrir Cohen

unread,
Jul 12, 2009, 12:50:13 AM7/12/09
to
On Sat, Jul 11, 2009 at 03:42:13PM -0600, lee wrote:
> On Sat, Jul 11, 2009 at 10:24:01AM -0700, Chris Hiestand wrote:
> > Why not just do this:
> >
> >> tail -f /var/log/kern.log
>
> That log file is empty ...

$ grep kern.log /etc/rsyslog.conf
kern.* -/var/log/kern.log

--
Tzafrir Cohen | tza...@jabber.org | VIM is
http://tzafrir.org.il | | a Mutt's
tza...@cohens.org.il | | best
ICQ# 16849754 | | friend

Abhishek Amberkar [अभिषेक]

unread,
Jul 12, 2009, 3:00:19 AM7/12/09
to

# tail -f /var/log/dmesg

--
With Regards
Abhishek Amberkar

Learn to appreciate the beauty within...

0 new messages