{"id":124,"date":"2020-09-20T17:36:38","date_gmt":"2020-09-20T15:36:38","guid":{"rendered":"http:\/\/inbox.eu.org\/?p=124"},"modified":"2020-09-20T17:36:38","modified_gmt":"2020-09-20T15:36:38","slug":"openwrt-extended-stats-on-switch0","status":"publish","type":"post","link":"https:\/\/inbox.eu.org\/?p=124","title":{"rendered":"openwrt extended stats on switch0"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">I&#8221;ve got openwrt router netgear WNDR4300v1.<br>it contains switch. switch is controled by swconfig command :<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>root@my-home-wrt:~# swconfig list<br>Found: switch0 - ag71xx-mdio.0<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">default config of that switch doesn&#8217;t show any stats : <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>root@my-home-wrt:~# swconfig dev switch0 port 1 get mib<br>Failed to get attribute: Operation not supported<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">to enable stats on that switch you have to use command : <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>swconfig dev switch0 get ar8xxx_mib_poll_interval<br>swconfig dev switch0 set ar8xxx_mib_poll_interval 300<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">or to make this permanent change between reboots &#8211; use UCI:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>uci set network.@switch[0].ar8xxx_mib_poll_interval='300'<br>uci set network.@switch[0].ar8xxx_mib_type='1'<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">now stats per port looks like this : <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>root@my-home-wrt:~# swconfig dev switch0 port 1 get mib<br>MIB counters<br>RxBroad : 779875<br>RxPause : 7771<br>RxMulti : 504114<br>RxFcsErr : 0<br>RxAlignErr : 0<br>RxRunt : 0<br>RxFragment : 0<br>Rx64Byte : 31376455<br>Rx128Byte : 71930802<br>Rx256Byte : 16088904<br>Rx512Byte : 1562670<br>Rx1024Byte : 998867<br>Rx1518Byte : 190126272<br>RxMaxByte : 0<br>RxTooLong : 0<br>RxGoodByte : 298938600957 (278.4 GiB)<br>RxBadByte : 497344<br>RxOverFlow : 0<br>Filtered : 6<br>TxBroad : 600681<br>TxPause : 953<br>TxMulti : 1282565<br>TxUnderRun : 0<br>Tx64Byte : 10658772<br>Tx128Byte : 54503715<br>Tx256Byte : 22269258<br>Tx512Byte : 4973296<br>Tx1024Byte : 4133447<br>Tx1518Byte : 324100239<br>TxMaxByte : 0<br>TxOverSize : 0<br>TxByte : 500203601610 (465.8 GiB)<br>TxCollision : 0<br>TxAbortCol : 0<br>TxMultiCol : 0<br>TxSingleCol : 0<br>TxExcDefer : 0<br>TxDefer : 0<br>TxLateCol : 0<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"> now I&#8217;ve to pass this stats to librenms \ud83d\ude42<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><br><br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8221;ve got openwrt router netgear WNDR4300v1.it contains switch. switch is controled by swconfig command : root@my-home-wrt:~# swconfig listFound: switch0 &#8211; ag71xx-mdio.0 default config of that switch doesn&#8217;t show any stats : root@my-home-wrt:~# swconfig dev switch0 port 1 get mibFailed to get attribute: Operation not supported to enable stats on that switch you have to use\u2026 <a class='read-more' href='https:\/\/inbox.eu.org\/?p=124'>Continue Reading &lsquo;openwrt extended stats on switch0&rsquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"categories":[1],"tags":[15,16],"class_list":["post-124","post","type-post","status-publish","format-standard","hentry","category-bez-kategorii","tag-openwrt","tag-stats"],"_links":{"self":[{"href":"https:\/\/inbox.eu.org\/index.php?rest_route=\/wp\/v2\/posts\/124","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/inbox.eu.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/inbox.eu.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/inbox.eu.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/inbox.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=124"}],"version-history":[{"count":3,"href":"https:\/\/inbox.eu.org\/index.php?rest_route=\/wp\/v2\/posts\/124\/revisions"}],"predecessor-version":[{"id":127,"href":"https:\/\/inbox.eu.org\/index.php?rest_route=\/wp\/v2\/posts\/124\/revisions\/127"}],"wp:attachment":[{"href":"https:\/\/inbox.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=124"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/inbox.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=124"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/inbox.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=124"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}