{"id":57302,"date":"2025-08-15T10:09:51","date_gmt":"2025-08-15T02:09:51","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/57302.html"},"modified":"2025-08-15T10:09:51","modified_gmt":"2025-08-15T02:09:51","slug":"linux%e5%86%85%e6%a0%b8%e6%89%93%e5%8d%b0%e8%89%ba%e6%9c%af%ef%bc%9aprintk%e5%87%bd%e6%95%b0%e6%b7%b1%e5%ba%a6%e8%a7%a3%e6%9e%90","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/57302.html","title":{"rendered":"Linux\u5185\u6838\u6253\u5370\u827a\u672f\uff1aprintk\u51fd\u6570\u6df1\u5ea6\u89e3\u6790"},"content":{"rendered":"<h4>Linux\u5185\u6838\u6253\u5370\u827a\u672f&#xff1a;printk\u51fd\u6570\u6df1\u5ea6\u89e3\u6790<\/h4>\n<p>\u2014\u2014\u4ece\u57fa\u7840\u4f7f\u7528\u5230\u9ad8\u7ea7\u8c03\u8bd5\u6280\u5de7<\/p>\n<hr \/>\n<h5>&#x1f4da; \u76ee\u5f55<\/h5>\n<li>printk\u6838\u5fc3\u673a\u5236\u89e3\u6790<\/li>\n<li>8\u5927\u4f18\u5148\u7ea7\u8be6\u89e3\u4e0e\u5e94\u7528\u573a\u666f<\/li>\n<li>\u8f93\u51fa\u63a7\u5236\u4e0e\u9608\u503c\u914d\u7f6e<\/li>\n<li>\u5b9e\u6218\u6280\u5de7\u4e0e\u8c03\u8bd5\u65b9\u6848<\/li>\n<hr \/>\n<h4>1\ufe0f\u20e3 printk\u6838\u5fc3\u673a\u5236\u89e3\u6790<\/h4>\n<h5>\u51fd\u6570\u539f\u578b&#xff1a;<\/h5>\n<p><span class=\"token keyword\">int<\/span> <span class=\"token function\">printk<\/span><span class=\"token punctuation\">(<\/span><span class=\"token keyword\">const<\/span> <span class=\"token keyword\">char<\/span> <span class=\"token operator\">*<\/span>fmt<span class=\"token punctuation\">,<\/span> <span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">.<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<ul>\n<li>\u529f\u80fd&#xff1a;\u5185\u6838\u6001\u683c\u5f0f\u5316\u8f93\u51fa&#xff08;\u7c7b\u4f3c\u7528\u6237\u6001printf&#xff09;<\/li>\n<li>\u5b58\u50a8\u4f4d\u7f6e&#xff1a;\u5185\u6838\u73af\u5f62\u7f13\u51b2\u533a&#xff08;\/proc\/kmsg&#xff09;<\/li>\n<li>\u5173\u952e\u7279\u6027&#xff1a;\n<ul>\n<li>\u53ef\u5728\u4e2d\u65ad\u4e0a\u4e0b\u6587\u8c03\u7528<\/li>\n<li>\u652f\u6301\u683c\u5f0f\u5316\u5b57\u7b26\u4e32&#xff08;%d, %s, %p\u7b49&#xff09;<\/li>\n<li>\u7ebf\u7a0b\u5b89\u5168&#xff08;\u591a\u5904\u7406\u5668\u73af\u5883\u4e0b\u540c\u6b65\u8bbf\u95ee&#xff09;<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h5>\u57fa\u7840\u793a\u4f8b&#xff1a;<\/h5>\n<p><span class=\"token macro property\"><span class=\"token directive-hash\">#<\/span><span class=\"token directive keyword\">include<\/span> <span class=\"token string\">&lt;linux\/kernel.h&gt;<\/span><\/span><\/p>\n<p><span class=\"token comment\">\/\/ \u7b80\u5355\u8f93\u51fa<\/span><br \/>\n<span class=\"token function\">printk<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;Hello Kernel World!&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">\/\/ \u5e26\u53d8\u91cf\u8f93\u51fa<\/span><br \/>\n<span class=\"token keyword\">int<\/span> count <span class=\"token operator\">&#061;<\/span> <span class=\"token number\">5<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token function\">printk<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;Processed %d packets\\\\n&#034;<\/span><span class=\"token punctuation\">,<\/span> count<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<hr \/>\n<h4>2\ufe0f\u20e3 8\u5927\u4f18\u5148\u7ea7\u8be6\u89e3\u4e0e\u5e94\u7528\u573a\u666f<\/h4>\n<p>Linux\u5185\u6838\u5c06\u65e5\u5fd7\u5206\u4e3a8\u4e2a\u4f18\u5148\u7ea7&#xff08;0\u6700\u9ad8\u21927\u6700\u4f4e&#xff09;&#xff1a;<\/p>\n<table>\n<tr>\u4f18\u5148\u7ea7\u5b8f\u5b9a\u4e49\u63a7\u5236\u53f0\u52a8\u4f5c\u9002\u7528\u573a\u666f<\/tr>\n<tbody>\n<tr>\n<td>0<\/td>\n<td>KERN_EMERG<\/td>\n<td>\u7acb\u5373\u6253\u5370<\/td>\n<td>\u7cfb\u7edf\u5d29\u6e83\u524d\u6700\u540e\u6d88\u606f<\/td>\n<\/tr>\n<tr>\n<td>1<\/td>\n<td>KERN_ALERT<\/td>\n<td>\u7acb\u5373\u6253\u5370<\/td>\n<td>\u9700\u7acb\u5373\u5904\u7406\u7684\u786c\u4ef6\u9519\u8bef<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>KERN_CRIT<\/td>\n<td>\u7acb\u5373\u6253\u5370<\/td>\n<td>\u5173\u952e\u8f6f\u4ef6\u6545\u969c&#xff08;\u5982OOM&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>KERN_ERR<\/td>\n<td>\u7acb\u5373\u6253\u5370<\/td>\n<td>\u9a71\u52a8\u9519\u8bef&#xff08;I\/O\u5931\u8d25&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>4<\/td>\n<td>KERN_WARNING<\/td>\n<td>\u5ef6\u8fdf\u6253\u5370<\/td>\n<td>\u8b66\u544a&#xff08;\u5f02\u5e38\u4f46\u53ef\u7ee7\u7eed\u8fd0\u884c&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>5<\/td>\n<td>KERN_NOTICE<\/td>\n<td>\u5ef6\u8fdf\u6253\u5370<\/td>\n<td>\u6b63\u5e38\u4f46\u91cd\u8981\u4e8b\u4ef6&#xff08;\u6302\u8f7d\u6587\u4ef6\u7cfb\u7edf&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>6<\/td>\n<td>KERN_INFO<\/td>\n<td>\u5ef6\u8fdf\u6253\u5370<\/td>\n<td>\u4fe1\u606f\u6027\u6d88\u606f&#xff08;\u8bbe\u5907\u68c0\u6d4b&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>7<\/td>\n<td>KERN_DEBUG<\/td>\n<td>\u4e0d\u6253\u5370&#xff08;\u9700\u624b\u52a8\u5f00\u542f&#xff09;<\/td>\n<td>\u8c03\u8bd5\u4fe1\u606f<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h5>\u4f7f\u7528\u793a\u4f8b&#xff1a;<\/h5>\n<p><span class=\"token comment\">\/\/ \u7d27\u6025\u4e8b\u4ef6&#xff08;\u6700\u9ad8\u4f18\u5148\u7ea7&#xff09;<\/span><br \/>\n<span class=\"token function\">printk<\/span><span class=\"token punctuation\">(<\/span>KERN_EMERG <span class=\"token string\">&#034;CPU #%d: Critical temperature reached!\\\\n&#034;<\/span><span class=\"token punctuation\">,<\/span> cpu_id<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">\/\/ \u8c03\u8bd5\u4fe1\u606f&#xff08;\u6700\u4f4e\u4f18\u5148\u7ea7&#xff09;<\/span><br \/>\n<span class=\"token function\">printk<\/span><span class=\"token punctuation\">(<\/span>KERN_DEBUG <span class=\"token string\">&#034;GPIO %d state changed to %d\\\\n&#034;<\/span><span class=\"token punctuation\">,<\/span> pin<span class=\"token punctuation\">,<\/span> state<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<hr \/>\n<h4>3\ufe0f\u20e3 \u8f93\u51fa\u63a7\u5236\u4e0e\u9608\u503c\u914d\u7f6e<\/h4>\n<h5>\u9608\u503c\u63a7\u5236\u539f\u7406&#xff1a;<\/h5>\n<p>graph LR<br \/>\n    A[printk\u8c03\u7528] &#8211;&gt; B{\u4f18\u5148\u7ea7 &gt; \u63a7\u5236\u53f0\u9608\u503c&#xff1f;}<br \/>\n    B &#8211;&gt;|\u662f| C[\u8f93\u51fa\u5230\u63a7\u5236\u53f0]<br \/>\n    B &#8211;&gt;|\u5426| D[\u4ec5\u5b58\u50a8\u5230\u7f13\u51b2\u533a]<\/p>\n<h5>\u67e5\u770b\u5f53\u524d\u9608\u503c&#xff1a;<\/h5>\n<p><span class=\"token function\">cat<\/span> \/proc\/sys\/kernel\/printk<br \/>\n<span class=\"token comment\"># \u8f93\u51fa&#xff1a;4   4   1   7<\/span><\/p>\n<p>\u56db\u5b57\u6bb5\u89e3\u6790&#xff1a;<\/p>\n<li>\u5f53\u524d\u63a7\u5236\u53f0\u65e5\u5fd7\u7ea7\u522b&#xff08;\u9608\u503c&#xff09;&#xff1a;\u4f18\u5148\u7ea7\u9ad8\u4e8e\u6b64\u503c\u624d\u4f1a\u6253\u5370\u5230\u63a7\u5236\u53f0<\/li>\n<li>\u9ed8\u8ba4\u6d88\u606f\u65e5\u5fd7\u7ea7\u522b&#xff1a;\u672a\u6307\u5b9a\u4f18\u5148\u7ea7\u65f6\u4f7f\u7528\u7684\u9ed8\u8ba4\u503c<\/li>\n<li>\u6700\u4f4e\u5141\u8bb8\u8bbe\u7f6e\u7ea7\u522b&#xff1a;\u901a\u8fc7syslog\u53ef\u8bbe\u7f6e\u7684\u6700\u4f4e\u9608\u503c<\/li>\n<li>\u542f\u52a8\u65f6\u9ed8\u8ba4\u7ea7\u522b&#xff1a;\u7cfb\u7edf\u542f\u52a8\u521d\u671f\u7684\u9608\u503c<\/li>\n<h5>\u52a8\u6001\u4fee\u6539\u9608\u503c&#xff1a;<\/h5>\n<p><span class=\"token comment\"># \u5141\u8bb8\u6240\u6709\u6d88\u606f\u6253\u5370&#xff08;0-7\u7ea7&#xff09;<\/span><br \/>\n<span class=\"token builtin class-name\">echo<\/span> <span class=\"token number\">8<\/span> <span class=\"token operator\">&gt;<\/span> \/proc\/sys\/kernel\/printk<\/p>\n<p><span class=\"token comment\"># \u4ec5\u663e\u793a\u9519\u8bef\u53ca\u4ee5\u4e0a&#xff08;0-3\u7ea7&#xff09;<\/span><br \/>\n<span class=\"token builtin class-name\">echo<\/span> <span class=\"token number\">3<\/span> <span class=\"token operator\">&gt;<\/span> \/proc\/sys\/kernel\/printk<\/p>\n<h5>\u6c38\u4e45\u914d\u7f6e&#xff1a;<\/h5>\n<p><span class=\"token comment\"># \u7f16\u8f91sysctl\u914d\u7f6e\u6587\u4ef6<\/span><br \/>\n<span class=\"token function\">sudo<\/span> <span class=\"token function\">nano<\/span> \/etc\/sysctl.conf<br \/>\n<span class=\"token comment\"># \u6dfb\u52a0&#xff1a;kernel.printk &#061; 3 4 1 7<\/span><br \/>\n<span class=\"token function\">sudo<\/span> sysctl -p  <span class=\"token comment\"># \u7acb\u5373\u751f\u6548<\/span><\/p>\n<hr \/>\n<h4>4\ufe0f\u20e3 \u5b9e\u6218\u6280\u5de7\u4e0e\u8c03\u8bd5\u65b9\u6848<\/h4>\n<h5>\u6280\u5de71&#xff1a;\u65e5\u5fd7\u67e5\u770b\u65b9\u6cd5<\/h5>\n<p><span class=\"token comment\"># \u5b9e\u65f6\u67e5\u770b\u5185\u6838\u65e5\u5fd7&#xff08;\u63a8\u8350&#xff09;<\/span><br \/>\n<span class=\"token function\">dmesg<\/span> -w<\/p>\n<p><span class=\"token comment\"># \u6309\u4f18\u5148\u7ea7\u8fc7\u6ee4<\/span><br \/>\n<span class=\"token function\">dmesg<\/span> -l warn,err  <span class=\"token comment\"># \u53ea\u770b\u8b66\u544a\u548c\u9519\u8bef<\/span><\/p>\n<p><span class=\"token comment\"># \u6e05\u7a7a\u7f13\u51b2\u533a<\/span><br \/>\n<span class=\"token function\">dmesg<\/span> -c<\/p>\n<h5>\u6280\u5de72&#xff1a;\u8c03\u8bd5\u4fe1\u606f\u52a8\u6001\u5f00\u542f<\/h5>\n<p><span class=\"token comment\"># \u5f00\u542f\u7279\u5b9a\u6a21\u5757\u7684\u8c03\u8bd5\u4fe1\u606f&#xff08;\u9700\u6a21\u5757\u652f\u6301&#xff09;<\/span><br \/>\n<span class=\"token builtin class-name\">echo<\/span> -n <span class=\"token string\">&#039;module xhci_hcd &#043;p&#039;<\/span> <span class=\"token operator\">&gt;<\/span> \/sys\/kernel\/debug\/dynamic_debug\/control<\/p>\n<p><span class=\"token comment\"># \u5f00\u542f\u6587\u4ef6\u7ea7\u8c03\u8bd5<\/span><br \/>\n<span class=\"token builtin class-name\">echo<\/span> <span class=\"token string\">&#039;file drivers\/usb\/* &#043;p&#039;<\/span> <span class=\"token operator\">&gt;<\/span> \/sys\/kernel\/debug\/dynamic_debug\/control<\/p>\n<h5>\u6280\u5de73&#xff1a;\u683c\u5f0f\u5316\u589e\u5f3a<\/h5>\n<p><span class=\"token comment\">\/\/ \u6253\u5370\u51fd\u6570\u540d\u548c\u884c\u53f7<\/span><br \/>\n<span class=\"token function\">printk<\/span><span class=\"token punctuation\">(<\/span>KERN_DEBUG <span class=\"token string\">&#034;%s:%d &#8211; GPIO state changed\\\\n&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token constant\">__func__<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token constant\">__LINE__<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p><span class=\"token comment\">\/\/ \u6253\u5370\u8bbe\u5907\u4fe1\u606f<\/span><br \/>\n<span class=\"token keyword\">struct<\/span> <span class=\"token class-name\">device<\/span> <span class=\"token operator\">*<\/span>dev <span class=\"token operator\">&#061;<\/span> <span class=\"token operator\">&amp;<\/span>pdev<span class=\"token operator\">-&gt;<\/span>dev<span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token function\">dev_err<\/span><span class=\"token punctuation\">(<\/span>dev<span class=\"token punctuation\">,<\/span> <span class=\"token string\">&#034;DMA allocation failed&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span>  <span class=\"token comment\">\/\/ \u4e13\u7528\u8bbe\u5907\u6253\u5370API<\/span><\/p>\n<h5>\u8c03\u8bd5\u6848\u4f8b&#xff1a;\u9a71\u52a8\u52a0\u8f7d\u8ddf\u8e2a<\/h5>\n<p><span class=\"token keyword\">static<\/span> <span class=\"token keyword\">int<\/span> __init <span class=\"token function\">mydrv_init<\/span><span class=\"token punctuation\">(<\/span><span class=\"token keyword\">void<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token function\">printk<\/span><span class=\"token punctuation\">(<\/span>KERN_NOTICE <span class=\"token string\">&#034;Driver loading&#8230;\\\\n&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token keyword\">if<\/span> <span class=\"token punctuation\">(<\/span><span class=\"token function\">register_device<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token operator\">&lt;<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token function\">printk<\/span><span class=\"token punctuation\">(<\/span>KERN_ERR <span class=\"token string\">&#034;Registration failed!\\\\n&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token keyword\">return<\/span> <span class=\"token operator\">&#8211;<\/span>EIO<span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n    <span class=\"token function\">printk<\/span><span class=\"token punctuation\">(<\/span>KERN_INFO <span class=\"token string\">&#034;Device registered at 0x%p\\\\n&#034;<\/span><span class=\"token punctuation\">,<\/span> device_ptr<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token keyword\">return<\/span> <span class=\"token number\">0<\/span><span class=\"token punctuation\">;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u9884\u671f\u8f93\u51fa&#xff1a;<\/p>\n<p>[    5.678] Driver loading&#8230;<br \/>\n[    5.679] Device registered at 0xffffffc00a123000<\/p>\n<hr \/>\n<p>&#x1f4a1; \u6700\u4f73\u5b9e\u8df5&#xff1a;<\/p>\n<li>\u751f\u4ea7\u73af\u5883&#xff1a;\u9608\u503c\u8bbe\u4e3a4&#xff08;WARNING\u53ca\u4ee5\u4e0a&#xff09;&#xff0c;\u907f\u514d\u63a7\u5236\u53f0\u5237\u5c4f<\/li>\n<li>\u9a71\u52a8\u5f00\u53d1&#xff1a;\u4f7f\u7528dev_info()\u7b49\u8bbe\u5907\u4e13\u7528API\u81ea\u52a8\u9644\u52a0\u8bbe\u5907\u4fe1\u606f<\/li>\n<li>\u6027\u80fd\u654f\u611f\u533a&#xff1a;\u7528printk_ratelimited()\u9650\u5236\u9ad8\u9891\u6253\u5370<\/li>\n<li>\u957f\u671f\u65e5\u5fd7&#xff1a;\u914d\u7f6esyslogd\u8f6c\u50a8\u5230\u6587\u4ef6&#xff0c;\u907f\u514d\u73af\u5f62\u7f13\u51b2\u533a\u6ea2\u51fa<\/li>\n<hr \/>\n<p>\u6269\u5c55\u5e94\u7528&#xff1a;<\/p>\n<ul>\n<li>\u7f51\u7edc\u65e5\u5fd7&#xff1a;\u901a\u8fc7netconsole\u5c06\u5185\u6838\u65e5\u5fd7\u53d1\u9001\u5230\u8fdc\u7a0b\u670d\u52a1\u5668<\/li>\n<li>\u542f\u52a8\u8c03\u8bd5&#xff1a;\u5185\u6838\u53c2\u6570\u6dfb\u52a0loglevel&#061;7 debug\u5f00\u542f\u65e9\u671f\u542f\u52a8\u65e5\u5fd7<\/li>\n<li>\u5d29\u6e83\u8bca\u65ad&#xff1a;\u7ed3\u5408kdump\u548ccrash\u5de5\u5177\u5206\u6790printk\u8f93\u51fa\u7684\u5f02\u5e38\u4e0a\u4e0b\u6587<\/li>\n<\/ul>\n<p>\u638c\u63e1printk\u7684\u827a\u672f&#xff0c;\u60a8\u5c06\u80fd&#xff1a;<br \/>\n\u2705 \u7cbe\u51c6\u5b9a\u4f4d\u5185\u6838\u95ee\u9898 \u2705 \u4f18\u5316\u9a71\u52a8\u8c03\u8bd5\u6548\u7387 \u2705 \u6784\u5efa\u53ef\u9760\u5d4c\u5165\u5f0f\u7cfb\u7edf<\/p>\n<p>\u539f\u521b\u6280\u672f\u7b14\u8bb0&#xff0c;\u8f6c\u8f7d\u9700\u6ce8\u660e\u51fa\u5904\u3002\u66f4\u591a\u7cfb\u7edf\u7f16\u7a0b\u5185\u5bb9\u6301\u7eed\u66f4\u65b0\u4e2d\u2026<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb262\u6b21\u3002Linux\u5185\u6838\u6253\u5370\u827a\u672f\uff1aprintk\u51fd\u6570\u6df1\u5ea6\u89e3\u6790<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[5974,58,1363],"topic":[],"class_list":["post-57302","post","type-post","status-publish","format-standard","hentry","category-server","tag-a57","tag-linux","tag-1363"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Linux\u5185\u6838\u6253\u5370\u827a\u672f\uff1aprintk\u51fd\u6570\u6df1\u5ea6\u89e3\u6790 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/57302.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Linux\u5185\u6838\u6253\u5370\u827a\u672f\uff1aprintk\u51fd\u6570\u6df1\u5ea6\u89e3\u6790 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb262\u6b21\u3002Linux\u5185\u6838\u6253\u5370\u827a\u672f\uff1aprintk\u51fd\u6570\u6df1\u5ea6\u89e3\u6790\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/57302.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-08-15T02:09:51+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/57302.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/57302.html\",\"name\":\"Linux\u5185\u6838\u6253\u5370\u827a\u672f\uff1aprintk\u51fd\u6570\u6df1\u5ea6\u89e3\u6790 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-08-15T02:09:51+00:00\",\"dateModified\":\"2025-08-15T02:09:51+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/57302.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/57302.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/57302.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Linux\u5185\u6838\u6253\u5370\u827a\u672f\uff1aprintk\u51fd\u6570\u6df1\u5ea6\u89e3\u6790\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Linux\u5185\u6838\u6253\u5370\u827a\u672f\uff1aprintk\u51fd\u6570\u6df1\u5ea6\u89e3\u6790 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/57302.html","og_locale":"zh_CN","og_type":"article","og_title":"Linux\u5185\u6838\u6253\u5370\u827a\u672f\uff1aprintk\u51fd\u6570\u6df1\u5ea6\u89e3\u6790 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb262\u6b21\u3002Linux\u5185\u6838\u6253\u5370\u827a\u672f\uff1aprintk\u51fd\u6570\u6df1\u5ea6\u89e3\u6790","og_url":"https:\/\/www.wsisp.com\/helps\/57302.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-08-15T02:09:51+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/57302.html","url":"https:\/\/www.wsisp.com\/helps\/57302.html","name":"Linux\u5185\u6838\u6253\u5370\u827a\u672f\uff1aprintk\u51fd\u6570\u6df1\u5ea6\u89e3\u6790 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-08-15T02:09:51+00:00","dateModified":"2025-08-15T02:09:51+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/57302.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/57302.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/57302.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Linux\u5185\u6838\u6253\u5370\u827a\u672f\uff1aprintk\u51fd\u6570\u6df1\u5ea6\u89e3\u6790"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/57302","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=57302"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/57302\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=57302"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=57302"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=57302"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=57302"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}