dmesg examines or controls the system message buffer. Only a user with appropriate privileges may modify the system message buffer parameters or contents.
If the user has appropriate privilege, clears the system message buffer contents after printing.
If the user has appropriate privilege, sets the level at which logging of messages is done to the console.
uses a buffer of bufsize to query the system message buffer. This is 16392 by default (this matches the default kernel syslog buffer size since 2.1.113). If you have set the kernel buffer to larger than the default then this option can be used to view the entire buffer.