1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169
|
<HTML>
<BODY BGCOLOR=white>
<PRE>
<!-- Manpage converted by man2html 3.0.1 -->
NAME
gethostname -
get local hostname.
gethostbyname -
get local host information for specified hostname.
gethostbyaddr -
get hostname via IP address.
getservbyname -
get configured port number of service
SYNTAX
gethostname [-help|-name|-aname|-all]
gethostbyname [-help|-name|-aname|-all] <name>
gethostbyaddr [-help|-name|-aname|-all] <ip>
getservbyname [-help|-number] <service>
DESCRIPTION
<I>gethostname</I> and <I>gethostbyname</I> are used to get the local
resolved host name. <I>gethostbyaddr</I> is used to get the host-
name of a specified IP address (dotted decimal notation).
<I>getservbyname</I> can be used to get the configured port number
of a service (e.g. from /etc/services).
The hostname utils are primarily used by the Grid Engine
installation scripts. <I>gethostname</I> , <I>gethostbyname</I> and
<I>gethostbyaddr</I> called without any option will print out the
hostname, all specified aliases, and the IP address of the
locally resolved hostname. Calling <I>getservbyname</I> without
any option will print out the full service entry.
OPTIONS
-help
Prints a list of all options.
-name
This option only reports the primary name of the host.
-aname
If this option is set, the Grid Engine host alias file is
used for host name resolving. It is necessary to set the
environment variable SGE_ROOT and, if more than one cell is
defined, also SGE_CELL.
This option will print out the Grid Engine host name.
-all
By using the -all option all available host information will
be printed. This information includes the host name, the
Grid Engine host name, all host aliases, and the IP address
of the host.
-number
This option will print 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_qmaster or sge_execd).
EXAMPLES
The following example shows how to get the port number of
the FTP service:
>getservbyname -number ftp
21
The next example shows the output of gethostname -all when
the host alias file contains this line:
gridmaster extern_name extern_name.mydomain
The local host resolving must also provide the alias name
"gridmaster". Each Grid Engine host that wants to use the
cluster must be able to resolve the host name "gridmaster".
To setup an alias name, edit your /etc/hosts file or modify
your NIS setup to provide the alias for the NIS clients.
The host alias file must be readable from each host (use
e.g. NFS shared file location).
>gethostname -all
Hostname: extern_name.mydomain
SGE name: gridmaster
Aliases: loghost gridmaster
Host Address(es): 192.168.143.99
ENVIRONMENTAL 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
<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>,
COPYRIGHT
See <B><A HREF="../htmlman1/sge_intro.html">sge_intro(1)</A></B> for a full statement of rights and permis-
sions.
</PRE>
<HR>
<ADDRESS>
Man(1) output converted with
<a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
</ADDRESS>
</BODY>
</HTML>
|