[baylisa] Re: wtf: hostid gives '0' as a hostid

David Alban extasia at extasia.org
Wed Feb 13 13:25:56 PST 2008


On Feb 12, 2008 9:48 PM,  <cerise at armory.com> wrote:
> hostid works by using the gethostid() POSIX call.  In glibc, it's implemented
> as trying to read /etc/hostid.  If that fails, then it gets the ip address,
> shifts it left 16 bits and ors that against the ip address shifted right 16
> bits.
>
> The lower 32 bits is what hostid prints.
>
> hostid might be 0 because of your /etc/hostid.  It might be 0 because of the
> IP address or the contents of /etc/hostid.

it turns out we have some internal dns problems that may be affecting
things on that one box.

also, i think /etc/hostid is a bsd thing.  i can't find it on any linux boxes.

-- 
Live in a world of your own, but always welcome visitors.



More information about the Baylisa mailing list