I have been storing the output of facter in a database with the assumption that uniqueid was actually unique, until I found that it is the same for a handful of my machines. It appears that uniqueid is set from the output of hostid. I checked into hostid and it gets its value from gethostid(). The following link, http://www.opengroup.org/onlinepubs/009695399/functions/gethostid.html, states, "This volume of IEEE Std 1003.1-2001 does not define the domain in which the return value is unique." Perhaps uniqueid should be keyed off of a UUID for the system. RedHat provides /etc/sysconfig/hw-uuid. I could not find the standard equivalent on Ubuntu, but you could pipe uuidgen into a file and have facter read from that. -g -- Garrett Honeycutt Sr. Systems Engineer Direct > 800.556.5829x2555 Fax > 206.728.1500 www.speakeasy.net Voice * Data * Managed Services
On Dec 26, 2007, at 6:18 PM, Garrett Honeycutt wrote:> I have been storing the output of facter in a database with the > assumption that uniqueid was actually unique, until I found that it is > the same for a handful of my machines. > > It appears that uniqueid is set from the output of hostid. I checked > into hostid and it gets its value from gethostid(). The following > link, > http://www.opengroup.org/onlinepubs/009695399/functions/ > gethostid.html, > states, > > "This volume of IEEE Std 1003.1-2001 does not define the domain in > which > the return value is unique." > > Perhaps uniqueid should be keyed off of a UUID for the system. RedHat > provides /etc/sysconfig/hw-uuid. I could not find the standard > equivalent on Ubuntu, but you could pipe uuidgen into a file and have > facter read from that.I''m not too surprised to find that uniqueid isn''t unique, and I''m glad to accept patches that make it so, although keep in mind that many of these tools aren''t as common as we''d hope. -- It''s not the voting that''s democracy, it''s the counting. -- Tom Stoppard --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
> > Perhaps uniqueid should be keyed off of a UUID for the system. RedHat > > provides /etc/sysconfig/hw-uuid. I could not find the standard > > equivalent on Ubuntu, but you could pipe uuidgen into a file and have > > facter read from that. > > I''m not too surprised to find that uniqueid isn''t unique, and I''m > glad to accept patches that make it so, although keep in mind that > many of these tools aren''t as common as we''d hope.Hi, On most recent linux systems I know of /proc/sys/kernel/random/uuid provides a uuid without a userspace tool that needs to be installed. This at least fixes linux systems. gr, Bart -- Bart Vanbrabant <bart.vanbrabant@zoeloelip.be>
On 28/12/2007, Bart Vanbrabant <bart.vanbrabant@zoeloelip.be> wrote:> On most recent linux systems I know of /proc/sys/kernel/random/uuid > provides a uuid without a userspace tool that needs to be installed. > This at least fixes linux systems.hostid on solaris sparc is unique and consistent across OS reinstalls: on x86 it can''t be guaranteed to be unique, and will change on a reinstall, but you''d be very unlucky to hit a duplicate. -- Gary Law