{"id":456,"date":"2011-01-28T00:30:38","date_gmt":"2011-11-20T21:51:50","guid":{"rendered":"http:\/\/kraftek.com\/blog\/check-network-speed-in-suse\/"},"modified":"2011-01-28T00:30:38","modified_gmt":"2011-11-20T21:51:50","slug":"check-network-speed-in-suse","status":"publish","type":"post","link":"\/blog\/index.php\/check-network-speed-in-suse\/","title":{"rendered":"check network speed in suse"},"content":{"rendered":"<p>I wrote a script that shows you in a condensed way if you&#8217;re in network card speed trouble:<br \/>\n# &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; server app213<br \/>\nbond0= eth1 eth2<br \/>\nbond0 : : : : : 10.20.9.38<br \/>\neth0 : 100Mb\/s : Half : on : yes : 192.168.5.119<br \/>\neth1 : 100Mb\/s : Half : on : yes :<br \/>\neth2 : 100Mb\/s : Half : on : yes :<br \/>\neth3 : Unknown! (65535) : Unknown! (255) : on : no :<br \/>\nHere it goes:<br \/>\n#!\/bin\/bash<br \/>\nDIR=\/tmp\/.dir<br \/>\nmkdir $DIR &gt; \/dev\/null 2&gt;&amp;1<br \/>\nHB=`ifconfig -a | grep -i bond | wc -l | sed &#8216;s\/ \/\/g&#8217;`<br \/>\nif [ &#8220;$HB&#8221; -ne &#8220;0&#8221; ];then<br \/>\nfor i in `ifconfig -a | cut -c0-10 | egrep -i &#8216;bond&#8217;| grep -v &#8216;:&#8217;`;do<br \/>\necho -n &#8220;$i=&#8221;<br \/>\nfor i in `cat \/etc\/sysconfig\/network\/ifcfg-$i | grep &#8220;BONDING_SLAVE&#8221; | awk -F&#8221;=&#8221; &#8216;{ print $2 }&#8217; | awk -F&#8221;&#8216;&#8221; &#8216;{<br \/>\nprint $2 }&#8217;`;do<br \/>\necho -n &#8221; $i&#8221;<br \/>\ndone<br \/>\necho &#8220;&#8221;<br \/>\ndone<br \/>\nfi<br \/>\nfor i in `ifconfig -a | cut -c0-10 | egrep -i &#8216;bond|eth&#8217;| grep -v &#8216;:&#8217;`;do<br \/>\nSP=`ethtool $i | grep &#8220;Speed:&#8221; | awk -F: &#8216;{ print $2 }&#8217;`<br \/>\nDU=`ethtool $i | grep &#8220;Duplex:&#8221; | awk -F: &#8216;{ print $2 }&#8217;`<br \/>\nAU=`ethtool $i |grep &#8220;Auto-negotiation:&#8221; | awk -F: &#8216;{ print $2 }&#8217;`<br \/>\nLI=`ethtool $i | grep &#8220;Link detected: &#8221; | awk -F: &#8216;{ print $2 }&#8217;`<br \/>\n(for w in `ifconfig $i`;do<br \/>\necho &#8220;$w&#8221;<br \/>\ndone) | grep &#8220;addr:&#8221; | awk -F&#8221;:&#8221; &#8216;{ print $2 }&#8217; &gt; $DIR\/addr<br \/>\necho &#8220;$i : $SP : $DU : $AU : $LI : `cat $DIR\/addr` &#8221;<br \/>\ndone<br \/>\nset network card speed by default in redhat.<br \/>\nIf your interface is eth0, in the etc\/sysconfig\/network-scripts folder, vi the ifcfg-eth0 script. add the parameters<br \/>\nETHTOOL_OPTS=&#8221;speed 100 duplex full autoneg on&#8221;, and you&#8217;re set<br \/>\nNext time the server reboots you have the right speed set<br \/>\n215\/433<br \/>\n216\/433<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I wrote a script that shows you in a condensed way if you&#8217;re in network card speed trouble: # &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; server app213 bond0= eth1 eth2 bond0 : : : : : 10.20.9.38 eth0 : 100Mb\/s : Half : on : yes : 192.168.5.119 eth1 : 100Mb\/s : Half : on : yes : eth2 : [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-456","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts\/456","targetHints":{"allow":["GET"]}}],"collection":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=456"}],"version-history":[{"count":0,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts\/456\/revisions"}],"wp:attachment":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=456"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=456"},{"taxonomy":"post_tag","embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=456"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}