{"id":112342,"date":"2026-10-03T07:48:56","date_gmt":"2026-10-02T23:48:56","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/112342.html"},"modified":"2026-10-03T07:48:56","modified_gmt":"2026-10-02T23:48:56","slug":"grep-n-%e8%a1%8c%e5%8f%b7%e8%be%a8%e6%8d%a2%e8%a1%8c","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/112342.html","title":{"rendered":"grep -n \u884c\u53f7\u8fa8\u6362\u884c"},"content":{"rendered":"<p>\u8fd9\u53f0\u673a\u5668\u662f 1Panel v2&#xff0c;PHP 8.4.25 \u8dd1\u5728\u5bb9\u5668 php84 \u91cc\u3002\u5148\u5b58\u4e2a\u53d8\u91cf\u7701\u4e8b&#xff1a;<\/p>\n<p><span class=\"token builtin class-name\">export<\/span> <span class=\"token assign-left variable\">PHP_CTN<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;php84&#034;<\/span>   <span class=\"token comment\"># \u6362\u6210\u4f60\u7684 PHP \u5bb9\u5668\u540d<\/span><\/p>\n<p>\u6392\u67e5 PHP-FPM \u7684\u65f6\u5019&#xff0c;\u6211\u5728\u8bb0\u5f55\u91cc\u8bfb\u5230\u8fd9\u4e48\u4e00\u884c&#xff1a;<\/p>\n<p>pm.status_path &#061;\/status slowlog &#061; \/var\/log\/php\/fpm.slow.log<\/p>\n<p>pm.status_path \u548c slowlog \u4e24\u6761\u6307\u4ee4\u6324\u5728\u4e00\u884c\u91cc&#xff0c;\u800c\u540c\u4e00\u4e2a\u6587\u4ef6\u5176\u4ed6\u5730\u65b9\u90fd\u662f\u8001\u8001\u5b9e\u5b9e\u4e00\u884c\u4e00\u6761\u3002<\/p>\n<p>\u6211\u5f53\u65f6\u7b2c\u4e00\u53cd\u5e94\u662f\u8fd9\u6587\u4ef6\u5199\u9519\u4e86\u3002<\/p>\n<p>\u771f\u8981\u8fd9\u6837&#xff0c;FPM \u4f1a\u628a &#061; \u540e\u9762\u90a3\u6574\u4e32\u5f53\u6210\u4e00\u4e2a\u503c\u3002pm.status_path \u62ff\u5230\u7684\u503c\u5c31\u4e0d\u5bf9\u4e86\u3002\u5b83\u4f1a\u53d8\u6210 \/status slowlog &#061; \/var\/log\/php\/fpm.slow.log&#xff0c;slowlog \u7b49\u4e8e\u6ca1\u8bbe\u7f6e\u3002<\/p>\n<p>\u800c\u8fd9\u4e2a\u6587\u4ef6\u91cc request_slowlog_timeout &#061; 3 \u662f\u5f00\u7740\u7684\u3002\u4e24\u4e2a\u51d1\u4e00\u8d77&#xff0c;\u6162\u65e5\u5fd7\u6c38\u8fdc\u4e0d\u4f1a\u843d\u76d8\u3002\u72b6\u6001\u9875\u5730\u5740\u4e5f\u53d8\u6210\u4e00\u4e32\u8c01\u90fd\u8ba4\u4e0d\u51fa\u6765\u7684\u8def\u5f84\u3002<\/p>\n<p>\u96be\u53d7\u7684\u662f\u5b83\u4e0d\u62a5\u9519\u3002FPM \u7167\u5e38\u8d77&#xff0c;\u670d\u52a1\u7167\u5e38\u8dd1&#xff0c;\u4f60\u53ea\u662f\u6c38\u8fdc\u62ff\u4e0d\u5230\u8fd9\u4e24\u9879\u80fd\u529b\u3002<\/p>\n<p>\u4f46\u90a3\u662f\u300c\u5982\u679c\u300d\u3002\u5230\u5e95\u662f\u4e0d\u662f&#xff0c;\u5f97\u95ee\u6587\u4ef6\u672c\u8eab\u3002<\/p>\n<p>\u65f6\u95f4\u7ebf\u4ea4\u4ee3\u4e00\u53e5&#xff1a;2026-09-16 \u7b2c\u4e00\u6b21\u8bfb\u5230\u90a3\u884c\u8bb0\u5f55&#xff0c;09-17 \u7528 grep -n \u5728\u670d\u52a1\u5668\u4e0a\u590d\u9a8c\u3002\u672c\u673a\u90a3\u4efd\u5bf9\u7167\u662f\u6211\u81ea\u5df1\u9020\u540c\u6784\u6587\u4ef6\u8dd1\u7684&#xff0c;\u56e0\u4e3a\u300c\u5047\u8c61\u957f\u4ec0\u4e48\u6837\u300d\u548c\u300c\u771f\u76f8\u957f\u4ec0\u4e48\u6837\u300d\u5f97\u6446\u5728\u4e00\u8d77\u624d\u8bf4\u5f97\u6e05\u3002<\/p>\n<p>\u5224\u636e\u53ea\u6709\u4e00\u6761&#xff1a;grep -n \u662f\u6309\u884c\u626b\u63cf\u7684&#xff0c;\u4e00\u884c\u53ea\u4f1a\u7ed9\u4e00\u4e2a\u884c\u53f7\u3002<\/p>\n<p>\u8981\u662f\u5185\u5bb9\u771f\u5728\u540c\u4e00\u884c&#xff0c;\u8f93\u51fa\u4f1a\u662f\u8fd9\u6837&#xff1a;<\/p>\n<p>1:pm.status_path &#061;\/status slowlog &#061; \/var\/log\/php\/fpm.slow.log<\/p>\n<p>\u4e24\u4e2a\u5173\u952e\u8bcd\u843d\u5728\u540c\u4e00\u4e2a 1: \u540e\u9762\u3002<\/p>\n<p>\u8981\u662f\u4e24\u884c&#xff0c;\u4f60\u4f1a\u770b\u5230\u4e24\u4e2a\u4e0d\u540c\u7684\u884c\u53f7\u3002<\/p>\n<p>\u5728\u670d\u52a1\u5668\u4e0a\u8dd1\u7684\u662f\u8fd9\u6761\u3002\u914d\u7f6e\u6587\u4ef6\u5728\u5bbf\u4e3b\u673a\u7684 \/opt\/1panel\/runtime\/php\/&lt;\u8fd0\u884c\u73af\u5883\u540d&gt;\/conf\/php-fpm.conf&#xff1a;<\/p>\n<p><span class=\"token function\">grep<\/span> <span class=\"token parameter variable\">-n<\/span> <span class=\"token string\">&#039;pm.status_path\\\\|slowlog&#039;<\/span> \/opt\/1panel\/runtime\/php\/<span class=\"token variable\">$PHP_CTN<\/span>\/conf\/php-fpm.conf<\/p>\n<p>\u56de\u663e&#xff1a;<\/p>\n<p>13:pm.status_path &#061;\/status 14:slowlog &#061; \/var\/log\/php\/fpm.slow.log<br \/>\n15:request_slowlog_timeout &#061; 3<\/p>\n<p>\u6ce8\u610f\u8fd9\u6761\u56de\u663e\u81ea\u5df1\u4e5f\u4e22\u4e86\u6362\u884c\u2014\u201413: \u548c 14: \u5728\u8bb0\u5f55\u91cc\u662f\u88ab\u62fc\u5230\u540c\u4e00\u884c\u7684\u3002<\/p>\n<p>\u8fd9\u4e0d\u5f71\u54cd\u5224\u65ad\u3002\u5224\u636e\u662f\u884c\u53f7\u524d\u7f00\u672c\u8eab&#xff0c;\u4e0d\u662f\u5b83\u6392\u6210\u4ec0\u4e48\u6837\u3002<\/p>\n<p>13: \u548c 14: \u662f\u4e24\u4e2a\u4e0d\u540c\u7684\u884c\u53f7\u3002grep \u4e0d\u53ef\u80fd\u5bf9\u540c\u4e00\u884c\u7ed9\u51fa\u4e24\u4e2a\u884c\u53f7\u3002<\/p>\n<p>\u6240\u4ee5\u6587\u4ef6\u91cc pm.status_path \u5728\u7b2c 13 \u884c\u3001slowlog \u5728\u7b2c 14 \u884c&#xff0c;\u672c\u6765\u5c31\u662f\u4e24\u884c&#xff0c;\u683c\u5f0f\u662f\u597d\u7684\u3002<\/p>\n<p>\u987a\u5e26\u89e3\u91ca\u4e00\u4e0b\u7b2c\u4e09\u884c 15:\u3002grep &#039;slowlog&#039; \u662f\u5b50\u4e32\u5339\u914d&#xff0c;request_slowlog_timeout \u91cc\u4e5f\u542b slowlog&#xff0c;\u4e00\u8d77\u88ab\u547d\u4e2d\u4e86\u3002<\/p>\n<p>\u53ea\u770b\u670d\u52a1\u5668\u4e0a\u7684\u56de\u663e&#xff0c;\u89c9\u5f97\u6709\u53ef\u80fd\u6709\u95ee\u9898&#xff0c;\u6240\u4ee5\u6211\u5728\u672c\u673a\u9020\u4e86\u4e2a 15 \u884c\u7684\u540c\u6784\u6587\u4ef6&#xff0c;\u8ba9\u5173\u952e\u4e24\u884c\u6b63\u597d\u843d\u5728 13\/14&#xff0c;\u628a\u4e24\u79cd\u60c5\u5f62\u5404\u8dd1\u4e00\u904d\u3002<\/p>\n<p>\u60c5\u5f62\u4e00&#xff0c;\u6587\u4ef6\u91cc\u672c\u6765\u5c31\u662f\u4e24\u884c&#xff1a;<\/p>\n<p>$ grep -n &#034;pm.status_path\\\\|slowlog&#034; mock-fpm.conf<br \/>\n13:pm.status_path &#061;\/status<br \/>\n14:slowlog &#061; \/var\/log\/php\/fpm.slow.log<br \/>\n15:request_slowlog_timeout &#061; 3<\/p>\n<p>\u60c5\u5f62\u4e8c&#xff0c;\u6587\u4ef6\u91cc\u771f\u7684\u6324\u6210\u4e86\u4e00\u884c&#xff1a;<\/p>\n<p>$ grep -n &#034;pm.status_path\\\\|slowlog&#034; oneline.conf<br \/>\n1:pm.status_path &#061;\/status slowlog &#061; \/var\/log\/php\/fpm.slow.log<br \/>\n2:request_slowlog_timeout &#061; 3<\/p>\n<p>\u4e24\u6761\u547d\u4ee4\u53ea\u5dee\u4e00\u4e2a\u6587\u4ef6\u540d&#xff0c;\u8f93\u51fa\u7684\u533a\u522b\u5f88\u76f4\u63a5\u3002\u60c5\u5f62\u4e00\u91cc\u4e24\u4e2a\u5173\u952e\u8bcd\u5206\u522b\u6302\u7740 13: \u548c 14:\u3002\u60c5\u5f62\u4e8c\u91cc\u4e24\u4e2a\u5173\u952e\u8bcd\u90fd\u6302\u5728 1: \u540e\u9762\u3002<\/p>\n<p>\u5c31\u8fd9\u4e48\u4e00\u6761&#xff1a;\u4e24\u4e2a\u5173\u952e\u8bcd\u524d\u9762\u7684\u884c\u53f7\u4e00\u4e0d\u4e00\u6837\u3002<\/p>\n<p>\u90a3\u53e5\u300c\u6324\u5728\u4e00\u884c\u300d\u7684\u539f\u6587\u662f\u600e\u4e48\u6765\u7684&#xff1f;\u628a\u4e24\u884c\u7528\u7ba1\u9053\u62fc\u4e00\u4e0b\u5c31\u51fa\u6765\u4e86&#xff1a;<\/p>\n<p>$ <span class=\"token function\">sed<\/span> <span class=\"token parameter variable\">-n<\/span> <span class=\"token string\">&#034;13,14p&#034;<\/span> mock-fpm.conf <span class=\"token operator\">|<\/span> <span class=\"token function\">tr<\/span> <span class=\"token string\">&#034;<span class=\"token entity\" title=\"\\\\n\">\\\\n<\/span>&#034;<\/span> <span class=\"token string\">&#034; &#034;<\/span><br \/>\npm.status_path <span class=\"token operator\">&#061;<\/span>\/status slowlog <span class=\"token operator\">&#061;<\/span> \/var\/log\/php\/fpm.slow.log<\/p>\n<p>\u548c\u8bb0\u5f55\u91cc\u90a3\u53e5\u4e00\u5b57\u4e0d\u5dee\u3002\u800c sed -n &#034;13,14p&#034; \u672c\u8eab\u53d6\u7684\u662f\u4e24\u884c\u2014\u2014\u6362\u884c\u662f\u5728\u663e\u793a\u548c\u7c98\u8d34\u73af\u8282\u4e22\u6389\u7684&#xff0c;\u6587\u4ef6\u91cc\u4e00\u76f4\u90fd\u6709\u3002<\/p>\n<p>\u4e2d\u95f4\u9694\u7740\u597d\u51e0\u5c42&#xff0c;\u6bcf\u4e00\u5c42\u90fd\u80fd\u6539\u6362\u884c\u3002SSH \u5ba2\u6237\u7aef\u7c98\u8d34\u591a\u884c\u65f6\u628a\u6362\u884c\u541e\u6210\u7a7a\u683c\u3002\u7ec8\u7aef\u56de\u6eda\u7f13\u51b2\u590d\u5236\u65f6\u8de8\u4e86\u8f6f\u6362\u884c\u8fb9\u754c&#xff0c;\u4e24\u884c\u88ab\u63a5\u8d77\u6765\u3002\u7c98\u8fdb IM \u6216\u6587\u6863\u518d\u590d\u5236\u51fa\u6765&#xff0c;\u6362\u884c\u88ab\u89c4\u8303\u5316\u3002\u8fd8\u6709 LF \u548c CRLF \u6df7\u7528\u3002<\/p>\n<p>\u6240\u4ee5\u51e1\u662f\u300c\u6587\u4ef6\u91cc\u5230\u5e95\u600e\u4e48\u5199\u7684\u300d\u8fd9\u7c7b\u95ee\u9898&#xff0c;\u7ed3\u8bba\u5fc5\u987b\u6765\u81ea\u5de5\u5177\u7ed9\u7684\u5143\u4fe1\u606f&#xff0c;\u4e0d\u80fd\u6765\u81ea\u8089\u773c\u770b\u6392\u7248\u3002<\/p>\n<p>\u4e09\u6761\u547d\u4ee4\u591f\u7528\u4e86\u3002<\/p>\n<p>\u62ff\u884c\u53f7\u5b9a\u4f4d&#xff1a;<\/p>\n<p><span class=\"token function\">grep<\/span> <span class=\"token parameter variable\">-n<\/span> <span class=\"token string\">&#039;\u5173\u952e\u8bcd&#039;<\/span> \/path\/to\/config<\/p>\n<p>\u53d6\u7cbe\u786e\u539f\u6587&#xff0c;\u4e00\u6b21\u53ea\u53d6\u4f60\u5173\u5fc3\u7684\u90a3\u4e24\u884c&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u53ea\u53d6\u7b2c 13 \u884c\u548c\u7b2c 14 \u884c&#xff0c;\u4e0d\u5e26\u884c\u53f7\u3001\u4e0d\u5e26\u591a\u4f59\u5185\u5bb9<\/span><br \/>\n<span class=\"token function\">sed<\/span> <span class=\"token parameter variable\">-n<\/span> <span class=\"token string\">&#039;13p;14p&#039;<\/span> \/path\/to\/config<\/p>\n<p>\u8f93\u51fa\u662f\u5e72\u51c0\u7684\u539f\u6587&#xff0c;\u4e0d\u5e26\u884c\u53f7\u4e5f\u4e0d\u5e26\u591a\u4f59\u5185\u5bb9&#xff1a;<\/p>\n<p>pm.status_path &#061;\/status<br \/>\nslowlog &#061; \/var\/log\/php\/fpm.slow.log<\/p>\n<p>\u6bd4 cat \u6574\u4e2a\u6587\u4ef6\u518d\u8089\u773c\u627e\u53ef\u9760\u5f97\u591a\u3002<\/p>\n<p>\u770b\u884c\u5c3e\u548c\u9690\u85cf\u5b57\u7b26&#xff0c;\u8fd9\u6761\u662f\u7ec8\u6781\u624b\u6bb5&#xff1a;<\/p>\n<p><span class=\"token function\">cat<\/span> <span class=\"token parameter variable\">-A<\/span> \/path\/to\/config<\/p>\n<p>-A \u4f1a\u628a\u6240\u6709\u4e0d\u53ef\u89c1\u5b57\u7b26\u663e\u5f0f\u6253\u51fa\u6765&#xff0c;\u884c\u5c3e\u7684\u6362\u884c\u7b26\u53d8\u6210\u53ef\u89c1\u7684 $\u3002LF \u6587\u4ef6\u957f\u8fd9\u6837&#xff1a;<\/p>\n<p>; filler 1$<br \/>\n; filler 2$<\/p>\n<p>CRLF \u6587\u4ef6\u957f\u8fd9\u6837&#xff1a;<\/p>\n<p>a&#061;1^M$<br \/>\nb&#061;2^M$<\/p>\n<p>^M$ \u5c31\u662f\u56de\u8f66\u52a0\u6362\u884c\u3002\u6362\u884c\u98ce\u683c\u5bf9\u4e0d\u5bf9&#xff0c;\u4e00\u773c\u5c31\u770b\u51fa\u6765\u3002<\/p>\n<p>\u8fd8\u6709\u4e24\u6761\u987a\u624b\u7684\u3002\u5224\u65ad\u6362\u884c\u98ce\u683c&#xff0c;\u4e0d\u52a8\u5185\u5bb9&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u5224\u65ad\u6587\u4ef6\u7684\u6362\u884c\u98ce\u683c&#xff08;\u4e0d\u52a8\u5185\u5bb9&#xff09;<\/span><br \/>\n<span class=\"token function\">file<\/span> \/path\/to\/config<\/p>\n<p>\u8f93\u51fa\u76f4\u63a5\u5199\u660e\u767d&#xff1a;<\/p>\n<p>mock-fpm.conf: ASCII text<br \/>\ncrlf.conf:     ASCII text, with CRLF line terminators<\/p>\n<p>\u60f3\u77e5\u9053\u8fd9\u6587\u4ef6\u5230\u5e95\u591a\u5c11\u884c&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u884c\u6570\u2014\u2014\u7528\u6765\u8bf4\u670d\u81ea\u5df1&#034;\u8fd9\u6587\u4ef6\u5230\u5e95\u6709\u591a\u5c11\u884c&#034;<\/span><br \/>\n<span class=\"token function\">wc<\/span> <span class=\"token parameter variable\">-l<\/span> <span class=\"token operator\">&lt;<\/span> \/path\/to\/config<\/p>\n<p>\u540c\u4e00\u4e2a\u6587\u4ef6\u91cc\u8fd8\u6709\u4e00\u5904\u770b\u7740\u522b\u626d\u7684&#xff1a;<\/p>\n<p>pm.status_path &#061;\/status<\/p>\n<p>&#061; \u540e\u9762\u7f3a\u4e00\u4e2a\u7a7a\u683c&#xff0c;\u5176\u4ed6\u5730\u65b9\u5199\u7684\u90fd\u662f &#061;&#xff0c;\u6bd4\u5982 slowlog &#061; \/var\/log\/php\/fpm.slow.log\u3002<\/p>\n<p>\u8981\u4e0d\u8981\u4fee&#xff1f;\u6211\u7684\u5904\u7406\u662f\u4e0d\u6539\u3002<\/p>\n<p>\u7406\u7531&#xff1a;\u683c\u5f0f\u4e0d\u4e00\u81f4\u4e0d\u7b49\u4e8e\u8bed\u6cd5\u9519\u8bef\u3002FPM \u7684 ini \u89e3\u6790\u5668\u5bb9\u5fcd\u8fd9\u79cd\u5199\u6cd5&#xff0c;&#061; \u4e24\u4fa7\u7684\u7a7a\u767d\u4e0d\u5f71\u54cd\u53d6\u503c&#xff0c;\u529f\u80fd\u4e0d\u53d7\u5f71\u54cd\u3002\u771f\u8981\u786e\u8ba4\u5b83\u6ca1\u5f71\u54cd&#xff0c;\u6709\u4e24\u6761\u8def\u2014\u2014\u67e5\u89e3\u6790\u5668\u6587\u6863\u91cc\u7684\u7a7a\u767d\u5904\u7406\u89c4\u5219&#xff0c;\u6216\u8005\u76f4\u63a5\u9a8c\u8fd0\u884c\u65f6\u884c\u4e3a\u3002\u6bd4\u5982\u8bbf\u95ee\u4e00\u6b21\u72b6\u6001\u9875&#xff0c;\u770b \/status \u80fd\u4e0d\u80fd\u6b63\u5e38\u54cd\u5e94\u3002<\/p>\n<p>\u6539\u5b83\u5f97\u91cd\u542f FPM&#xff0c;\u800c\u91cd\u542f\u7684\u6536\u76ca\u662f\u96f6\u3002\u4e3a\u4e00\u4e2a\u4e0d\u5f71\u54cd\u884c\u4e3a\u7684\u5199\u6cd5\u53bb\u52a8\u751f\u4ea7\u670d\u52a1&#xff0c;\u662f\u8d1f\u6570\u6536\u76ca\u3002<\/p>\n<p>\u8fd9\u6761\u5224\u65ad\u6211\u753b\u6210\u4e86\u56fe&#xff1a;<\/p>\n<p>#mermaid-svg-n3w5jBeaxR7OzewI{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-n3w5jBeaxR7OzewI .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-n3w5jBeaxR7OzewI .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-n3w5jBeaxR7OzewI .error-icon{fill:#552222;}#mermaid-svg-n3w5jBeaxR7OzewI .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-n3w5jBeaxR7OzewI .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-n3w5jBeaxR7OzewI .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-n3w5jBeaxR7OzewI .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-n3w5jBeaxR7OzewI .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-n3w5jBeaxR7OzewI .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-n3w5jBeaxR7OzewI .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-n3w5jBeaxR7OzewI .marker{fill:#333333;stroke:#333333;}#mermaid-svg-n3w5jBeaxR7OzewI .marker.cross{stroke:#333333;}#mermaid-svg-n3w5jBeaxR7OzewI svg{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-n3w5jBeaxR7OzewI p{margin:0;}#mermaid-svg-n3w5jBeaxR7OzewI .label{font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;color:#333;}#mermaid-svg-n3w5jBeaxR7OzewI .cluster-label text{fill:#333;}#mermaid-svg-n3w5jBeaxR7OzewI .cluster-label span{color:#333;}#mermaid-svg-n3w5jBeaxR7OzewI .cluster-label span p{background-color:transparent;}#mermaid-svg-n3w5jBeaxR7OzewI .label text,#mermaid-svg-n3w5jBeaxR7OzewI span{fill:#333;color:#333;}#mermaid-svg-n3w5jBeaxR7OzewI .node rect,#mermaid-svg-n3w5jBeaxR7OzewI .node circle,#mermaid-svg-n3w5jBeaxR7OzewI .node ellipse,#mermaid-svg-n3w5jBeaxR7OzewI .node polygon,#mermaid-svg-n3w5jBeaxR7OzewI .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-n3w5jBeaxR7OzewI .rough-node .label text,#mermaid-svg-n3w5jBeaxR7OzewI .node .label text,#mermaid-svg-n3w5jBeaxR7OzewI .image-shape .label,#mermaid-svg-n3w5jBeaxR7OzewI .icon-shape .label{text-anchor:middle;}#mermaid-svg-n3w5jBeaxR7OzewI .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-n3w5jBeaxR7OzewI .rough-node .label,#mermaid-svg-n3w5jBeaxR7OzewI .node .label,#mermaid-svg-n3w5jBeaxR7OzewI .image-shape .label,#mermaid-svg-n3w5jBeaxR7OzewI .icon-shape .label{text-align:center;}#mermaid-svg-n3w5jBeaxR7OzewI .node.clickable{cursor:pointer;}#mermaid-svg-n3w5jBeaxR7OzewI .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-n3w5jBeaxR7OzewI .arrowheadPath{fill:#333333;}#mermaid-svg-n3w5jBeaxR7OzewI .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-n3w5jBeaxR7OzewI .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-n3w5jBeaxR7OzewI .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-n3w5jBeaxR7OzewI .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-n3w5jBeaxR7OzewI .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-n3w5jBeaxR7OzewI .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-n3w5jBeaxR7OzewI .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-n3w5jBeaxR7OzewI .cluster text{fill:#333;}#mermaid-svg-n3w5jBeaxR7OzewI .cluster span{color:#333;}#mermaid-svg-n3w5jBeaxR7OzewI div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-n3w5jBeaxR7OzewI .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-n3w5jBeaxR7OzewI rect.text{fill:none;stroke-width:0;}#mermaid-svg-n3w5jBeaxR7OzewI .icon-shape,#mermaid-svg-n3w5jBeaxR7OzewI .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-n3w5jBeaxR7OzewI .icon-shape p,#mermaid-svg-n3w5jBeaxR7OzewI .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-n3w5jBeaxR7OzewI .icon-shape .label rect,#mermaid-svg-n3w5jBeaxR7OzewI .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-n3w5jBeaxR7OzewI .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-n3w5jBeaxR7OzewI .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-n3w5jBeaxR7OzewI :root{&#8211;mermaid-font-family:\\&#8221;trebuchet ms\\&#8221;,verdana,arial,sans-serif;}<span class=\"edgeLabel\"><\/span><span class=\"edgeLabel\"><\/span><span class=\"edgeLabel\"><\/p>\n<p>\u76f8\u540c<\/p>\n<p><\/span><span class=\"edgeLabel\"><\/p>\n<p>\u4e0d\u540c<\/p>\n<p><\/span><span class=\"edgeLabel\"><\/span><span class=\"edgeLabel\"><\/span><span style=\"color:#1f2328 !important\" class=\"nodeLabel\"><\/p>\n<p>\u914d\u7f6e\u6587\u4ef6\u91cc\u770b\u5230\u53ef\u7591\u7684\u4e00\u884c<\/p>\n<p><\/span><span class=\"nodeLabel\"><\/p>\n<p>\u5148\u8dd1 grep -n \u62ff\u884c\u53f7<\/p>\n<p><\/span><span style=\"color:#1f2328 !important\" class=\"nodeLabel\"><\/p>\n<p>\u4e24\u4e2a\u5173\u952e\u8bcd\u884c\u53f7\u76f8\u540c\u5417&#xff1f;<\/p>\n<p><\/span><span style=\"color:#d1242f !important\" class=\"nodeLabel\"><\/p>\n<p>\u786e\u5b9e\u5728\u540c\u4e00\u884c\u518d\u5224\u65ad\u8bed\u6cd5\u662f\u5426\u88ab\u63a5\u53d7<\/p>\n<p><\/span><span style=\"color:#1a7f37 !important\" class=\"nodeLabel\"><\/p>\n<p>\u6587\u4ef6\u91cc\u672c\u5c31\u662f\u4e24\u884c\u662f\u663e\u793a\u6216\u7c98\u8d34\u4e22\u4e86\u6362\u884c<\/p>\n<p><\/span><span class=\"nodeLabel\"><\/p>\n<p>sed -n \u53d6\u7cbe\u786e\u539f\u6587cat -A \u770b\u884c\u5c3e\u5b57\u7b26<\/p>\n<p><\/span><\/p>\n<p>\u6392\u4e0b\u6765\u5c31\u56db\u6761\u3002\u5185\u5bb9\u662f\u4e0d\u662f\u540c\u51fa\u4e00\u884c&#xff0c;\u8dd1 grep -n &#039;\u5173\u952e\u8bcd&#039; \u770b\u884c\u53f7&#xff0c;\u76f8\u540c\u5c31\u662f\u4e00\u884c\u3001\u4e0d\u540c\u5c31\u662f\u4e24\u884c\u3002\u90a3\u4e00\u884c\u5230\u5e95\u5199\u4e86\u4ec0\u4e48&#xff0c;\u7528 sed -n &#039;Np&#039; file \u62ff\u7cbe\u786e\u539f\u6587&#xff0c;\u4e0d\u53d7\u7c98\u8d34\u5f71\u54cd\u3002\u6362\u884c\u7b26\u4ec0\u4e48\u98ce\u683c&#xff0c;\u7528 cat -A \u6216 file&#xff0c;$ \u662f LF\u3001^M$ \u662f CRLF\u3002\u683c\u5f0f\u4e0d\u4e00\u81f4\u8981\u4e0d\u8981\u4fee&#xff0c;\u770b\u89e3\u6790\u5668\u5bb9\u5fcd\u5ea6\u548c\u8fd0\u884c\u65f6\u884c\u4e3a&#xff0c;\u4e0d\u5f71\u54cd\u884c\u4e3a\u7684\u5c31\u4e0d\u6539\u3002<\/p>\n<p>\u8bdd\u8bf4\u56de\u6765&#xff0c;\u773c\u91cc\u770b\u5230\u7684\u90a3\u884c\u548c\u6587\u4ef6\u91cc\u7684\u5b57\u8282\u4e4b\u95f4&#xff0c;\u8fd8\u9694\u7740\u7ec8\u7aef\u3001\u56de\u6eda\u7f13\u51b2\u3001\u7c98\u8d34\u3001\u8de8\u5e73\u53f0\u6362\u884c\u7b26\u8fd9\u51e0\u5c42\u3002\u54ea\u4e00\u5c42\u90fd\u4e0d\u4f1a\u544a\u8bc9\u4f60\u5b83\u52a8\u4e86\u624b\u811a\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8fd9\u53f0\u673a\u5668\u662f 1Panel v2&#xff0c;PHP 8.4.25 \u8dd1\u5728\u5bb9\u5668 php84 \u91cc\u3002\u5148\u5b58\u4e2a\u53d8\u91cf\u7701\u4e8b&#xff1a;<br \/>\nexport PHP_CTN\\&#8221;php84\\&#8221;   # \u6362\u6210\u4f60\u7684 PHP \u5bb9\u5668\u540d\u6392\u67e5 PHP-FPM \u7684\u65f6\u5019&#xff0c;\u6211\u5728\u8bb0\u5f55\u91cc\u8bfb\u5230\u8fd9\u4e48\u4e00\u884c&#xff1a;<br \/>\npm.status_path \/status slowlog  \/var\/log\/php\/fpm.slow.logpm.status_path \u548c slowlog \u4e24\u6761\u6307\u4ee4\u6324\u5728\u4e00\u884c\u91cc&amp;#xff0<\/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":[9098,103],"topic":[],"class_list":["post-112342","post","type-post","status-publish","format-standard","hentry","category-server","tag-it","tag-ubuntu"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>grep -n \u884c\u53f7\u8fa8\u6362\u884c - \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\/112342.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"grep -n \u884c\u53f7\u8fa8\u6362\u884c - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u8fd9\u53f0\u673a\u5668\u662f 1Panel v2&#xff0c;PHP 8.4.25 \u8dd1\u5728\u5bb9\u5668 php84 \u91cc\u3002\u5148\u5b58\u4e2a\u53d8\u91cf\u7701\u4e8b&#xff1a; export PHP_CTN&quot;php84&quot;  # \u6362\u6210\u4f60\u7684 PHP \u5bb9\u5668\u540d\u6392\u67e5 PHP-FPM \u7684\u65f6\u5019&#xff0c;\u6211\u5728\u8bb0\u5f55\u91cc\u8bfb\u5230\u8fd9\u4e48\u4e00\u884c&#xff1a; pm.status_path \/status slowlog \/var\/log\/php\/fpm.slow.logpm.status_path \u548c slowlog \u4e24\u6761\u6307\u4ee4\u6324\u5728\u4e00\u884c\u91cc&amp;#xff0\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/112342.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-02T23:48:56+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=\"5 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/112342.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/112342.html\",\"name\":\"grep -n \u884c\u53f7\u8fa8\u6362\u884c - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-10-02T23:48:56+00:00\",\"dateModified\":\"2026-10-02T23:48:56+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/112342.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/112342.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/112342.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"grep -n \u884c\u53f7\u8fa8\u6362\u884c\"}]},{\"@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":"grep -n \u884c\u53f7\u8fa8\u6362\u884c - \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\/112342.html","og_locale":"zh_CN","og_type":"article","og_title":"grep -n \u884c\u53f7\u8fa8\u6362\u884c - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u8fd9\u53f0\u673a\u5668\u662f 1Panel v2&#xff0c;PHP 8.4.25 \u8dd1\u5728\u5bb9\u5668 php84 \u91cc\u3002\u5148\u5b58\u4e2a\u53d8\u91cf\u7701\u4e8b&#xff1a; export PHP_CTN\"php84\"  # \u6362\u6210\u4f60\u7684 PHP \u5bb9\u5668\u540d\u6392\u67e5 PHP-FPM \u7684\u65f6\u5019&#xff0c;\u6211\u5728\u8bb0\u5f55\u91cc\u8bfb\u5230\u8fd9\u4e48\u4e00\u884c&#xff1a; pm.status_path \/status slowlog \/var\/log\/php\/fpm.slow.logpm.status_path \u548c slowlog \u4e24\u6761\u6307\u4ee4\u6324\u5728\u4e00\u884c\u91cc&amp;#xff0","og_url":"https:\/\/www.wsisp.com\/helps\/112342.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-10-02T23:48:56+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"5 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/112342.html","url":"https:\/\/www.wsisp.com\/helps\/112342.html","name":"grep -n \u884c\u53f7\u8fa8\u6362\u884c - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-10-02T23:48:56+00:00","dateModified":"2026-10-02T23:48:56+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/112342.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/112342.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/112342.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"grep -n \u884c\u53f7\u8fa8\u6362\u884c"}]},{"@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\/112342","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=112342"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/112342\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=112342"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=112342"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=112342"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=112342"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}