Operating System - HP-UX
1834018 Members
2327 Online
110063 Solutions
New Discussion

Re: How do I get the Fully Qualified HostName of an HP-UX node?

 
Zinky
Honored Contributor

How do I get the Fully Qualified HostName of an HP-UX node?

Is there a single command to display osmething like:

dopey# /sbin/fqhostname
dopey@faraway.com

I can grep for domain name from /etc/resolv.conf but what if I am using a different name service..?
Hakuna Matata

Favourite Toy:
AMD Athlon II X6 1090T 6-core, 16GB RAM, 12TB ZFS RAIDZ-2 Storage. Linux Centos 5.6 running KVM Hypervisor. Virtual Machines: Ubuntu, Mint, Solaris 10, Windows 7 Professional, Windows XP Pro, Windows Server 2008R2, DOS 6.22, OpenFiler
4 REPLIES 4
Geoff Wild
Honored Contributor

Re: How do I get the Fully Qualified HostName of an HP-UX node?

Did you try nslookup and/or dig?

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Prashant Zanwar_4
Respected Contributor

Re: How do I get the Fully Qualified HostName of an HP-UX node?

nslookup servername

I believe this refers to all the name services in nsswitch.conf

Hope it helps
Thanks
Prashant
"Intellect distinguishes between the possible and the impossible; reason distinguishes between the sensible and the senseless. Even the possible can be senseless."
Zinky
Honored Contributor

Re: How do I get the Fully Qualified HostName of an HP-UX node?

nslookup was the first I thought of.. BUT.. we've servers that have multiple DNS entries that are difeerent from the "hostname"..

Oh well.. some scripting trickery ahead i supposed
Hakuna Matata

Favourite Toy:
AMD Athlon II X6 1090T 6-core, 16GB RAM, 12TB ZFS RAIDZ-2 Storage. Linux Centos 5.6 running KVM Hypervisor. Virtual Machines: Ubuntu, Mint, Solaris 10, Windows 7 Professional, Windows XP Pro, Windows Server 2008R2, DOS 6.22, OpenFiler
Zinky
Honored Contributor

Re: How do I get the Fully Qualified HostName of an HP-UX node?

Graci.

Am closing thread..
Hakuna Matata

Favourite Toy:
AMD Athlon II X6 1090T 6-core, 16GB RAM, 12TB ZFS RAIDZ-2 Storage. Linux Centos 5.6 running KVM Hypervisor. Virtual Machines: Ubuntu, Mint, Solaris 10, Windows 7 Professional, Windows XP Pro, Windows Server 2008R2, DOS 6.22, OpenFiler