{"id":63,"date":"2017-10-10T06:21:00","date_gmt":"2017-10-10T06:21:00","guid":{"rendered":"https:\/\/linuxadmin.melberi.com\/uncategorized\/how-to-disable-dmesg-output-printing-on"},"modified":"2017-10-10T09:36:24","modified_gmt":"2017-10-10T09:36:24","slug":"disable-dmesg-output-printing","status":"publish","type":"post","link":"https:\/\/www.melberi.com\/linuxadmin\/dmesg\/disable-dmesg-output-printing","title":{"rendered":"How to disable dmesg output printing on the console"},"content":{"rendered":"<p>How to disable kernel messages (dmesg) Flooding on the console<\/p>\n<div>\n<h3 style=\"text-align: left;\"><u>Method. 1<\/u><\/h3>\n<p>Edit the syslog config file\u00a0<b>\/etc\/rsyslog.conf<\/b> and do the following modification.<\/p>\n<p><b>#kern.* \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \/dev\/console<\/b><br \/>\nUnhide and Modify the above line as below<br \/>\n<b>kern.* \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \/dev\/null<\/b><\/p>\n<p>Restart the rsyslog service<br \/>\n<b>#service rsyslog restart<\/b><\/p>\n<h3><u>Method. 2<\/u><\/h3>\n<p>If the above method is not solving the problem, then try changing the dmesg log level.<\/p>\n<p>To see the current log level<br \/>\n<b>#sysctl kernel.printk<\/b><br \/>\n<b>4<\/b>\u00a0\u00a0 \u00a0 \u00a0 4 \u00a0 \u00a0 \u00a0 1 \u00a0 \u00a0 \u00a0 7<\/p>\n<p>To Change the log level<\/p>\n<div style=\"-webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;\"><\/div>\n<div style=\"-webkit-text-stroke-width: 0px; color: black; font-family: 'Times New Roman'; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;\"><b>#dmesg -n (log level)<\/b><\/div>\n<p><b>#dmesg -n 1<\/b><\/p>\n<div><b>#sysctl kernel.printk<\/b><br \/>\n<b>1\u00a0<\/b>\u00a0 \u00a0 \u00a0 4 \u00a0 \u00a0 \u00a0 1 \u00a0 \u00a0 \u00a0 7To fix at each reboot, add the following line to <b>\/etc\/rc.local<\/b> file<br \/>\n<b>dmesg -n 1<\/b><\/div>\n<\/div>\n<h4 style=\"text-align: left;\"><b><u>Supported log levels (priorities):<\/u><\/b><\/h4>\n<p>0 &#8211; emerg &#8211; system is unusable<br \/>\n<b>1 &#8211; alert &#8211; action must be taken immediately<\/b><br \/>\n2 &#8211; \u00a0crit &#8211; critical conditions<br \/>\n3 &#8211; \u00a0 \u00a0 err &#8211; error conditions<br \/>\n4 &#8211; \u00a0 \u00a0warn &#8211; warning conditions<br \/>\n5 &#8211; \u00a0notice &#8211; normal but significant condition<br \/>\n6 &#8211; \u00a0 \u00a0info &#8211; informational<br \/>\n7 &#8211; \u00a0 debug &#8211; debug-level messages<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to disable kernel messages (dmesg) Flooding on the console Method. 1 Edit the syslog config file\u00a0\/etc\/rsyslog.conf and do the following modification. #kern.* \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0&#8230; <a href=\"https:\/\/www.melberi.com\/linuxadmin\/dmesg\/disable-dmesg-output-printing\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[127],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.melberi.com\/linuxadmin\/wp-json\/wp\/v2\/posts\/63"}],"collection":[{"href":"https:\/\/www.melberi.com\/linuxadmin\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.melberi.com\/linuxadmin\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.melberi.com\/linuxadmin\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.melberi.com\/linuxadmin\/wp-json\/wp\/v2\/comments?post=63"}],"version-history":[{"count":4,"href":"https:\/\/www.melberi.com\/linuxadmin\/wp-json\/wp\/v2\/posts\/63\/revisions"}],"predecessor-version":[{"id":654,"href":"https:\/\/www.melberi.com\/linuxadmin\/wp-json\/wp\/v2\/posts\/63\/revisions\/654"}],"wp:attachment":[{"href":"https:\/\/www.melberi.com\/linuxadmin\/wp-json\/wp\/v2\/media?parent=63"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.melberi.com\/linuxadmin\/wp-json\/wp\/v2\/categories?post=63"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.melberi.com\/linuxadmin\/wp-json\/wp\/v2\/tags?post=63"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}