<?xml version="1.0" encoding="windows-1252"?>
<node id="1010733" title="Re: grabbing dmidecode memory data - there's got to be a better way" created="2012-12-28 14:10:46" updated="2012-12-28 14:10:46">
<type id="11">
note</type>
<author id="747201">
afoken</author>
<data>
<field name="doctext">
&lt;p&gt;I prefer NOT to call external utilities writing "human readable" data. The output formats often change without announcement, they are not properly defined, and some stupid tools insist on doing their own pager or wrap lines. So, my first approach is to [http://search.cpan.org/search?query=DMI&amp;mode=all|search CPAN] for DMI (after all, dmidecode just reads some file(s) in &lt;c&gt;/sys&lt;/c&gt; or &lt;c&gt;/proc&lt;/c&gt;):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;[mod://DMI::Decode]&lt;/li&gt;
&lt;li&gt;[mod://Parse::DMIDecode]&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The first one seems to read the DMI data directly (from /dev/mem, unfortunately, so it might need root privileges, whereas a tool reading from sysfs could live without root privileges), the other one attempts to parse dmidecode output.&lt;/p&gt;
&lt;p&gt;Alexander&lt;/p&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-747201"&gt;
--&lt;br&gt;
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
1010730</field>
<field name="parent_node">
1010730</field>
</data>
</node>
