HOSTNAMEUTILS(1)
π HOSTNAMEUTILS(1) β the Grid Engine hostname besties π
okay so this is the manual page for the hostname utils from Grid Engine User Commands, and bestie, these little cuties are literally the ones that figure out who your host actually is. no cap. let's get into it π¦
β¨ NAME β¨
gethostname, gethostbyname, gethostbyaddr, getservbyname β get local host information π
πΈ SYNTAX πΈ
like, here's the exact shape of each one, copy-paste coded:
$SGE_ROOT/utilbin/$ARCH/gethostname [-help|-name|-aname|-all]
$SGE_ROOT/utilbin/$ARCH/gethostbyname [-help|-name|-aname|-all] name
$SGE_ROOT/utilbin/$ARCH/gethostbyaddr [-help|-name|-aname|-all] ip
$SGE_ROOT/utilbin/$ARCH/getservbyname [-help|-number] service
π DESCRIPTION π
so gethostname and gethostbyname are the ones you call to get the local resolved host name. gethostbyaddr is giving reverse-lookup energy β you hand it a specified IP address (in dotted decimal notation) and it tells you the hostname. and getservbyname? that one's for grabbing the configured port number of a service (e.g. from /etc/services). obsessed.
ngl, the hostname utils are primarily used by the Grid Engine installation scripts. that's their whole main character job.
here's the vibe check on defaults, bestie: gethostname, gethostbyname and gethostbyaddr called without any option will print out the hostname, all specified aliases, and the IP address of the locally resolved hostname. and calling getservbyname without any option prints out the full service entry. periodt. β¨
π OPTIONS π
-helpβ prints a list of all the options. the "help me bestie" button π«Ά-nameβ this one only reports the primary name of the host. just the main character name, nothing else.-anameβ if this option is set, the Grid Engine host alias file is used for host name resolving. to do that it's necessary to set the environment variableSGE_ROOTand, if more than one cell is defined, alsoSGE_CELL. this option will print out the Grid Engine host name. iykyk π-allβ using-allprints out all available host information. that info includes the host name, the Grid Engine host name, all host aliases, and the IP address of the host. the full glow-up β¨-numberβ this option prints out the port number of the specified service name. π’<name>β the host name for which the information is requested.<ip>β the IP address (dotted decimal notation) for which the information is requested.<service>β the service name for which the information is requested (e.g.ftp,sge_qmasterorsge_execd).
π EXAMPLES π
first up, here's how to get the port number of the FTP service:
>/opt/sge/default/lx-amd64/getservbyname -number ftp
21
okay and the next example shows the output of gethostname -all when the host alias file contains this line:
gridmaster extern_name extern_name.mydomain
important bestie: the local host resolving must also provide the alias namegridmaster. each Grid Engine host that wants to use the cluster must be able to resolve the host namegridmaster. no resolving, no cluster, that's just how it is π
to setup an alias name, edit your /etc/hosts file or modify your NIS setup to provide the alias for the NIS clients.
and the host alias file must be readable from each host (use e.g. an NFS shared file location). don't gatekeep the file from the other hosts, they need it π₯Ί
>/opt/sge/default/lx-amd64/gethostname -all
Hostname: extern_name.mydomain
SGE name: gridmaster
Aliases: loghost gridmaster
Host Address(es): 192.168.143.99
π§ ENVIRONMENT VARIABLES π§
SGE_ROOTβ specifies the location of the Grid Engine standard configuration files.SGE_CELLβ if set, specifies the default Grid Engine cell.
π¦ SEE ALSO π¦
sge_intro(1), host_aliases(5),
π COPYRIGHT π
see sge_intro(1) for a full statement of rights and permissions.
and that's the whole page, bestie!! this lil masterpiece is from SGE 8.1.3pre, dated 2009-03-12, living under the Grid Engine User Commands umbrella β go resolve some hosts, you absolute icon πβ¨ππ¦πΈπ π«Ά
π¦ where this page comes from
- debian bookworm: gridengine-common 8.1.9+dfsg-10 Β· SISSL
- debian trixie: gridengine-common 8.1.9+dfsg-13.1 Β· SISSL
- ubuntu jammy: gridengine-common 8.1.9+dfsg-10build1 Β· SISSL
- ubuntu noble: gridengine-common 8.1.9+dfsg-11build3 Β· SISSL
- ubuntu questing: gridengine-common 8.1.9+dfsg-13.1
- ubuntu resolute: gridengine-common 8.1.9+dfsg-13.2 Β· SISSL
- ubuntu stonking: gridengine-common 8.1.9+dfsg-13.2ubuntu1 Β· SISSL
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms