Clearing dmesg logs

What is dmesg?

The main purpose of dmesg is to display kernel messages. dmesg can provide helpful information in case of hardware problems or problems with loading a module into the kernel. In addition, with dmesg, you can determine what hardware is installed on your server. During every boot, Linux checks your hardware and logs information about it. You can view these logs using the command /bin/dmesg.


If you want you can backup the logs using dmesg > filename before clearing it. Just execute the following command to clear and frest start the ring buffer loggin (make sure you have logged in as root).

# dmesg -c
Execute the command dmesg to make sure the logs are cleared. Check man dmesg for more help.

Both comments and pings are currently closed.

Comments are closed.