Power for a free world - Tag - LinuxRandom bits on Linux / Opensource, Green IT, power management, life, fun, music and green citizenship2016-08-29T00:12:01+02:00Arnaud Quetteurn:md5:34562DotclearPower management and NUT #1: an introductionurn:md5:0e4d56168b720e8b2c8d95b0edd7c8ca2012-09-25T20:58:00+02:00Arnaud QuetteTech, Opensource, Green IT & power managementDebianGreen ITLinuxNUTpower management <p>in this series of articles, I will be talking in depth about power
management through the <a href="http://en.wikipedia.org/wiki/Network_UPS_Tools" hreflang="en">NUT</a> project, its packaging on Debian, how to use it in
general and how I see it being part of the GreenIT thing.</p>
<p><img src="http://www.networkupstools.org/images/nut-logo.png" alt="" /></p>
<p>So, let's start with an introduction:</p>
<p><a href="http://www.networkupstools.org" hreflang="en">NUT</a> is a Free
Software (GPL v2+ and 3 to be precise), originally created for power protection
using <a href="http://en.wikipedia.org/wiki/Uninterruptible_power_supply" hreflang="en">UPS</a>, from home to data-centers:<br /></p>
<p><img src="http://networkupstools.org/images/simple.png" alt="" /></p>
<p>To shortly describe the main <a href="http://www.networkupstools.org/features.html" hreflang="en">features</a>, I
would say that NUT:</p>
<ul>
<li>has the most comprehensive list of supported devices: <a href="http://www.networkupstools.org/stable-hcl.html" hreflang="en">127
manufacturers and thousands of devices</a>,</li>
<li>is <a href="http://www.networkupstools.org/docs/developer-guide.chunked/ar01s02.html#_the_layering" hreflang="en">modular and flexible</a>, to address all possible use cases,</li>
<li>weight a few hundreds Kb,</li>
<li>runs on any system, is packaged for <a href="http://www.networkupstools.org/download.html#_binary_packages" hreflang="en">the major ones</a>, and is bundled with most (if not all) Linux,</li>
<li>provides tons of <a href="http://www.networkupstools.org/features.html" hreflang="en">features</a>,</li>
<li>is network oriented: you can access uniquely devices all around the world,
in a <a href="http://www.networkupstools.org/docs/user-manual.chunked/ar01s09.html" hreflang="en">secured way</a>,</li>
<li>is optimized for integration and interfacing,</li>
<li>is supported by many <a href="http://www.networkupstools.org/projects.html" hreflang="en">3rd party software</a>,</li>
<li>is already embedded in <a href="http://www.networkupstools.org/projects.html#_hardware_projects_involving_nut" hreflang="en">several devices</a>, found in home, enterprises and
datacenters.</li>
</ul>
<p>NUT used to stand for Network UPS Tools. That is, a software for talking to
your UPS and shutting down your systems when needed. This definition is a bit
limited nowadays, since NUT supports 4 types of power device:</p>
<ul>
<li><a href="http://en.wikipedia.org/wiki/Uninterruptible_power_supply" hreflang="en">UPS</a>, obviously, since the origin.</li>
<li><a href="http://en.wikipedia.org/wiki/Power_distribution_unit" hreflang="en">PDU</a> (power distribution units), for 4 years. These are somehow big
intelligent power switches, that you find in datacenters. These allow to switch
on and off specific outlets and / or to measure power consumptions. The latter
is more interesting for Green IT and PUE calculation. But this is the topic of
another article <img src="/themes/default/smilies/wink.png" alt=";-)" class="smiley" /></li>
<li><a href="http://en.wikipedia.org/wiki/Solar_controller" hreflang="en">SCD</a> (solar controller device), for more than 2 years. NUT only
supports 1 SCD (IVT SCD series), but support for another can be very easily
added.</li>
<li>PSU (power supply unit), for more than a year. This support is limited to
server PSU, that are <a href="http://en.wikipedia.org/wiki/Ipmi" hreflang="en">IPMI</a> compatible.</li>
<li>meters and <a href="http://en.wikipedia.org/wiki/Engine-generator#Large_Scale_Generator_Sets" hreflang="en">gensets</a> are also new device types that are considered. Meters
would provide more measurement capabilities, still mainly for PUE calculation,
while gensets.</li>
</ul>
<p>Considering this, is the name Network UPS Tools still suitable? Not really!
But the acronym <strong>NUT</strong> is well known! So, for the time being, I
just stick using it, and focus on other more important things, until a better
opportunity (ideas and comments are welcome!).</p>
<p>That said, what can you do exactly with NUT? Currently, you can:</p>
<ul>
<li>monitor and manage UPS(s) that protect(s) your system(s), with no
redundancy limitation,</li>
<li>manage your PDU, to power on / off your systems (not servers directly!),
and measure power consumptions,</li>
<li>monitor and manage your servers power supplies, power these on / off, and
measure power consumption.</li>
<li>monitor all these links of the powerchain, that feed your servers.</li>
<li>discover all USB, SNMP and IPMI supported devices, locally or on the
network.</li>
</ul>
<p>All the above is available in a standardized way:</p>
<ul>
<li>the manufacturer name will always be in the variable called
<em>device.mfr</em>. The first outlet will always be <em>outlet.1</em>,
whatever the device is (UPS or PDU here),</li>
<li>Tons of command line tools, <a href="http://www.networkupstools.org/docs/developer-guide.chunked/ar01s08.html" hreflang="en">libraries / language bindings</a> and <a href="http://www.networkupstools.org/projects.html" hreflang="en">software</a> are
available to help in NUT integration! You can even make your own NUT client
implementation <a href="http://www.networkupstools.org/docs/developer-guide.chunked/ar01s09.html" hreflang="en">very easily and quickly</a> (experiences reports are ~ 2
hours).</li>
</ul>
<p>Well, this is already a long and dense post, so I will stop there for today.
In the next post, we will have a deeper dive into using NUT, for various use
cases: submit yours if you can <img src="/themes/default/smilies/wink.png" alt=";-)" class="smiley" /></p>
<p>cheers,<br />
-- Arno</p>http://arnaud.quette.fr/post/2012/07/30/NUT-and-power-management%3A-an-introduction#comment-formhttp://arnaud.quette.fr/feed/atom/comments/691984Definitive solution to IPMI over LAN with Dell iDrac Expressurn:md5:0a7b8e2501a7552fc065a49117d7d13b2012-07-10T22:25:00+02:00Arnaud QuetteTech, Opensource, Green IT & power managementDebianDellLinuxUbuntu <p>I have this bunch of Dell R610, with iDrac6 Express management cards. I used
these, among other things, for developing IPMI support in <a href="http://www.networkupstools.org/" hreflang="en">NUT</a> and working on
Infrastructure &amp; Cloud power management. But that's the topic of another
post (still, if you're interested in, check <a href="https://wiki.ubuntu.com/ServerOneiricInfraPower" hreflang="en">this</a> and
<a href="https://wiki.ubuntu.com/ServerPreciseCloudPowerManagement" hreflang="en">that</a>).</p>
<p>The thing is that this &quot;IPMI&quot; monitoring development has been limited to
local support (Ie, power supplies can't be monitored remotely by the <a href="http://arnaud.quette.fr/post/2012/07/06/www.networkupstools.org/docs/man/nut-ipmipsu.html" hreflang="en">nut-ipmipsu</a> driver), due to an issue : any attempt to enable IPMI
access over the network was miserably failing!</p>
<p>Well, these attempts were limited to a couple of 15 minutes runs, without
plain motivation, almost a year ago. The various firmwares were up to date
(iDrac 1.70, ...) , everything was running and configured fine, locally. But
still... no IPMI available through the network!</p>
<p>Looking on the Net, I've learned that many Dell customers with iDrac Express
cards, were having the same issue. Dell support seems to have replaced tons of
motherboards! There, I switched to other things, and time has passed....</p>
<p>A good year later (last week), I decided that it was time to get back on
this. And I've found the solution <a href="http://permalink.gmane.org/gmane.linux.hardware.dell.poweredge/42033" hreflang="en">there</a></p>
<p>Incredible: this was due to a 'bug' in the Broadcom NetXtreme II LoM
(<a href="http://en.wikipedia.org/wiki/Network_adapter" hreflang="en">LAN on
Motherboad</a>) firmware! I've not had time to dig this issue in depth, but
here is a base explanation, for what it's worth: Some LoM initial self tests
are failing. Thus, the LoM are not switched to the managed mode, and can't
actually be available for BMC management (thus no IPMI over the network). In my
case, the tests were wrongly failing at 'A07', a test which tries to establish
a Gigabit connection! Strangely, all these servers are connected on a Gb
switch! Not a fully satisfactory answer, but that said, there is a solution,
and I've not much time to pour into this investigation (comments may always
change my mind though!).</p>
<p>So here is a comprehensive procedure to fix this, from your Linux system,
and using FreeDOS:</p>
<ul>
<li>Get a USB key, at least 1,44 Mb (damn!), but a good old 32Gb will also do
the trick <img src="/themes/default/smilies/wink.png" alt=";-)" class="smiley" /></li>
<li>Open a terminal and format the USB key (WARNING: this will ERASE all data
on the key! You've been warned. Really!)</li>
</ul>
<blockquote>
<p>$ mkfs.msdos /dev/sdX1</p>
</blockquote>
<p>Note: 'X' is to be replaced by the exact name of your USB key. An hint: call
'tail -f /var/log/syslog&quot; and unplug / replug your USB key. You will see some
entries like &quot;...<a href="http://arnaud.quette.fr/post/2012/07/06/sdb" title="sdb">sdb</a> Attached SCSI removable
disk&quot;. So, there, it's &quot;sdb&quot;.</p>
<ul>
<li>Download a <a href="http://www.finnix.org/files/balder10.img">FreeDOS
image</a></li>
<li>Now use qemu to create the DOS boot disk on your USB key (replace 'X'
again!):</li>
</ul>
<blockquote>
<p>$ qemu -boot a -fda balder10.img -hda /dev/sdX A:\&gt; sys c: A:\&gt; xcopy
/E /N a: c:</p>
</blockquote>
<p>Note that you will need &quot;root&quot; privileges.</p>
<ul>
<li>(Optional) You can check the bootability with:</li>
</ul>
<blockquote>
<p>$ qemu -hda /dev/sdX</p>
</blockquote>
<ul>
<li>Download Broadcom DOS utilities <a href="http://downloads.dell.com/FOLDER33083M/1/Bcom_LAN_14.2.x_DOSUtilities_A03.exe" hreflang="en">there</a></li>
<li>Unzip this archive (self extract)</li>
</ul>
<blockquote>
<p>$ unzip Bcom_LAN_14.2.x_DOSUtilities_A03.exe</p>
</blockquote>
<ul>
<li>Copy only 'Userdiag/NetXtremeII/uxdiag.exe' to your USB key.</li>
<li>Plug the key in your server, and reboot it</li>
<li>Press F11 to enter the BIOS boot sequence,</li>
<li>Select the default entry, and press Enter. Once the system is booted,
type:</li>
</ul>
<blockquote>
<p>c:\ uxdiag -t abcd –mfw 1</p>
</blockquote>
<ul>
<li>Reboot your system, and enjoy your *working* IPMI access over the network
<img src="/themes/default/smilies/smile.png" alt=":-)" class="smiley" /></li>
</ul>
<p>For what it's worth (again), I just hope that it will be useful to
others...</p>
<p>I will now prepare another post using using <a href="http://arnaud.quette.fr/post/2012/07/06/www.gnu.org/software/freeipmi/" hreflang="en">FreeIPMI</a> to manage your
servers, the GNU way...</p>
<p>cheers,<br />
-- Arno</p>
<p>Thanks to Jordi Clariana, <a href="http://permalink.gmane.org/gmane.linux.hardware.dell.poweredge/42033" hreflang="en">his enlightening post</a>, Daniel for <a href="http://www.meta.net.nz/~daniel/blog/2009/06/10/creating-a-dos-usb-bootdisk-under-linux/" hreflang="en">this one</a>, Aurélien was motivating me again in solving this
iDrac Express issue and Al Chu (FreeIPMI project leader) for all his invaluable
help on IPMI.</p>http://arnaud.quette.fr/post/2012/07/06/Definitive-solution-to-IPMI-over-LAN-with-Dell-iDrac-Express#comment-formhttp://arnaud.quette.fr/feed/atom/comments/688998Penguin strikes back...urn:md5:d909510f7759d68c04ffc1796343d9ec2010-09-27T13:11:00+02:00Arnaud QuetteLife, Fun, Music & all the rest...Green citizenshipLinux <p>Seen during the <a href="http://www.abc.net.au/news/stories/2010/09/24/3020573.htm" hreflang="en">last
strike in France</a>:</p>
<p><img src="http://arnaud.quette.fr/public/penguin-strike.jpg" alt="Penguin strikes back..." style="display:block; margin:0 auto;" title="Penguin strikes back..., juil. 2012" /></p>
<p>The (not so visible) slogan means &quot;we are not penguins&quot;.</p>
<p>Well, we are not windows either! And why do you think that penguins are
small defenseless things? For those leaving under a rock, Linux mascot is a
<a href="http://en.wikipedia.org/wiki/Linux" hreflang="en">penguin</a>. In
other word, the emblem of the biggest IT revolution (I actually mean the Free
and Opensource software in general).</p>
<p>Jokes aside, the reasons of this strike are serious, and the way the
government deals with this is probably sub optimal:</p>
<p>having more workers on the market, without having more work is simply a non
sense! You will only be increasing unemployment, so public taxes in the
end.</p>
<p>Looking for a <a href="http://www.youtube.com/watch?v=sJkYcyMAw3Y&amp;amp;feature=related" hreflang="fr">solution</a> to social and economic crisis?</p>
<p>(thanks to Luc for the picture, Seb for his support and my brother Guillaume
for the video link)</p>http://arnaud.quette.fr/post/2010/09/27/Penguin-strikes-back...#comment-formhttp://arnaud.quette.fr/feed/atom/comments/688398