Node and Host Name Sizes on HP-UX: Using the Expanded Capabilities of HP-UX

5
kctune expanded_node_host_names=1
To turn off this parameter, use the same command, but set the value to 0. For more information, see
kctune(1m). Note that changing this parameter does not affect any current node and host name
settings, regardless of their length. The node and host names should be changed to 8 or 64 bytes (or
less) before turning off the parameter.
Setting Nonexpanded uname(2) Overflow Reporting
The default operating system configuration causes the nonexpanded version of the uname(2) system
function to return the EOVERFLOW error if the system node name is set to a value of more than 9
bytes (including null terminator). A tunable parameter, uname_eoverflow, is provided to control
whether or not this error is reported.
1
It is documented in the manpage uname_eoverflow(5).To
change the system behavior to silently truncate the node name without an error, use the following
command:
kctune uname_eoverflow=0
Caution: The lack of error reporting means that applications are not alerted to inaccuracy of the
requested data (that is, truncation). Therefore, the application might exhibit other indeterminate
failures.
Setting a Node or Host Name
Once the expanded_node_host_names tunable is turned on, you can set a longer node or host
name using the same utilities that are used to set names of any size.
To set the node and host name, and to make the settings persist after a reboot, use this command:
/sbin/set_parms hostname
Note that you must type the string hostname, not the desired host name. This command prompts
for the desired host name. It then edits the system configuration scripts to ensure that the names
persist after a reboot.
2
In some cases you might want to make the node and host name settings temporary (that is, the settings
do not persist after reboot). To do so, use the following commands for the node and host names,
respectively:
setuname t n <nodename>
hostname <hostname>
Note that it is not possible to set long names during system cold installation. This is because the
expanded_node_host_names tunable is off by default. Temporary node and host names should be
assigned until the longer names can be set. (The network administrator should be able to assign a
short alias for the long name.)
1
This tunable is first available in HP-UX 11i v3. HP-UX 11i v2 provided no capability to report the error.
2
Note that set_parms does not accept individual labels in the name in excess of 63 characters. For more information see
Appendix A “Rules in Constructing Node and Host Names.”