{"id":8488,"date":"2020-08-28T13:16:27","date_gmt":"2020-08-28T05:16:27","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=8488"},"modified":"2020-08-28T13:16:27","modified_gmt":"2020-08-28T05:16:27","slug":"lslk","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/lslk","title":{"rendered":"lslk\u547d\u4ee4 – \u5217\u51fa\u672c\u5730\u9501"},"content":{"rendered":"\n
lslk\u547d\u4ee4\u7684\u4f5c\u7528\u662f\u53ef\u4ee5\u5217\u51fa\u672c\u5730inode\u4e0a\u7684\u6587\u4ef6\u9501\u7684\u4fe1\u606f\u3002<\/p>\n\n\n\n
\u9501\u53ef\u4ee5\u5c5e\u4e8e\u672c\u5730\u7cfb\u7edf\u4e0a\u7684\u8fdb\u7a0b\uff0c\u4e5f\u53ef\u4ee5\u5c5e\u4e8e\u672c\u5730\u7cfb\u7edf\u662fNFS\u670d\u52a1\u5668\u7684NFS\u5ba2\u6237\u7aef\u7cfb\u7edf\u4e0a\u7684\u8fdb\u7a0b\u3002<\/p>\n\n\n\n
\u6ce8\u610f\u9009\u5b9a\u6587\u4ef6\u5982\u679c\u6ca1\u6709\u4efb\u4f55\u9009\u9879\uff0clslk\u547d\u4ee4\u5c06\u5217\u51fa\u4e0e\u7cfb\u7edf\u672c\u5730\u6587\u4ef6\u5173\u8054\u7684\u6240\u6709\u9501\u3002 \u6307\u5b9a\u9009\u62e9\u9009\u9879\u540e\uff0c\u5c06\u7981\u7528\u6240\u6709\u9501\u7684\u5217\u8868\uff0c\u5e76\u4e14\u5c06\u9009\u62e9\u9009\u9879\u8fdb\u884c\u6216\u8fd0\u7b97\u3002\u4ec5\u5217\u51fa\u6ee1\u8db3\u4efb\u4f55\u9009\u62e9\u6761\u4ef6\u7684\u9501\u3002 \u6307\u5b9a-a\u9009\u9879\u65f6\uff0c\u5c06\u7981\u7528\u6240\u6709\u9501\u7684\u5217\u8868\uff0c\u5e76\u4e14\u5c06\u9009\u62e9\u9009\u9879\u4e0e\u5728\u4e00\u8d77\u3002\u4ec5\u5217\u51fa\u7b26\u5408\u6240\u6709\u9009\u62e9\u6761\u4ef6\u7684\u9501\u3002<\/p>\n\n\n\n
\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>lslk [\u53c2\u6570] [\u8def\u5f84]<\/p>\n\n\n\n \u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n \u8f93\u51fa\u5b57\u6bb5\uff1a<\/strong><\/p>\n\n\n\n \u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n \u5217\u51fa\u6240\u6709\u7684\u9501\uff1a<\/p>\n\n\n\n \u4ece\u4e3b\u673alinuxcool.com\u4e0a\u5217\u51fa\u9501\uff1a<\/p>\n\n\n\n \u5217\u51fa\u8fdb\u7a0b1234\u548c8888\u6301\u6709\u7684\u9501\uff1a<\/p>\n\n\n\n lslk\u547d\u4ee4\u7684\u4f5c\u7528\u662f\u53ef\u4ee5\u5217\u51fa\u672c\u5730inode\u4e0a\u7684\u6587\u4ef6\u9501\u7684\u4fe1\u606f\u3002 \u9501\u53ef\u4ee5\u5c5e\u4e8e\u672c\u5730\u7cfb\u7edf\u4e0a\u7684\u8fdb\u7a0b\uff0c\u4e5f\u53ef\u4ee5\u5c5e\u4e8e\u672c\u5730\u7cfb\u7edf\u662f […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[7],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/8488"}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=8488"}],"version-history":[{"count":2,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/8488\/revisions"}],"predecessor-version":[{"id":8507,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/8488\/revisions\/8507"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=8488"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=8488"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=8488"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}-a<\/td> \u5217\u51fa\u9009\u62e9\u9009\u9879\u8fdb\u884cAND\u8fd0\u7b97<\/td><\/tr> -b<\/td> \u907f\u514d\u5185\u6838\u51fd\u6570\u53ef\u80fd\u4f1a\u963b\u585e<\/td><\/tr> -n<\/td> \u7981\u6b62\u5728\u7f51\u7edc\u4e3b\u673a\u540d\u548c\u7f51\u7edc\u5730\u5740\u4e4b\u95f4\u4e92\u76f8\u8f6c\u5316<\/td><\/tr> -i<\u4e3b\u673a\u540d><\/td> \u6309\u62e5\u6709\u8fdb\u7a0b\u662fInternet\u4e3b\u673a\u8fd8\u662f\u7f51\u7edc\u5730\u5740\u9009\u62e9\u9501\u7684\u5217\u8868<\/td><\/tr> -v<\/td> \u5217\u51fa\u7248\u672c\u4fe1\u606f<\/td><\/tr> -k<\u5185\u6838\u540d\u79f0><\/td> \u4ee5\u6307\u5b9a\u5185\u6838\u540d\u79f0\u4f5c\u4e3a\u9ed8\u8ba4\u7684\u5185\u6838\u540d\u79f0\u5217\u51fa\u6587\u4ef6\u8def\u5f84<\/td><\/tr> -p<\u8fdb\u7a0bPID><\/td> \u6309\u6240\u5c5e\u7684\u8fdb\u7a0b\u6807\u8bc6\uff08PID\uff09\u53f7\u9009\u62e9\u9501\u7684\u5217\u8868<\/td><\/tr> -S<\u8d85\u65f6\u65f6\u95f4><\/td> \u4e3a\u5185\u6838\u51fd\u6570lstat\u3001readlink\u548cstat\u6307\u5b9a\u4e00\u4e2a\u53ef\u9009\u7684\u8d85\u65f6\u65f6\u95f4\uff0c\u5355\u4f4d\u4e3a\u79d2\uff0c\u5426\u5219\u53ef\u80fd\u51fa\u73b0\u6b7b\u9501\u3002\u8d85\u65f6\u65f6\u95f4\u6700\u5c0f\u8bbe\u7f6e\u4e3a2\uff0c\u5728\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u662f15\uff0c\u5f53\u6ca1\u6709\u6307\u5b9a\u503c\u65f6\uff0c\u5219\u4f7f\u7528\u9ed8\u8ba4\u503c<\/td><\/tr> -w<\/td> \u7981\u6b62\u975e\u81f4\u547d\u8b66\u544a\u6d88\u606f<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n SRC<\/td> \u8fdb\u7a0b\u6301\u6709\u9501\u7684\u6765\u6e90<\/td><\/tr> PID<\/td> \u8fdb\u7a0b\u6301\u6709\u9501\u7684\u8fdb\u7a0b\u6807\u8bc6\u53f7<\/td><\/tr> DEV<\/td> \u9501\u7684\u6587\u4ef6\u6240\u5728\u7684\u8bbe\u5907\uff08\u4e3b\u8981\u548c\u6b21\u8981\u53f7\u7801\uff09<\/td><\/tr> INUM<\/td> \u9501\u6587\u4ef6\u7684inode\u53f7<\/td><\/tr> SZ<\/td> \u9501\u6587\u4ef6\u7684\u5927\u5c0f<\/td><\/tr> TY<\/td> \u9501\u7c7b\u578b
r:\u8bfb\u53d6
rw:\u8bfb\u53d6\u548c\u5199\u5165
w:\u5199\u5165
?:\u672a\u77e5<\/td><\/tr>M<\/td> \u9501\u7684\u5f3a\u5236\u72b6\u6001\uff1a0\u8868\u793a\u6ca1\u6709\uff0c1\u8868\u793a\u8bbe\u7f6e<\/td><\/tr> ST<\/td> \u9501\u7684\u76f8\u5bf9\u5b57\u8282\u504f\u79fb\u91cf<\/td><\/tr> WH<\/td> \u9501\u7684\u8d77\u59cb\u504f\u79fb\u91cf<\/td><\/tr> END<\/td> \u9501\u7684\u7ed3\u675f\u504f\u79fb\u91cf<\/td><\/tr> LEN<\/td> \u9501\u7684\u957f\u5ea6<\/td><\/tr> NAME<\/td> \u9501\u6587\u4ef6\u7684\u540d\u79f0<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n [root@linuxcool ~]# lslk<\/pre>\n\n\n\n
[root@localhost ~]# lslk -i\u00a0linuxcool.com<\/pre>\n\n\n\n
[root@linuxcool ~]# lslk -p 1234,8888<\/pre>\n","protected":false},"excerpt":{"rendered":"