* dmesg(1) changes
@ 2011-07-14 11:52 Karel Zak
2011-07-14 12:40 ` Lennart Poettering
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Karel Zak @ 2011-07-14 11:52 UTC (permalink / raw)
To: util-linux; +Cc: Lennart Poettering
Hi,
I did some changes to dmesg(1) in last days:
* \x<hex> encoding is used for non-printable chars and invalid
multibyte sequences
* add --decode option to decode facility and level (priotity) number to
human readable prefixes, for example:
$ dmesg --decode
kern :info : [53335.593617] ata1.00: configured for UDMA/100
kern :info : [53335.743185] PM: resume of devices complete after 2496.795 msecs
kern :debug : [53335.743593] PM: Finishing wakeup.
kern :warn : [53335.743595] Restarting tasks ... done.
kern :info : [53335.790452] video LNXVIDEO:00: Restoring backlight state
* add --facility=<LIST> option to filter out messages, for example:
$ dmesg --facility=daemon,user
[ 1.802065] dracut: dracut-009-11.fc15
[ 1.811267] dracut: rd.luks=0: removing cryptoluks activation
[ 1.813913] dracut: rd.lvm=0: removing LVM activation
[ 1.819348] udev[111]: starting version 167
* add --level=<LIST> option to filter out messages, for example:
$ dmesg --level=debug,info
$ dmesg --facility=kern --level=warn,err
* add --clear option to clear the kernel ring buffer
* add --read-clear to read and clear the kernel ring buffer
* add --console-off and --console-on to control output to console
* -n <LEVEL> (--console-level) supports human readable level names,
for example:
$ dmesg --console-level=emerg,alert
Comments & suggestions?
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: dmesg(1) changes
2011-07-14 11:52 dmesg(1) changes Karel Zak
@ 2011-07-14 12:40 ` Lennart Poettering
2011-07-18 9:52 ` Karel Zak
2011-07-14 13:45 ` Kay Sievers
2011-07-18 13:00 ` Thomas Bächler
2 siblings, 1 reply; 6+ messages in thread
From: Lennart Poettering @ 2011-07-14 12:40 UTC (permalink / raw)
To: Karel Zak; +Cc: util-linux
On Thu, 14.07.11 13:52, Karel Zak (kzak@redhat.com) wrote:
> * add --facility=<LIST> option to filter out messages, for example:
>
> $ dmesg --facility=daemon,user
> [ 1.802065] dracut: dracut-009-11.fc15
> [ 1.811267] dracut: rd.luks=0: removing cryptoluks activation
> [ 1.813913] dracut: rd.lvm=0: removing LVM activation
> [ 1.819348] udev[111]: starting version 167
>
>
> Comments & suggestions?
This is really cool! Thanks a lot for implementing this!
One last thing on my wishlist: "dmesg -k" as alias for "dmesg
--facility=kern", just to make this presumably very often requested
switch is easy to reach.
Lennart
--
Lennart Poettering - Red Hat, Inc.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: dmesg(1) changes
2011-07-14 12:40 ` Lennart Poettering
@ 2011-07-18 9:52 ` Karel Zak
0 siblings, 0 replies; 6+ messages in thread
From: Karel Zak @ 2011-07-18 9:52 UTC (permalink / raw)
To: Lennart Poettering, Kay Sievers; +Cc: util-linux
On Thu, Jul 14, 2011 at 02:40:34PM +0200, Lennart Poettering wrote:
> One last thing on my wishlist: "dmesg -k" as alias for "dmesg
> --facility=kern", just to make this presumably very often requested
> switch is easy to reach.
Added:
-u : userspace messages
-k : kernel messages
On Thu, Jul 14, 2011 at 03:45:30PM +0200, Kay Sievers wrote:
> People ask since a while for an option to suppress the kernel's [...]
> timestamp from the 'dmesg' output. Maybe you can make them happy too.
> :)
Added -t to suppress the timestamps.
$ dmesg -u -t
dracut: dracut-009-11.fc15
dracut: rd.luks=0: removing cryptoluks activation
dracut: rd.lvm=0: removing LVM activation
udev[111]: starting version 167
dracut: Starting plymouth daemon
dracut: rd.dm=0: removing DM RAID activation
dracut: rd.md=0: removing MD RAID activation
dracut: Checking filesystems
dracut: fsck -T -t noopts=_netdev -A -a
dracut: /dev/sda3: clean, 194520/1921360 files, 1601560/7680000
blocks
dracut: Remounting
/dev/disk/by-uuid/2cda1e08-1f22-490b-9101-c93d511bc9d9 with -o ro,
dracut: Mounted root filesystem /dev/sda3
dracut: Switching root
udev[451]: starting version 167
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: dmesg(1) changes
2011-07-14 11:52 dmesg(1) changes Karel Zak
2011-07-14 12:40 ` Lennart Poettering
@ 2011-07-14 13:45 ` Kay Sievers
2011-07-18 13:00 ` Thomas Bächler
2 siblings, 0 replies; 6+ messages in thread
From: Kay Sievers @ 2011-07-14 13:45 UTC (permalink / raw)
To: Karel Zak; +Cc: util-linux, Lennart Poettering
On Thu, Jul 14, 2011 at 13:52, Karel Zak <kzak@redhat.com> wrote:
> I did some changes to dmesg(1) in last days:
>
> =C2=A0* \x<hex> encoding is used for non-printable chars and invalid
> =C2=A0 multibyte sequences
>
> =C2=A0* add --decode option to decode facility and level (priotity) numbe=
r to
> =C2=A0 human readable prefixes, for example:
>
> =C2=A0 =C2=A0$ dmesg --decode
> =C2=A0 =C2=A0kern =C2=A0:info =C2=A0: [53335.593617] ata1.00: configured =
for UDMA/100
> =C2=A0 =C2=A0kern =C2=A0:info =C2=A0: [53335.743185] PM: resume of device=
s complete after 2496.795 msecs
> =C2=A0 =C2=A0kern =C2=A0:debug : [53335.743593] PM: Finishing wakeup.
> =C2=A0 =C2=A0kern =C2=A0:warn =C2=A0: [53335.743595] Restarting tasks ...=
done.
> =C2=A0 =C2=A0kern =C2=A0:info =C2=A0: [53335.790452] video LNXVIDEO:00: R=
estoring backlight state
>
> =C2=A0* add --facility=3D<LIST> option to filter out messages, for exampl=
e:
>
> =C2=A0 =C2=A0$ dmesg --facility=3Ddaemon,user
> =C2=A0 =C2=A0[ =C2=A0 =C2=A01.802065] dracut: dracut-009-11.fc15
> =C2=A0 =C2=A0[ =C2=A0 =C2=A01.811267] dracut: rd.luks=3D0: removing crypt=
oluks activation
> =C2=A0 =C2=A0[ =C2=A0 =C2=A01.813913] dracut: rd.lvm=3D0: removing LVM ac=
tivation
> =C2=A0 =C2=A0[ =C2=A0 =C2=A01.819348] udev[111]: starting version 167
>
> =C2=A0* add --level=3D<LIST> option to filter out messages, for example:
>
> =C2=A0 =C2=A0$ dmesg --level=3Ddebug,info
>
> =C2=A0 =C2=A0$ dmesg --facility=3Dkern --level=3Dwarn,err
>
> =C2=A0* add --clear option to clear the kernel ring buffer
>
> =C2=A0* add --read-clear to read and clear the kernel ring buffer
>
> =C2=A0* add --console-off and --console-on to control output to console
>
> =C2=A0* -n <LEVEL> (--console-level) supports human readable level names,
> =C2=A0 for example:
>
> =C2=A0 =C2=A0$ dmesg --console-level=3Demerg,alert
>
> Comments & suggestions?
Sounds all great. Thanks for adding this before people start
complaining that we fill the kernel log with 'userspace crap'. I
actually removed all syslog daemons from my systems, and use only
'dmesg' these days, and no log is stored on disk, I just don't need
it.
People ask since a while for an option to suppress the kernel's [...]
timestamp from the 'dmesg' output. Maybe you can make them happy too.
:)
Thanks,
Kay
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: dmesg(1) changes
2011-07-14 11:52 dmesg(1) changes Karel Zak
2011-07-14 12:40 ` Lennart Poettering
2011-07-14 13:45 ` Kay Sievers
@ 2011-07-18 13:00 ` Thomas Bächler
2011-07-18 22:28 ` Karel Zak
2 siblings, 1 reply; 6+ messages in thread
From: Thomas Bächler @ 2011-07-18 13:00 UTC (permalink / raw)
To: Karel Zak; +Cc: util-linux
Am 14.07.2011 13:52, schrieb Karel Zak:
>
> Hi,
>
> I did some changes to dmesg(1) in last days:
Thanks for these advances.
While we're making a wishlist, I always wanted a 'follow' option
(similar to tail -f/-F) for dmesg.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-07-18 22:28 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-14 11:52 dmesg(1) changes Karel Zak
2011-07-14 12:40 ` Lennart Poettering
2011-07-18 9:52 ` Karel Zak
2011-07-14 13:45 ` Kay Sievers
2011-07-18 13:00 ` Thomas Bächler
2011-07-18 22:28 ` Karel Zak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox