{"id":762,"date":"2026-08-11T20:07:23","date_gmt":"2026-08-11T12:07:23","guid":{"rendered":"http:\/\/www.tantan.ink\/index.php\/2026\/08\/11\/%e6%8e%92%e6%9f%a5%e8%bf%9b%e7%a8%8b%e5%90%af%e5%8a%a8%e9%93%be%ef%bc%8c%e4%b8%80%e6%9d%a1%e5%91%bd%e4%bb%a4%e5%b0%b1%e5%a4%9f%e4%ba%86\/"},"modified":"2026-08-11T20:08:04","modified_gmt":"2026-08-11T12:08:04","slug":"%e6%8e%92%e6%9f%a5%e8%bf%9b%e7%a8%8b%e5%90%af%e5%8a%a8%e9%93%be%ef%bc%8c%e4%b8%80%e6%9d%a1%e5%91%bd%e4%bb%a4%e5%b0%b1%e5%a4%9f%e4%ba%86","status":"publish","type":"post","link":"https:\/\/www.tantan.ink\/index.php\/2026\/08\/11\/%e6%8e%92%e6%9f%a5%e8%bf%9b%e7%a8%8b%e5%90%af%e5%8a%a8%e9%93%be%ef%bc%8c%e4%b8%80%e6%9d%a1%e5%91%bd%e4%bb%a4%e5%b0%b1%e5%a4%9f%e4%ba%86\/","title":{"rendered":"\u6392\u67e5\u8fdb\u7a0b\u542f\u52a8\u94fe\uff0c\u4e00\u6761\u547d\u4ee4\u5c31\u591f\u4e86"},"content":{"rendered":"<p>\u6211\u7684NAS\u4e0a\u8dd1\u7740\u4e8c\u5341\u51e0\u4e2a\u5bb9\u5668\uff0cSSH \u8fdb\u53bb\u6392\u67e5\u95ee\u9898\u65f6\uff0c\u7ecf\u5e38\u9047\u5230\u8fd9\u6837\u7684\u573a\u666f\uff1a\u770b\u5230\u4e2a\u964c\u751f\u8fdb\u7a0b\uff0c\u4e0d\u77e5\u9053\u662f\u54ea\u4e2a\u670d\u52a1\u62c9\u8d77\u6765\u7684\uff0c\u4e5f\u4e0d\u77e5\u9053\u662f\u54ea\u4e2a\u5bb9\u5668\u91cc\u7684\u3002\u4ee5\u524d\u7684\u6807\u51c6\u6d41\u7a0b\u662f <code>lsof<\/code> \u67e5\u7aef\u53e3\u3001<code>ps<\/code> \u770b\u7236\u5b50\u5173\u7cfb\u3001<code>systemctl<\/code> \u786e\u8ba4\u670d\u52a1\u914d\u7f6e\uff0c\u4e09\u4e2a\u547d\u4ee4\u6765\u56de\u5207\uff0c\u6709\u65f6\u5019\u8fd8\u5f97\u8fdb <code>\/proc<\/code> \u76ee\u5f55\u7ffb\u73af\u5883\u53d8\u91cf\u3002<\/p>\n<p>\u6700\u8fd1\u7ffb\u5230 <a href=\"https:\/\/github.com\/pranshuparmar\/witr\">witr<\/a>\uff0c\u8fd9\u5de5\u5177\u540d\u5b57\u8d77\u5f97\u5f88\u76f4\u63a5\u2014\u2014&#8221;Why Is This Running?&#8221;\uff0c\u4e00\u6761\u547d\u4ee4\u5c31\u628a\u542f\u52a8\u94fe\u5168\u5c55\u5f00\u3002<\/p>\n<h2>\u88c5\u8d77\u6765\u4e0d\u8d39\u52b2<\/h2>\n<p>\u8de8\u5e73\u53f0\u652f\u6301\u505a\u5f97\u633a\u5168\u3002macOS \u76f4\u63a5 <code>brew install witr<\/code>\uff0cLinux \u7528\u5b89\u88c5\u811a\u672c\uff0cWindows \u6709 winget \u548c scoop\u3002Go \u5199\u7684\u5355\u4e8c\u8fdb\u5236\uff0c\u6ca1\u4f9d\u8d56\uff0c\u88c5\u5b8c\u5c31\u4e00\u4e2a\u5c0f\u6587\u4ef6\u3002<\/p>\n<p>\u9879\u76ee Apache 2.0 \u534f\u8bae\uff0cGitHub 18k+ stars\uff0c\u66f4\u65b0\u8282\u594f\u5f88\u5feb\uff0cv0.3.3 \u662f\u4e24\u4e2a\u6708\u524d\u7684\u7248\u672c\uff0c\u4f46\u770b\u63d0\u4ea4\u8bb0\u5f55\u4e00\u76f4\u5728\u4fee edge case\u3002<\/p>\n<h2>\u4e00\u6761\u547d\u4ee4\u770b\u5168\u542f\u52a8\u94fe<\/h2>\n<p>\u6700\u76f4\u63a5\u7684\u7528\u6cd5\u662f\u7ed9\u4e2a PID\uff1a<\/p>\n<pre>witr 1234<\/pre>\n<p>\u8f93\u51fa\u4e0d\u662f\u5e72\u5df4\u5df4\u7684\u4e00\u6761\u8fdb\u7a0b\u4fe1\u606f\uff0c\u800c\u662f\u628a\u56e0\u679c\u94fe\u5012\u7740\u5c55\u5f00\uff1a\u8fd9\u4e2a\u8fdb\u7a0b\u662f\u8c01\u542f\u52a8\u7684\uff0c\u4e0a\u4e00\u5c42\u7236\u8fdb\u7a0b\u662f\u4ec0\u4e48\uff0c\u6700\u7ec8\u8ffd\u6eaf\u5230 systemd \u670d\u52a1\u8fd8\u662f\u5bb9\u5668\u8fd0\u884c\u65f6\u3002\u6bd4\u6211\u81ea\u5df1\u624b\u52a8\u7ffb <code>\/proc\/{pid}\/status<\/code> \u548c <code>ppid<\/code> \u5feb\u5f97\u591a\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"900\" height=\"480\" class=\"wp-image-760 size-full\" src=\"https:\/\/www.tantan.ink\/wp-content\/uploads\/2026\/08\/witr-chain.png\" alt=\"\" srcset=\"https:\/\/www.tantan.ink\/wp-content\/uploads\/2026\/08\/witr-chain.png 900w, https:\/\/www.tantan.ink\/wp-content\/uploads\/2026\/08\/witr-chain-300x160.png 300w, https:\/\/www.tantan.ink\/wp-content\/uploads\/2026\/08\/witr-chain-768x410.png 768w\" sizes=\"auto, (max-width: 900px) 100vw, 900px\" \/><\/p>\n<p>\u67e5\u7aef\u53e3\u5360\u7528\u66f4\u7701\u4e8b\u3002\u4ee5\u524d <code>lsof -i :3000<\/code> \u53ea\u80fd\u770b\u5230\u8fdb\u7a0b\u540d\uff0cwitr \u76f4\u63a5\u7ed9\u6574\u6761\u94fe\uff1a<\/p>\n<pre>witr --port 3000<\/pre>\n<p>\u80fd\u4e00\u773c\u770b\u51fa\u8fd9\u4e2a\u7aef\u53e3\u662f\u54ea\u4e2a Docker \u5bb9\u5668\u91cc\u7684\u54ea\u4e2a\u8fdb\u7a0b\u7ed1\u5b9a\u7684\uff0c\u5bb9\u5668\u53c8\u662f\u88ab\u54ea\u4e2a compose \u9879\u76ee\u62c9\u8d77\u6765\u7684\u3002<\/p>\n<h2>\u5bb9\u5668\u548c\u6743\u9650\u7684\u8fb9\u754c<\/h2>\n<p>\u5728 Linux \u4e0a witr \u80fd\u7a7f\u900f Docker \u548c LXC \u5bb9\u5668\u7684\u8fb9\u754c\uff0c\u770b\u5230\u5bb9\u5668\u5185\u90e8\u8fdb\u7a0b\u7684\u542f\u52a8\u94fe\u3002\u4f46\u8fd9\u4e2a\u80fd\u529b\u5728 macOS \u4e0a\u53d7\u9650\u2014\u2014<code>lsof<\/code> \u8fd4\u56de\u7684 FD \u683c\u5f0f\u8ddf Linux \u4e0d\u4e00\u6837\uff0c\u52a0\u4e0a SIP \u7684\u4fdd\u62a4\uff0c\u6709\u4e9b\u7cfb\u7edf\u8fdb\u7a0b\u53ea\u80fd\u770b\u5230\u4e00\u5c42\u58f3\uff0c\u770b\u4e0d\u5230\u5b8c\u6574\u94fe\u8def\u3002<\/p>\n<p>\u53e6\u5916\u4e00\u4e2a\u63d0\u9192\uff1a\u67e5\u5176\u4ed6\u7528\u6237\u7684\u8fdb\u7a0b\u6216\u7cfb\u7edf\u7ea7\u670d\u52a1\u9700\u8981 <code>sudo<\/code>\uff0c\u5426\u5219\u53ea\u80fd\u770b\u5230\u5f53\u524d\u7528\u6237\u7a7a\u95f4\u7684\u4e1c\u897f\u3002\u6211\u7b2c\u4e00\u6b21\u8bd5\u65f6\u6ca1\u52a0 sudo\uff0c\u7ed3\u679c\u4e00\u6761\u94fe\u8d70\u5230\u4e00\u534a\u65ad\u4e86\uff0c\u8fd8\u4ee5\u4e3a\u662f bug\u3002<\/p>\n<h2>TUI \u548c JSON \u4e24\u79cd\u6a21\u5f0f<\/h2>\n<p>\u9664\u4e86\u7ec8\u7aef\u76f4\u63a5\u8f93\u51fa\uff0c<code>witr -i<\/code> \u4f1a\u8fdb\u5165\u4e00\u4e2a\u4ea4\u4e92\u5f0f TUI \u754c\u9762\uff0c\u4e0a\u4e0b\u7ffb\u8fdb\u7a0b\u5217\u8868\uff0c\u6309\u56de\u8f66\u5c55\u5f00\u8be6\u60c5\u3002\u9002\u5408\u4e0d\u60f3\u8bb0\u547d\u4ee4\u7684\u65f6\u5019\u968f\u624b\u7ffb\u4e00\u7ffb\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"900\" height=\"580\" class=\"wp-image-761 size-full\" src=\"https:\/\/www.tantan.ink\/wp-content\/uploads\/2026\/08\/witr-tui.png\" alt=\"\" srcset=\"https:\/\/www.tantan.ink\/wp-content\/uploads\/2026\/08\/witr-tui.png 900w, https:\/\/www.tantan.ink\/wp-content\/uploads\/2026\/08\/witr-tui-300x193.png 300w, https:\/\/www.tantan.ink\/wp-content\/uploads\/2026\/08\/witr-tui-768x495.png 768w\" sizes=\"auto, (max-width: 900px) 100vw, 900px\" \/><\/p>\n<p>\u5982\u679c\u8981\u63a5\u811a\u672c\u6216\u76d1\u63a7\u544a\u8b66\uff0c\u7528 JSON \u8f93\u51fa\uff1a<\/p>\n<pre>witr --json --port 8080 | jq '.causality_chain[-1].service'<\/pre>\n<p>\u9000\u51fa\u7801\u4e5f\u6709\u89c4\u8303\uff1a0 \u6210\u529f\u30011 \u672a\u627e\u5230\u30012 \u53c2\u6570\u9519\u8bef\u30013 \u8fd0\u884c\u65f6\u9519\u8bef\u3002\u505a\u81ea\u52a8\u5316\u5de1\u68c0\u65f6\u53ef\u4ee5\u76f4\u63a5\u5224\u65ad\u3002<\/p>\n<h2>\u8e29\u8fc7\u7684\u4e00\u4e2a\u5c0f\u5751<\/h2>\n<p>witr \u5728 v0.3.3 \u4e4b\u524d\u6709\u4e2a macOS \u4e0a\u7684 bug\uff1a\u4e8c\u8fdb\u5236\u88ab\u7cfb\u7edf\u6807\u8bb0\u4e3a\u5220\u9664\u72b6\u6001\u65f6\u4f1a\u51fa\u8b66\u544a\u4fe1\u606f\u3002v0.3.3 \u4fee\u6389\u4e86\u3002\u53e6\u5916 Homebrew \u548c Go \u76f4\u63a5\u5b89\u88c5\u7684\u7248\u672c\u901a\u5e38\u662f\u6700\u65b0\u7684\uff0c\u4f46 Conda \u548c AUR \u91cc\u7684\u5305\u6709\u65f6\u5019\u4f1a\u6ede\u540e\uff0c\u88c5\u4e4b\u524d\u6700\u597d\u786e\u8ba4\u4e00\u4e0b\u7248\u672c\u3002<\/p>\n<p>Windows \u7248\u672c\u6211\u8bd5\u4e86\u4e0b\uff0c\u529f\u80fd\u5b8c\u6574\u4f46\u8f93\u51fa\u4fe1\u606f\u6bd4 Linux \u7cbe\u7b80\u4e00\u4e9b\uff0c\u67d0\u4e9b\u5bb9\u5668\u4fe1\u606f\u62ff\u4e0d\u5230\uff0c\u6bd5\u7adf Windows \u6ca1\u6709 systemd \u548c cgroup \u90a3\u5957\u4e1c\u897f\u3002<\/p>\n<h2>\u6700\u540e<\/h2>\n<p>\u8fd9\u5de5\u5177\u4e0d\u662f\u76d1\u63a7\u5927\u76d8\uff0c\u4e5f\u4e0d\u662f\u8fdb\u7a0b\u7ba1\u7406\u5668\uff0c\u5c31\u89e3\u51b3\u4e00\u4e2a\u95ee\u9898\uff1a<strong>\u641e\u6e05\u695a\u4e00\u4e2a\u8fdb\u7a0b\u5230\u5e95\u662f\u4ece\u54ea\u6765\u7684<\/strong>\u3002\u5bf9\u4e8e\u624b\u4e0a\u4e00\u5806 Docker \u5bb9\u5668\u3001\u51e0\u4e2a\u670d\u52a1\u6765\u56de\u5012\u817e\u7684\u4eba\u6765\u8bf4\uff0c\u80fd\u628a\u6392\u67e5\u65f6\u95f4\u4ece&#8221;\u4e09\u4e2a\u547d\u4ee4\u6765\u56de\u5207&#8221;\u538b\u5230&#8221;\u4e00\u6761\u547d\u4ee4\u51fa\u7ed3\u679c&#8221;\uff0c\u5df2\u7ecf\u591f\u503c\u4e86\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6211\u7684NAS\u4e0a\u8dd1\u7740\u4e8c\u5341\u51e0\u4e2a\u5bb9\u5668\uff0cSSH \u8fdb\u53bb\u6392\u67e5\u95ee\u9898\u65f6\uff0c\u7ecf\u5e38\u9047\u5230\u8fd9\u6837\u7684\u573a\u666f\uff1a\u770b\u5230\u4e2a\u964c\u751f\u8fdb\u7a0b\uff0c\u4e0d\u77e5\u9053\u662f\u54ea\u4e2a\u670d\u52a1\u62c9\u8d77 &#8230; <a title=\"\u6392\u67e5\u8fdb\u7a0b\u542f\u52a8\u94fe\uff0c\u4e00\u6761\u547d\u4ee4\u5c31\u591f\u4e86\" class=\"read-more\" href=\"https:\/\/www.tantan.ink\/index.php\/2026\/08\/11\/%e6%8e%92%e6%9f%a5%e8%bf%9b%e7%a8%8b%e5%90%af%e5%8a%a8%e9%93%be%ef%bc%8c%e4%b8%80%e6%9d%a1%e5%91%bd%e4%bb%a4%e5%b0%b1%e5%a4%9f%e4%ba%86\/\" aria-label=\"\u9605\u8bfb \u6392\u67e5\u8fdb\u7a0b\u542f\u52a8\u94fe\uff0c\u4e00\u6761\u547d\u4ee4\u5c31\u591f\u4e86\">\u9605\u8bfb\u66f4\u591a<\/a><\/p>\n","protected":false},"author":2,"featured_media":759,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[176,10],"tags":[],"class_list":["post-762","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-hands-on","category-software"],"_links":{"self":[{"href":"https:\/\/www.tantan.ink\/index.php\/wp-json\/wp\/v2\/posts\/762","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tantan.ink\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tantan.ink\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tantan.ink\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tantan.ink\/index.php\/wp-json\/wp\/v2\/comments?post=762"}],"version-history":[{"count":1,"href":"https:\/\/www.tantan.ink\/index.php\/wp-json\/wp\/v2\/posts\/762\/revisions"}],"predecessor-version":[{"id":763,"href":"https:\/\/www.tantan.ink\/index.php\/wp-json\/wp\/v2\/posts\/762\/revisions\/763"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.tantan.ink\/index.php\/wp-json\/wp\/v2\/media\/759"}],"wp:attachment":[{"href":"https:\/\/www.tantan.ink\/index.php\/wp-json\/wp\/v2\/media?parent=762"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tantan.ink\/index.php\/wp-json\/wp\/v2\/categories?post=762"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tantan.ink\/index.php\/wp-json\/wp\/v2\/tags?post=762"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}