- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Length of hostname
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-09-2002 04:08 PM
тАО12-09-2002 04:08 PM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-09-2002 04:11 PM
тАО12-09-2002 04:11 PM
Re: Length of hostname
The sethostname() system call sets the name of the host processor to
name, which has a length of namelen characters. At system boot time
sethostname() is normally executed by the hostname command (see
hostname(1)) in the /sbin/init.d/hostname script. Host names are
limited to MAXHOSTNAMELEN characters, as defined in
$ grep MAXHOSTNAMELEN /usr/include/sys/param.h
#define MAXHOSTNAMELEN 64 /* max length of hostname */
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-09-2002 05:34 PM
тАО12-09-2002 05:34 PM
Re: Length of hostname
For example, you want the `uname` command to be able to display the entire hostname. uname uses utsname which is defined in usr/include/sys/utsname.h as: #define UTSLEN 9
this is a 9 character null-terminated string (per the man pages). I've read (but am not positive) that the maximum is 8 because of 8 characters + null.
There's other issues I've read about (UUCP, etc.) for having a hostname longer than 8 characters, so it might be best sticking with the recommended length if you can.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-09-2002 05:38 PM
тАО12-09-2002 05:38 PM
Re: Length of hostname
You actually COULD have code that might fail if you exceed 8 characters, but like the limit says (64), if you wish to go beyond 8 characters, that's your choice :-)
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-09-2002 06:26 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-09-2002 09:21 PM
тАО12-09-2002 09:21 PM
Re: Length of hostname
you can have any length for hostname, but while displaying it shows only first 8 characters,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-09-2002 11:14 PM
тАО12-09-2002 11:14 PM
Re: Length of hostname
It's definitly 8 if you don't want to go in big troubles ... Consider MAXHOSTNAMELEN (64)as the maximum length for fully qualified hostnames (host.domain.com) and UTSLEN (8+1) for real hostnames displayed by uname -n command.
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-10-2002 02:00 AM
тАО12-10-2002 02:00 AM
Re: Length of hostname
The system Takes character's up to infinity but while displaying it shows only 8 characters. since Unmae displays only 8 chars ..
Cheers
Asif
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-10-2002 02:57 AM
тАО12-10-2002 02:57 AM
Re: Length of hostname
The Software Distributor tools (swinstall, etc.) use the system's hostname, and uname value interchangeably, and since the uname value is restricted to 8 characters, the SD tools would fail if the hostname is longer than 8.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-10-2002 05:59 AM
тАО12-10-2002 05:59 AM
Re: Length of hostname
My web server for my web hosting biz at home runs Linux. The main server host name is jerusalem, my favorite city. That's nine characters btw
I tried that with an HP-UX box and had issues with swinstall and Ignite. That server is now called Moriah (the Temple Mount).
8 character limit is the way to go with HP-UX and thats 11.11 btw.
Steve
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-10-2002 06:00 AM
тАО12-10-2002 06:00 AM
Re: Length of hostname
My web server for my web hosting biz at home runs Linux. The main server host name is jerusalem, my favorite city. That's nine characters btw
I tried that with an HP-UX box and had issues with swinstall and Ignite. That server is now called Moriah (the Temple Mount).
8 character limit is the way to go with HP-UX and thats 11.11 btw.
Yes, it was stupid to try and name two servers I work with the same thing, but that's not how it happened. The jerusalem box at home went in after I figured out I couldn't use it at work.
Steve
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-10-2002 08:43 AM
тАО12-10-2002 08:43 AM
Re: Length of hostname
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-10-2002 09:03 AM
тАО12-10-2002 09:03 AM
Re: Length of hostname
you can take help from this thread
http://bizforums.itrc.hp.com/cm/QuestionAnswer/1,,0xe90957bd90a9d611abdb0090277a778c,00.html
"The answer for your question can be found from:
# man hostname
The max. limit will be defined in /usr/include/sys/param.h with the parameter - MAXHOSTNAMELEN. This is 64.
However, It is strongly recommended to keep your hostname up to 8 characters. Because the UUCP nodename is restricted to 8 characters and it automatically accepts the value from the set hostname. "
Manoj Srivastava
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-10-2002 09:28 AM
тАО12-10-2002 09:28 AM
Re: Length of hostname
Even some of the newer systems coming out have hard limite built in to help the windows people conform to the standards, instead of defining their own. again........
if you need long names, setup DNS and make good domain/sub-domain names. This way legacy systems and systems that support only 8 characters can still function.
Here are a few systems not supporting more than 8 characters.
OS/400, MVS, WinNT3.5, Windows 3.1, DOS, MacOS less than 9, SCO Unix, Most Unices older than 4 years.
Regards,
Shannon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-10-2002 09:48 AM
тАО12-10-2002 09:48 AM