1847152 Members
6686 Online
110263 Solutions
New Discussion

HOSTID

 
SOLVED
Go to solution
P.V.Ramesh
Advisor

HOSTID

Hi

How do i find hostid of a machine
7 REPLIES 7
Pete Randall
Outstanding Contributor
Solution

Re: HOSTID

Sajid_1
Honored Contributor

Re: HOSTID

I am assuming you are asking a similar command of Sun's 'hostid'? In HP-UX, you will get the Ethernet h/w address (host id) from this command:

# lanscan

Look at the station address field
learn unix ..
Rainer von Bongartz
Honored Contributor

Re: HOSTID


use the getconf command

see man getconf

I your case getconf MACHINE_IDENT



Regards
Rainer
He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
P.V.Ramesh
Advisor

Re: HOSTID

Hi sajid

The answer is wrong. Pete is correct. It gives the number in decimal, where as lmhostid coverts this into hex and reads.
Every machine has it's own identification number called "HOSTID". The answer what i have received from is the MAC address of the ethernet.

Hi Rannel

I am sorry if spell your name wrong. The option which you have mentioned with getconf is not working. I am using HP-UX 11.00. I have gone through the man page of getconf. That option is not available
MANOJ SRIVASTAVA
Honored Contributor

Re: HOSTID

Also there is commnad like this

/opt/ifor/ls/bin/i4target -v


to get the SPU id.


Manoj Srivastava
Rainer von Bongartz
Honored Contributor

Re: HOSTID

getconf MACHINE_IDENT

is implemented in 11i not in 11.0

So better post your OS version in the future to avoid misunderstandings


Regards
Rainer
He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
T G Manikandan
Honored Contributor

Re: HOSTID

If you are talking of the machine ID i.e. uname -i
then

Pete link is the right one.
If you are talking about the hostid(derived from MAC address)

then you have to get it from

#/usr/sbin/lanscan | grep 0x | cut -c12-23


Thanks