{"id":389,"date":"2011-01-28T00:30:38","date_gmt":"2011-10-29T13:51:50","guid":{"rendered":"http:\/\/kraftek.com\/blog\/quick-and-dirty-script-to-query-nic-speed\/"},"modified":"2011-01-28T00:30:38","modified_gmt":"2011-10-29T13:51:50","slug":"quick-and-dirty-script-to-query-nic-speed","status":"publish","type":"post","link":"\/blog\/index.php\/quick-and-dirty-script-to-query-nic-speed\/","title":{"rendered":"Quick and dirty script to query NIC speed"},"content":{"rendered":"<pre>I already have a script like this in \"miniexplorer\", but it generates html and that may be overkill, so this is a quickie one to\n query all network card ports in your solaris server about NIC speed.\n \n#!\/bin\/ksh\n ifconfig -a | grep flags | grep -v 'lo' |awk -F: '{ print $1 }' |uniq|while read IF;do\n D=`echo $IF| sed s\/[0-9,:]*$\/\/`\n IN=`echo $IF| sed 's\/^[a-z]*\/\/'`\n echo \"$D $IN -------------------------------------------------\"\n ndd -set \/dev\/$D instance $IN\n (ndd -get \/dev\/$D ?|awk '$1!~\/^?\/{print$1}'|while read p;do\n \/usr\/ucb\/echo -n $p:;ndd -get \/dev\/$D $p;\n done\n kstat ${D}:${IN}) | egrep 'adv|link|speed' |sed 's\/ \/\/g'\n done\n\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I already have a script like this in &#8220;miniexplorer&#8221;, but it generates html and that may be overkill, so this is a quickie one to query all network card ports in your solaris server about NIC speed. #!\/bin\/ksh ifconfig -a | grep flags | grep -v &#8216;lo&#8217; |awk -F: &#8216;{ print $1 }&#8217; |uniq|while read [&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-389","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts\/389","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=389"}],"version-history":[{"count":0,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts\/389\/revisions"}],"wp:attachment":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=389"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=389"},{"taxonomy":"post_tag","embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=389"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}