43

Is there any explanation/history behind the name of the command dmesg (which prints out some kernel messages)?

Lesmana
  • 26,889
  • 20
  • 81
  • 86
imz -- Ivan Zakharyaschev
  • 15,113
  • 15
  • 61
  • 123

3 Answers3

59

I think it stands for "diagnostic messages", as per the older1 man page (referenced here too).

dmesg - system diagnostic messages
Dmesg looks in a system buffer for recent kernel diagnostic messages and reproduces them on the standard output

One of the oldest references appears to be a man page revision by Kirk McKusick dating back from 1985.


1: the link doesn't always work - no idea why... I'm attaching a screenshot though you should still be able to access the page via Google's cache.

man page for dmesg(8) listing "dmesg - system diagnostic messages" as the NAME

Jeff Schaller
  • 66,199
  • 35
  • 114
  • 250
don_crissti
  • 79,330
  • 30
  • 216
  • 245
  • How to choose of the two the answer that will be accepted?.. I believe it should be the answer with a (verified) reference going to an earlier time in history. 1980 from the other answer is better than 1985 from this one, but it remains without a material source yet. – imz -- Ivan Zakharyaschev May 30 '13 at 14:26
  • 2
    That's how I see it: 1. OSX man page stating "The dmesg command appeared in 4.0BSD" doesn't mean OSX devs used the original `dmesg` description for their OSX man page. 2. Regardless of whether `dmesg` prints, collects or displays messages, we're still talking about _kernel diagnostic messages_, no matter how you [phrase](http://docs.oracle.com/cd/E22985_01/html/E22986/z4000ca11330020.html) that. It is about **what** `dmesg` outputs, not about the meanings of _output_ (print, display etc). Anyway, it's your question so feel free to accept the answer that you consider the best. – don_crissti May 30 '13 at 17:10
  • 1
    AFAICT the command first appeared in the [7th Unix release](http://www.tuhs.org/Archive/PDP-11/Trees/V7/usr/src/cmd/), which gets you back to 1979, no man page, and the source references neither "diagnostic" nor "debug". The v8 man page in your first link is probably the best. – mr.spuratic Aug 07 '15 at 15:48
  • 2
    The man page synopsis in 3BSD (1979) has: _"dmesg - collect system diagnostic messages to form error log"_ – Stéphane Chazelas Feb 24 '18 at 23:55
18

I think the dmesg command just stands for display messages. The FreeBSD manpages seem to share this view:

dmesg -- display the system message buffer

Renan
  • 16,976
  • 8
  • 69
  • 88
  • I see, tank you! The Linux manpage is not so "explanatory": "dmesg - print or control the kernel ring buffer" – imz -- Ivan Zakharyaschev May 20 '13 at 18:12
  • 1
    OS X shares this idea, with both "dmesg -- display the system message buffer" as well as "The dmesg command appeared in 4.0BSD." Unfortunately my Google-fu is failing - seems difficult to find source for 4.0 BSD these days...but that traces back to 1980, so 5 years earlier than referenced in the other answer. – Mark Glossop May 24 '13 at 02:05
  • @MarkGlossop Thanks for mentioning these bits of history! How to choose of the two the answer that will be accepted?.. I believe it should be the answer with a (verified) reference going to an earlier time in history. 1980 from your comments is better than 1985 from the other answer, but it remains without a material source yet. – imz -- Ivan Zakharyaschev May 30 '13 at 14:27
0

According to Wikipedia, dmesg is "display message or driver message"

Michael Mrozek
  • 91,316
  • 38
  • 238
  • 232
Raza
  • 4,059
  • 7
  • 28
  • 33
  • Why was this down-voted? – igal Nov 12 '17 at 18:10
  • @igal Related duplicate: [What does the 'd' mean in “dmesg”?](https://unix.stackexchange.com/q/340715/125388), which hinted that definition from Wikipedia is purely informational. –  Dec 14 '17 at 08:07