{"id":8238,"date":"2020-07-18T20:53:18","date_gmt":"2020-07-18T12:53:18","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=8238"},"modified":"2020-07-18T20:53:20","modified_gmt":"2020-07-18T12:53:20","slug":"vnstat","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/vnstat","title":{"rendered":"vnstat\u547d\u4ee4 – \u7f51\u7edc\u6d41\u91cf\u76d1\u63a7\u5668"},"content":{"rendered":"\n

vnstat\u662f\u4e00\u4e2a\u57fa\u4e8e\u63a7\u5236\u53f0\u7684\u7f51\u7edc\u6d41\u91cf\u76d1\u63a7\u5668\u3002\u5b83\u4fdd\u5b58\u4e86\u6240\u9009\u63a5\u53e3\u7684\u6bcf\u5c0f\u65f6\u3001\u6bcf\u5929\u548c\u6bcf\u6708\u7684\u7f51\u7edc\u6d41\u91cf\u65e5\u5fd7\u3002\u7136\u800c\uff0c\u5b83\u5e76\u4e0d\u662f\u4e00\u4e2a\u6570\u636e\u5305\u55c5\u63a2\u5668\uff0c\u800c\u662f\u4eceproc(5)\u6216sys\u6587\u4ef6\u7cfb\u7edf\u4e2d\u8bfb\u53d6\u6d41\u91cf\u4fe1\u606f\u3002\u6d41\u91cf\u4fe1\u606f\u662f\u4eceproc(5)\u6216sys\u6587\u4ef6\u7cfb\u7edf\u4e2d\u8bfb\u53d6\u7684\uff0c\u5177\u4f53\u53d6\u51b3\u4e8e\u662f\u5426\u53ef\u7528\u3002\u8fd9\u6837\u4e00\u6765\uff0c\u5373\u4f7f\u6ca1\u6709root\u6743\u9650\u4e5f\u53ef\u4ee5\u5728\u5927\u591a\u6570\u7cfb\u7edf\u4e0a\u4f7f\u7528vnstat\u3002<\/p>\n\n\n\n

\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>vnstat [\u53c2\u6570]<\/p>\n\n\n\n

\u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n

-q<\/td>\u67e5\u8be2\u6570\u636e<\/td><\/tr>
-i<\/td>\u9009\u62e9\u7f51\u5361 (\u9ed8\u8ba4: eth0)<\/td><\/tr>
-l<\/td>\u663e\u793a\u5b9e\u65f6\u6d41\u91cf<\/td><\/tr>
-m<\/td>\u6309\u6708\u4efd<\/td><\/tr>
-d<\/td>\u6309\u5929<\/td><\/tr>
-u<\/td>\u66f4\u65b0\u6570\u636e\u5e93<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n

\u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n

\u67e5\u8be2eth1\u7f51\u5361\u6d41\u91cf\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# vnstat -u -i eth1<\/pre>\n\n\n\n

\u67e5\u770b\u5f53\u524d\u5b9e\u65f6\u6d41\u91cf\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# vnstat -l<\/pre>\n\n\n\n

\u67e5\u770b\u5f53\u5929\u6d41\u91cf\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# vnstat -d<\/pre>\n\n\n\n

\u67e5\u770b\u5f53\u6708\u6d41\u91cf\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# vnstat -m<\/pre>\n","protected":false},"excerpt":{"rendered":"

vnstat\u662f\u4e00\u4e2a\u57fa\u4e8e\u63a7\u5236\u53f0\u7684\u7f51\u7edc\u6d41\u91cf\u76d1\u63a7\u5668\u3002\u5b83\u4fdd\u5b58\u4e86\u6240\u9009\u63a5\u53e3\u7684\u6bcf\u5c0f\u65f6\u3001\u6bcf\u5929\u548c\u6bcf\u6708\u7684\u7f51\u7edc\u6d41\u91cf\u65e5\u5fd7\u3002\u7136\u800c\uff0c\u5b83\u5e76\u4e0d […]<\/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\/8238"}],"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=8238"}],"version-history":[{"count":6,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/8238\/revisions"}],"predecessor-version":[{"id":8244,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/8238\/revisions\/8244"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=8238"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=8238"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=8238"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}