{"id":1179,"date":"2016-09-11T19:55:24","date_gmt":"2016-09-11T19:55:24","guid":{"rendered":"https:\/\/trouble.org\/?p=1179"},"modified":"2016-09-11T19:55:24","modified_gmt":"2016-09-11T19:55:24","slug":"trivial-command-line","status":"publish","type":"post","link":"https:\/\/trouble.org\/?p=1179","title":{"rendered":"trivial command line&#8230;.."},"content":{"rendered":"<p>Was just noticing the shell option in ipmitool.. wondered if you could echo a set of commands to it via stdin, and sure enough&#8230; the final bit is sending it a ctrl^D via \\003 and echo -e.<\/p>\n<p>This sends a chassis power status as well as a sol, channel, and mc info to BMC &#8211;<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"overflow:auto;white-space:nowrap;height:800px;\"><div class=\"bash codecolorer\">$ <span class=\"kw3\">echo<\/span> <span class=\"re5\">-e<\/span> <span class=\"st0\">&quot;chassis power status<span class=\"es1\">\\n<\/span>sol info<span class=\"es1\">\\n<\/span>channel info 0<span class=\"es1\">\\n<\/span>mc info<span class=\"es1\">\\n<\/span>\\004&quot;<\/span> <span class=\"sy0\">|<\/span> ipmitool <span class=\"re5\">-I<\/span> lanplus <span class=\"re5\">-H<\/span> 192.168.0.23 <span class=\"re5\">-U<\/span> root <span class=\"re5\">-P<\/span> calvin shell<br \/>\n<br \/>\nipmitool<span class=\"sy0\">&gt;<\/span> chassis power status<br \/>\nChassis Power is off<br \/>\nipmitool<span class=\"sy0\">&gt;<\/span> sol info<br \/>\nInfo: SOL parameter <span class=\"st_h\">'Payload Channel (7)'<\/span> not supported - defaulting to 0x0e<br \/>\nSet <span class=\"kw1\">in<\/span> progress &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : set-complete<br \/>\nEnabled &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : <span class=\"kw2\">true<\/span><br \/>\nForce Encryption &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: <span class=\"kw2\">true<\/span><br \/>\nForce Authentication &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: <span class=\"kw2\">true<\/span><br \/>\nPrivilege Level &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : USER<br \/>\nCharacter Accumulate Level <span class=\"br0\">&#40;<\/span>ms<span class=\"br0\">&#41;<\/span> : <span class=\"nu0\">50<\/span><br \/>\nCharacter Send Threshold &nbsp; &nbsp; &nbsp; &nbsp;: <span class=\"nu0\">100<\/span><br \/>\nRetry Count &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : <span class=\"nu0\">7<\/span><br \/>\nRetry Interval <span class=\"br0\">&#40;<\/span>ms<span class=\"br0\">&#41;<\/span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : <span class=\"nu0\">480<\/span><br \/>\nVolatile Bit Rate <span class=\"br0\">&#40;<\/span>kbps<span class=\"br0\">&#41;<\/span> &nbsp; &nbsp; &nbsp; &nbsp;: <span class=\"nu0\">19.2<\/span><br \/>\nNon-Volatile Bit Rate <span class=\"br0\">&#40;<\/span>kbps<span class=\"br0\">&#41;<\/span> &nbsp; &nbsp;: <span class=\"nu0\">19.2<\/span><br \/>\nPayload Channel &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : <span class=\"nu0\">14<\/span> <span class=\"br0\">&#40;<\/span>0x0e<span class=\"br0\">&#41;<\/span><br \/>\nPayload Port &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: <span class=\"nu0\">623<\/span><br \/>\nipmitool<span class=\"sy0\">&gt;<\/span> channel info <span class=\"nu0\">0<\/span><br \/>\nChannel 0x0 info:<br \/>\n&nbsp; Channel Medium Type &nbsp; : IPMB <span class=\"br0\">&#40;<\/span>I2C<span class=\"br0\">&#41;<\/span><br \/>\n&nbsp; Channel Protocol Type : IPMB-<span class=\"nu0\">1.0<\/span><br \/>\n&nbsp; Session Support &nbsp; &nbsp; &nbsp; : session-less<br \/>\n&nbsp; Active Session Count &nbsp;: <span class=\"nu0\">0<\/span><br \/>\n&nbsp; Protocol Vendor ID &nbsp; &nbsp;: <span class=\"nu0\">7154<\/span><br \/>\nipmitool<span class=\"sy0\">&gt;<\/span> mc info<br \/>\nDevice ID &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : <span class=\"nu0\">32<\/span><br \/>\nDevice Revision &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : <span class=\"nu0\">0<\/span><br \/>\nFirmware Revision &nbsp; &nbsp; &nbsp; &nbsp; : <span class=\"nu0\">1.70<\/span><br \/>\nIPMI Version &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: <span class=\"nu0\">2.0<\/span><br \/>\nManufacturer ID &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : <span class=\"nu0\">674<\/span><br \/>\nManufacturer Name &nbsp; &nbsp; &nbsp; &nbsp; : DELL Inc<br \/>\nProduct ID &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: <span class=\"nu0\">256<\/span> <span class=\"br0\">&#40;<\/span>0x0100<span class=\"br0\">&#41;<\/span><br \/>\nProduct Name &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: Unknown <span class=\"br0\">&#40;<\/span>0x100<span class=\"br0\">&#41;<\/span><br \/>\nDevice Available &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: <span class=\"kw2\">yes<\/span><br \/>\nProvides Device SDRs &nbsp; &nbsp; &nbsp;: <span class=\"kw2\">yes<\/span><br \/>\nAdditional Device Support :<br \/>\n&nbsp; &nbsp; Sensor Device<br \/>\n&nbsp; &nbsp; SDR Repository Device<br \/>\n&nbsp; &nbsp; SEL Device<br \/>\n&nbsp; &nbsp; FRU Inventory Device<br \/>\n&nbsp; &nbsp; IPMB Event Receiver<br \/>\n&nbsp; &nbsp; Bridge<br \/>\n&nbsp; &nbsp; Chassis Device<br \/>\nAux Firmware Rev Info &nbsp; &nbsp; : <br \/>\n&nbsp; &nbsp; 0x00<br \/>\n&nbsp; &nbsp; 0x15<br \/>\n&nbsp; &nbsp; 0x00<br \/>\n&nbsp; &nbsp; 0x00<br \/>\nipmitool<span class=\"sy0\">&gt;<\/span> <br \/>\n$<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Was just noticing the shell option in ipmitool.. wondered if you could echo a set of commands to it via stdin, and sure enough&#8230; the final bit is sending it a ctrl^D via \\003 and echo -e. This sends a chassis power status as well as a sol, channel, and mc info to BMC &#8211; [&hellip;]<\/p>\n","protected":false},"author":44,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[154,6],"tags":[113,348,156],"class_list":["post-1179","post","type-post","status-publish","format-standard","hentry","category-ipmi-2","category-tech","tag-ipmi","tag-ipmitool","tag-shell"],"_links":{"self":[{"href":"https:\/\/trouble.org\/index.php?rest_route=\/wp\/v2\/posts\/1179","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/trouble.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/trouble.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/trouble.org\/index.php?rest_route=\/wp\/v2\/users\/44"}],"replies":[{"embeddable":true,"href":"https:\/\/trouble.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1179"}],"version-history":[{"count":2,"href":"https:\/\/trouble.org\/index.php?rest_route=\/wp\/v2\/posts\/1179\/revisions"}],"predecessor-version":[{"id":1181,"href":"https:\/\/trouble.org\/index.php?rest_route=\/wp\/v2\/posts\/1179\/revisions\/1181"}],"wp:attachment":[{"href":"https:\/\/trouble.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1179"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/trouble.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1179"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/trouble.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1179"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}