{"id":2012,"date":"2019-05-16T23:32:02","date_gmt":"2019-05-16T15:32:02","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=2012"},"modified":"2019-05-19T15:54:47","modified_gmt":"2019-05-19T07:54:47","slug":"lnstat","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/lnstat","title":{"rendered":"lnstat\u547d\u4ee4 – \u663e\u793aLinux\u7cfb\u7edf\u7684\u7f51\u8def\u72b6\u6001"},"content":{"rendered":"\n
lnstat\u547d\u4ee4\u5b9e\u9645\u4e0a\u662f\u8bfb\u53d6\u7cfb\u7edf\u201c\/proc\u201d\u4e2d\u76ee\u5f55\u201c\/proc\/net\/stat\u201d\u4e0b\u9762\u7684\u6587\u4ef6\uff0c\u6765\u663e\u793a\u5f53\u524d\u4e3b\u673a\u7684\u7f51\u7edc\u72b6\u6001\u7684\u3002lnstat\u547d\u4ee4\u662frtstat\u547d\u4ee4\u7684\u66f4\u65b0\u66ff\u4ee3\u547d\u4ee4\uff0c\u529f\u80fd\u66f4\u5b8c\u5584\u3002<\/p>\n\n\n\n
\u8bed\u6cd5\u683c\u5f0f\uff1a <\/strong>lnstat [\u53c2\u6570]<\/p>\n\n\n\n \u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n \u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n \u663e\u793a\u7f51\u7edc\u72b6\u6001\uff1a<\/p>\n\n\n\n \u663e\u793a\u547d\u4ee4\u652f\u6301\u7684\u7edf\u8ba1\u6587\u4ef6\uff1a<\/p>\n\n\n\n \u8fc7\u6ee4\u51fa\u53ea\u60f3\u8981\u67e5\u770b\u7684\u5173\u952e\u5b57\u6bb5\u4fe1\u606f\uff1a<\/p>\n\n\n\n <\/p>\n","protected":false},"excerpt":{"rendered":" lnstat\u547d\u4ee4\u5b9e\u9645\u4e0a\u662f\u8bfb\u53d6\u7cfb\u7edf\u201c\/proc\u201d\u4e2d\u76ee\u5f55\u201c\/proc\/net\/stat\u201d\u4e0b\u9762\u7684\u6587\u4ef6\uff0c\u6765\u663e\u793a\u5f53\u524d\u4e3b\u673a […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[6],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/2012"}],"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=2012"}],"version-history":[{"count":5,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/2012\/revisions"}],"predecessor-version":[{"id":2156,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/2012\/revisions\/2156"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=2012"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=2012"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=2012"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}-c<\/td> \u6307\u5b9a\u663e\u793a\u7f51\u7edc\u72b6\u6001\u7684\u6b21\u6570\uff0c\u6bcf\u9694\u4e00\u5b9a\u65f6\u95f4\u663e\u793a\u4e00\u6b21\u7f51\u7edc\u72b6\u6001<\/td><\/tr> -d<\/td> \u663e\u793a\u53ef\u7528\u7684\u6587\u4ef6\u6216\u5173\u952e\u5b57<\/td><\/tr> -i<\/td> \u6307\u5b9a\u4e24\u6b21\u663e\u793a\u7f51\u7edc\u72b6\u7684\u95f4\u9694\u79d2\u6570<\/td><\/tr> -k<\/td> \u53ea\u663e\u793a\u7ed9\u5b9a\u7684\u5173\u952e\u5b57<\/td><\/tr> -s<\/td> \u662f\u5426\u663e\u793a\u6807\u9898\u5934<\/td><\/tr> -w<\/td> \u6307\u5b9a\u6bcf\u4e2a\u5b57\u6bb5\u6240\u5360\u7684\u5bbd\u5ea6<\/td><\/tr> -h <\/td> \u663e\u793a\u5e2e\u52a9\u4fe1\u606f <\/td><\/tr> -v <\/td> \u663e\u793a\u6307\u4ee4\u7248\u672c\u4fe1\u606f <\/td><\/tr><\/tbody><\/table>\n\n\n\n [root@linuxcool ~]# lnstat<\/pre>\n\n\n\n
[root@linuxcool ~]# lnstat -d<\/pre>\n\n\n\n
[root@linuxcool ~]# lnstat -k arp_cache:entries,rt_cache:in_hit,arp_cache:destroys\narp_cach|rt_cache|arp_cach|\nentries| in_hit|destroys|\n 6| 0| 2|<\/pre>\n\n\n\n