New features:
- --decode facility and level number to human readable prefixes
$ dmesg --decode
kern :info : [26443.677632] ata1.00: configured for UDMA/100
kern :info : [26443.830225] PM: resume of devices complete after 2452.856 msecs
kern :debug : [26443.830606] PM: Finishing wakeup.
kern :warn : [26443.830608] Restarting tasks ... done.
- filter out messages according to the --facility and --level options, for example
$ dmesg --level=err,warn
$ dmesg --facility=daemon,user
$ dmesg --facility=daemon --level=debug
- -u, --userspace to print only userspace messages
- -k, --kernel to print only kernel messages
- -t, --notime to skip [...] timestamps
- -T, --ctime to print human readable timestamp in ctime()-like format. Unfortunately, this is useless on laptops if you have used suspend/resume. (The kernel does not use the standard system time as a source for printk() and it's not updated after resume.)
- --show-delta to print time delta between printed messages
$ dmesg --show-delta
[35523.876281 < 4.016887>] usb 1-4.1: new low speed USB device using hci_hcd and address 12
[35523.968398 < 0.092117>] usb 1-4.1: New USB device found, idVendor=413c, idProduct=2003
[35523.968408 < 0.000010>] usb 1-4.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[35523.968416 < 0.000008>] usb 1-4.1: Product: Dell USB Keyboard
That my friend, is awesome
ReplyDeleteAWESOME!
ReplyDeleteThanks for posting about this. Wow this is really sweet!
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteHow about a tail -f functionality, so that it can follow new kernel messages?
ReplyDeleteLandtuna, the UNIX philosophy is to do one thing and do it well. Tail -f already exists, so why duplicate that functionality in dmesg? You can always just do dmesg|tail -f
ReplyDeleteCyde, that won't work. tail -f works by checking the file constantly (or perhaps using one of the more recent APIs to have the kernel do the checking). dmesg is a program that spits out results and quits, there's nothing for tail -f to work with.
ReplyDelete(In general, it never makes sense to pipe into tail -f, only to run tail -f on a file(s).)
ad dmesg -f, this is already in util-linux TODO, but it's not so simple.
ReplyDeletehttp://www.spinics.net/lists/util-linux-ng/msg04491.html
http://www.spinics.net/lists/util-linux-ng/msg04498.html
We will see.
Nice!
ReplyDelete@Cyde Weys then why is he adding flags that we could just grep for, hmm?
ReplyDelete$ watch 'dmesg | tail'
ReplyDeleteI usually resort to this... but tailing it properly would be nice.
Thank you!
ReplyDeleteThis is great, thanks!
ReplyDeleteThanks for the post. I liked it. Keep going I follow you.
ReplyDeleteVee Eee Technologies
Thanks for the information .Best one
ReplyDeleteweb design companies in vizag
We are Best Web Designing Companies in vizag if your are looking for web designing services in visakhapatnam we are the Best website designers in vizag.
THANKS FOR SHARING
ReplyDeletebest website designers in vizag
Great Post thanks for sharing
ReplyDeleteThanks for sharing helpful article I liked it. Keep going I follow you.
ReplyDelete