[rhelv6-list] what does hostid return?

Mark Whidby mark.whidby at manchester.ac.uk
Fri Apr 4 14:53:32 UTC 2014


On Fri, 2014-04-04 at 10:34 -0400, Mirko Vukovic wrote:
> Hello,
> 
> 
> A software vendor asked me to provide a hostid for a software license.
> 
> 
> I typed in hostid, got an eight digit hexadecimal number and emailed
> it to them.
> 
> 
> However, they were looking for a 12 digit hex number.
> 
> I sent them the hardware address of eth0.
> 
> 
> My question is: how is the hostid number obtained?  Is it from a disk
> drive, or some other hardware.  I could not find information online.

I can't remember how I found this out but if you split the 8 digits 
of the number from hostid into pairs and convert them to decimal
you should get your IP address in the order:

octet2 octet1 octet4 octet3

Try this:

printf "%d %d %d %d\n" $(hostid | sed 's/../ 0x&/g')

I hope this helps.

-- 
Mark Whidby
Infrastructure Coordinator (Unix)
Physics/Chemistry/EAES/Mathematics Team
IT Services, Faculty of Engineering and Physical Sciences




More information about the rhelv6-list mailing list