On 08/01/2013 07:20 PM, Dave Rawks wrote:
> Thanks for the suggestion, but dmidecode is not portable and is super 
> unreliable since it depends on upstream hardware vendors setting 
umm.. you might be right but i didnt found so far a motherboard without
uuid.. and about dmidecode dependence : i didn't thought this through :)
the python code can be used only in modules in a gmond it would be
needed the c part .. i looked into the source of dmidecode and the uuid
routine is very short .. it can be just copied from there ..

> reasonable values. Even running on a sample of 8-10 models of 
> motherboards all from the same vendor I get vastly different results 
> from dmidecode. I'd strongly discourage anybody from trying to integrate 
> it into other software for anything aside from general informational use.
ok, then would be enough to have the possibility of uuid parameter in
config and everyone would be free to put there whatever uuid it is
wished (be it generated or taken from hardware).. the only concern would
be to keep the same configuration for that machine ..

Any thoughts on this?

Thanks!
Adrian

P.S. i read the rest of the thread but i thought that is better to
answer here


> 
> -Dave
> 
> On 08/01/2013 01:50 AM, Adrian Sevcenco wrote:
>> Hi! Regarding the identification of hosts based on motherboard UUID i
>> thought to post some info to spare developers of ganglia of some wasted
>> seconds :)
>> So : on rhel systems you must do :
>> yum install python-dmidecode  (so gmond should have dependency on this
>> package that is found in distros repo)
>>
>> and the small python script (taken from the example of developers of
>> python-demidecode) would be like this (removed all comments for space
>> reasons) :
>>
>> import dmidecode
>> import sys, os
>> from pprint import pprint
>>
>> def print_warnings():
>>          "Simple function, dumping out warnings with a prefix if warnings
>> are found and clearing warning buffer"
>>          warn = dmidecode.get_warnings()
>>          if warn:
>>                print "### WARNING: %s" % warn
>>                dmidecode.clear_warnings()
>>
>> root_user = (os.getuid() == 0 and True or False)
>> if not root_user:
>>          print "####  NOT RUNNING AS ROOT"
>>
>> dmixml = dmidecode.dmidecodeXML()
>>
>> dmixml.SetResultType(dmidecode.DMIXML_DOC)
>> xmldoc = dmixml.QuerySection('all')
>> dmixp = xmldoc.xpathNewContext()
>> data = dmixp.xpathEval('/dmidecode/SystemInfo/SystemUUID')
>> for d in data:
>>                  print "%s" % (d.get_content())
>>
>> del dmixp
>> del xmldoc
>>
>> HTH,
>> Adrian
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Get your SQL database under version control now!
>> Version control is standard for application code, but databases havent
>> caught up. So what steps can you take to put your SQL databases under
>> version control? Why should you start doing it? Read more to find out.
>> http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
>>
>>
>>
>> _______________________________________________
>> Ganglia-developers mailing list
>> Ganglia-developers@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/ganglia-developers
>>
> 
> 
> ------------------------------------------------------------------------------
> Get your SQL database under version control now!
> Version control is standard for application code, but databases havent 
> caught up. So what steps can you take to put your SQL databases under 
> version control? Why should you start doing it? Read more to find out.
> http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
> _______________________________________________
> Ganglia-developers mailing list
> Ganglia-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ganglia-developers
> 


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
Ganglia-developers mailing list
Ganglia-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ganglia-developers

Reply via email to