Operating System - HP-UX
1849594 Members
6979 Online
104044 Solutions
New Discussion

uname -a provides "unknown" hostname

 
Tal Drigov
Advisor

uname -a provides "unknown" hostname

Platform: S700, C180
OS: HP-UX 11.00
Lan: DHCP client

when running "uname -a" I'm getting an output "unknown" at the hostname, while running "hostname" command I'm getting the right output.

because of that the X-Windows won't work.


Help needed.
7 REPLIES 7
Rajeev  Shukla
Honored Contributor

Re: uname -a provides "unknown" hostname

try using uname -S and set the hostname and try your x-window after that.

have a look at man pages of uname for more detail.

Rajeev
Patrick Wallek
Honored Contributor

Re: uname -a provides "unknown" hostname

Same reply as your other thread:

Is your hostname more than 8 characters in length? If it is, shorten it. There are LOTS of issues with having a hostname that is longer than 8 characters in HP-UX.

The following document is from the TKB, circa 1992, but it is still applicable. TKB doc. ID CDG9204080930. Here's the link:
http://www1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000007949952

MANOJ SRIVASTAVA
Honored Contributor

Re: uname -a provides "unknown" hostname

how does the server reslov its own name ? try doing a nslookup to see how the servers its name . ,most probably the same is setup to resolv thoruhg the DNS server , to eliminate the error , rename /etc/resoilc.conf to old.conf and check the entry /etc/hosts for the local server , the same should be coreect in case the same is not then correct it and then do a nslookup < local hostname > this should result in the server resloving its own coreectly . Once this is done you know that the problem is either in the DNS , or mahcinr using resolve.conf to get to the DNS server or the DNS server is not reachable.


Manoj Srivatava
Gopakumar V
New Member

Re: uname -a provides "unknown" hostname

Check for any entry called NODENAME in /etc/rc.config.d/netconf file.If yes,then remove the entry.

Also make the following entry in the /etc/nsswitch.conf file

hosts: files dns

Check nslookup for name resolution.

I believe in this setup your swlist also is not working. After changing the above specified stopa and start the swagentd daemon.Check whether swlist is running fine.If yes then problem is solved.

Then go for a reboot. This should solve the issue
Prashant Zanwar_4
Respected Contributor

Re: uname -a provides "unknown" hostname

you can try running set_parms hostname and then see what is the default name system is showing. If it is showing correct just hit enter and come out.
Hope this helps
Prashant
"Intellect distinguishes between the possible and the impossible; reason distinguishes between the sensible and the senseless. Even the possible can be senseless."
Muthukumar_5
Honored Contributor

Re: uname -a provides "unknown" hostname

uname will be using informations from uname -S output there. Try to check as

uname -S
it will give hostname with that, uucp, related programs are using them.

You can get the difference between hostname Vs uname -S as,

uname+1 man page -->
+--------------+--------------+---------------+-----------------------+
|Node Name |Command |name Format |Used By |
+--------------+--------------+---------------+-----------------------+
|Internet name |hostname name |sys[.x.y.z...] |ARPA and NFS Services |
|UUCP name |uname -S name |sys |uucp, related programs |
+--------------+--------------+---------------+-------- --------------+


Try to check /etc/rc.config/netconf for hostname informations there.

uname -S

it will display hostname there again when u check as uname -S.

HTH.
Easy to suggest when don't know about the problem!
Patrick Wallek
Honored Contributor

Re: uname -a provides "unknown" hostname

Folks --- Please note that this thread was posted almost 2 YEARS ago (in Dec. 2002).

I see no added value in posting to a 2 year old thread.

The last time the author of this thread was on the forums was May 2003, so I doubt the author will see these responses or really gain any value from them.