Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hostname, uname -n, etc 2

Status
Not open for further replies.

stawolg

Technical User
Sep 25, 2001
28
DE
I need some explanation of the relationship of:

1. hostname
Why doesnt this command change the odm? Only smitty hostname does.
Where is the result of a change via hostname-command stored else?
2. uname -n
Same question as above.
Why doesnt uname -n care about a change via hostname or smitty hostname, even when the hostname in odm is changed?
3. hostid
How is this related to the commands above?
 
1. To change the value of hostname on the ODM you need to use the chdev command. In effect this is what using SMIT to change the hostname does. It doesn't call the hostname command but runs a shell script. This script uses chdev to set the hostname.

Why doesn't hostname change the ODM? Well, as with many of the TCP/IP commands (route add for example) they only make temporary changes. The plan being that if you screw up, you can reboot which puts back all the defaults from the ODM

2. Uname is set in /etc/rc.net at boot time using the uname -S command. Uname merely reports on what was set with this command. If you change the hostname either with hostname or SMIT/chdev, this will not update the entry for Uname. When you next reboot, /etc/rc.net will take uname from the ODM and set it to be correct.

3. Hostid is again set in /etc/rc.net at boot time. Basically either it takes the hostid from the ODM, or if the ODM isn't being used to set network config information, then it takes the values from those set manually in the /etc/rc.net file.

Hope that helps, LHLTech

IBM Certified Specialist - AIX System Support
Halfway through CATE exams!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top