<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Bash | Sergio Saucedo</title><link>https://seulsale.com/tags/bash/</link><atom:link href="https://seulsale.com/tags/bash/index.xml" rel="self" type="application/rss+xml"/><description>Bash</description><generator>HugoBlox Kit (https://hugoblox.com)</generator><language>en-us</language><lastBuildDate>Wed, 15 Apr 2026 00:00:00 +0000</lastBuildDate><image><url>https://seulsale.com/media/sharing.png</url><title>Bash</title><link>https://seulsale.com/tags/bash/</link></image><item><title>Powering a GPU Node On-Demand with iDRAC and Redfish</title><link>https://seulsale.com/post/on-demand-gpu-node-idrac-redfish/</link><pubDate>Wed, 15 Apr 2026 00:00:00 +0000</pubDate><guid>https://seulsale.com/post/on-demand-gpu-node-idrac-redfish/</guid><description>&lt;p&gt;There&amp;rsquo;s a Dell PowerEdge R630 in my homelab whose only job is GPU work — mainly &lt;a href="https://ollama.com" target="_blank" rel="noopener"&gt;Ollama&lt;/a&gt; for self-hosted LLM inference. Rack servers are power-hungry, and paying to idle one 24/7 for something I use a few hours a week is absurd. So the machine stays &lt;strong&gt;off by default&lt;/strong&gt; and boots on demand.&lt;/p&gt;
&lt;h2 id="redfish-the-api-your-server-already-has"&gt;Redfish: the API your server already has&lt;/h2&gt;
&lt;p&gt;Every server with a BMC (iDRAC on Dell, iLO on HP) exposes the &lt;a href="https://www.dmtf.org/standards/redfish" target="_blank" rel="noopener"&gt;Redfish API&lt;/a&gt; — a REST interface to the hardware itself. The BMC draws a couple of watts and is always reachable, even when the host is powered off. Power control is a single POST:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;curl -sk -K ~/.bmc-creds &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; -H &lt;span class="s1"&gt;&amp;#39;Content-Type: application/json&amp;#39;&lt;/span&gt; &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; -X POST &lt;span class="s2"&gt;&amp;#34;https://&lt;/span&gt;&lt;span class="nv"&gt;$BMC&lt;/span&gt;&lt;span class="s2"&gt;/redfish/v1/Systems/System.Embedded.1/Actions/ComputerSystem.Reset&amp;#34;&lt;/span&gt; &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; -d &lt;span class="s1"&gt;&amp;#39;{&amp;#34;ResetType&amp;#34;: &amp;#34;On&amp;#34;}&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Two details worth stealing:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Keep credentials out of &lt;code&gt;argv&lt;/code&gt;.&lt;/strong&gt; Curl&amp;rsquo;s &lt;code&gt;-K&lt;/code&gt; flag reads options from a file, so the BMC password never shows up in &lt;code&gt;ps&lt;/code&gt; or shell history. The creds file is &lt;code&gt;chmod 600&lt;/code&gt;, owned by root.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;GracefulShutdown&lt;/code&gt; first, &lt;code&gt;ForceOff&lt;/code&gt; as the escape hatch.&lt;/strong&gt; Redfish supports both; the graceful path lets the OS unmount cleanly.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I wrapped this in a ~40-line script (&lt;code&gt;esxi up | down | status&lt;/code&gt;) that also queries &lt;code&gt;PowerState&lt;/code&gt;, so any machine on my VPN can check or change the server&amp;rsquo;s state in one command.&lt;/p&gt;
&lt;h2 id="making-it-a-button"&gt;Making it a button&lt;/h2&gt;
&lt;p&gt;CLI is fine at a desk, but the whole point is &amp;ldquo;I want to ask a model something &lt;em&gt;now&lt;/em&gt;.&amp;rdquo; So the script is wired into a small dashboard on my hypervisor — one page showing every service&amp;rsquo;s health, with &lt;strong&gt;Power on / Shut down&lt;/strong&gt; buttons for the GPU node. Boot to Ollama-ready takes about four minutes; the dashboard&amp;rsquo;s status dot flips green when the tunnel to it comes back up.&lt;/p&gt;
&lt;p&gt;The pattern generalizes to anything with a BMC:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;State&lt;/strong&gt; lives in the BMC, not the OS — you can always trust it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Actions&lt;/strong&gt; are idempotent Redfish POSTs — safe to put behind a button.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Health&lt;/strong&gt; is best checked end-to-end — I probe the actual Ollama endpoint, not just a ping.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="the-economics"&gt;The economics&lt;/h2&gt;
&lt;p&gt;An R630 idles around 90–120 W. At my rates, leaving it on costs roughly $10–15/month to do nothing; on-demand it&amp;rsquo;s pennies. The four-minute boot is a fair trade for inference that runs on my hardware, on my network, with no tokens metered by anyone.&lt;/p&gt;</description></item></channel></rss>