4
<!-- Manpage converted by man2html 3.0.1 -->
10
get local host information for specified hostname.
13
get hostname via IP address.
16
get configured port number of service
19
gethostname [-help|-name|-aname|-all]
21
gethostbyname [-help|-name|-aname|-all] <name>
23
gethostbyaddr [-help|-name|-aname|-all] <ip>
25
getservbyname [-help|-number] <service>
28
<I>gethostname</I> and <I>gethostbyname</I> are used to get the local
29
resolved host name. <I>gethostbyaddr</I> is used to get the host-
30
name of a specified IP address (dotted decimal notation).
31
<I>getservbyname</I> can be used to get the configured port number
32
of a service (e.g. from /etc/services).
34
The hostname utils are primarily used by the Grid Engine
35
installation scripts. <I>gethostname</I> , <I>gethostbyname</I> and
36
<I>gethostbyaddr</I> called without any option will print out the
37
hostname, all specified aliases, and the IP address of the
38
locally resolved hostname. Calling <I>getservbyname</I> without
39
any option will print out the full service entry.
43
Prints a list of all options.
46
This option only reports the primary name of the host.
49
If this option is set, the Grid Engine host alias file is
50
used for host name resolving. It is necessary to set the
51
environment variable SGE_ROOT and, if more than one cell is
52
defined, also SGE_CELL.
54
This option will print out the Grid Engine host name.
58
By using the -all option all available host information will
59
be printed. This information includes the host name, the
60
Grid Engine host name, all host aliases, and the IP address
64
This option will print out the port number of the specified
68
The host name for which the information is requested.
71
The IP address (dotted decimal notation) for which the
72
information is requested.
75
The service name for which the information is requested
76
(e.g. ftp, sge_qmaster or sge_execd).
79
The following example shows how to get the port number of
82
>getservbyname -number ftp
85
The next example shows the output of gethostname -all when
86
the host alias file contains this line:
88
gridmaster extern_name extern_name.mydomain
90
The local host resolving must also provide the alias name
91
"gridmaster". Each Grid Engine host that wants to use the
92
cluster must be able to resolve the host name "gridmaster".
94
To setup an alias name, edit your /etc/hosts file or modify
95
your NIS setup to provide the alias for the NIS clients.
97
The host alias file must be readable from each host (use
98
e.g. NFS shared file location).
101
Hostname: extern_name.mydomain
103
Aliases: loghost gridmaster
104
Host Address(es): 192.168.143.99
106
ENVIRONMENTAL VARIABLES
107
SGE_ROOT Specifies the location of the Grid Engine
108
standard configuration files.
110
SGE_CELL If set, specifies the default Grid Engine
114
<B><A HREF="../htmlman1/sge_intro.html">sge_intro(1)</A></B>, <B><A HREF="../htmlman5/SGE_H_ALIASES.html">SGE_H_ALIASES(5)</A></B>,
117
See <B><A HREF="../htmlman1/sge_intro.html">sge_intro(1)</A></B> for a full statement of rights and permis-
165
Man(1) output converted with
166
<a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>