~ubuntu-branches/ubuntu/utopic/gridengine/utopic

« back to all changes in this revision

Viewing changes to doc/htmlman/htmlman1/gethostname.html

  • Committer: Bazaar Package Importer
  • Author(s): Mark Hymers
  • Date: 2008-06-25 22:36:13 UTC
  • Revision ID: james.westby@ubuntu.com-20080625223613-tvd9xlhuoct9kyhm
Tags: upstream-6.2~beta2
ImportĀ upstreamĀ versionĀ 6.2~beta2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<HTML>
 
2
<BODY BGCOLOR=white>
 
3
<PRE>
 
4
<!-- Manpage converted by man2html 3.0.1 -->
 
5
NAME
 
6
     gethostname   -
 
7
               get local hostname.
 
8
 
 
9
     gethostbyname -
 
10
               get local host information for specified hostname.
 
11
 
 
12
     gethostbyaddr -
 
13
               get hostname via IP address.
 
14
 
 
15
     getservbyname -
 
16
               get configured port number of service
 
17
 
 
18
SYNTAX
 
19
     gethostname [-help|-name|-aname|-all]
 
20
 
 
21
     gethostbyname [-help|-name|-aname|-all] &lt;name&gt;
 
22
 
 
23
     gethostbyaddr [-help|-name|-aname|-all] &lt;ip&gt;
 
24
 
 
25
     getservbyname [-help|-number] &lt;service&gt;
 
26
 
 
27
DESCRIPTION
 
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).
 
33
 
 
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.
 
40
 
 
41
OPTIONS
 
42
  -help
 
43
     Prints a list of all options.
 
44
 
 
45
  -name
 
46
     This option only reports the primary name of the host.
 
47
 
 
48
  -aname
 
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.
 
53
 
 
54
     This option will print out the Grid Engine host name.
 
55
 
 
56
 
 
57
  -all
 
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
 
61
     of the host.
 
62
 
 
63
  -number
 
64
     This option will print out the port number of the  specified
 
65
     service name.
 
66
 
 
67
  &lt;name&gt;
 
68
     The host name for which the information is requested.
 
69
 
 
70
  &lt;ip&gt;
 
71
     The IP address  (dotted  decimal  notation)  for  which  the
 
72
     information is requested.
 
73
 
 
74
  &lt;service&gt;
 
75
     The service name for  which  the  information  is  requested
 
76
     (e.g. ftp, sge_qmaster or sge_execd).
 
77
 
 
78
EXAMPLES
 
79
     The following example shows how to get the  port  number  of
 
80
     the FTP service:
 
81
 
 
82
          &gt;getservbyname -number ftp
 
83
          21
 
84
 
 
85
     The next example shows the output of gethostname  -all  when
 
86
     the host alias file contains this line:
 
87
 
 
88
     gridmaster extern_name extern_name.mydomain
 
89
 
 
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".
 
93
 
 
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.
 
96
 
 
97
     The host alias file must be readable  from  each  host  (use
 
98
     e.g. NFS shared file location).
 
99
 
 
100
          &gt;gethostname -all
 
101
          Hostname: extern_name.mydomain
 
102
          SGE name: gridmaster
 
103
          Aliases:  loghost gridmaster
 
104
          Host Address(es): 192.168.143.99
 
105
 
 
106
ENVIRONMENTAL VARIABLES
 
107
     SGE_ROOT       Specifies the location  of  the  Grid  Engine
 
108
                    standard configuration files.
 
109
 
 
110
     SGE_CELL       If set, specifies  the  default  Grid  Engine
 
111
                    cell.
 
112
 
 
113
SEE ALSO
 
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>,
 
115
 
 
116
COPYRIGHT
 
117
     See <B><A HREF="../htmlman1/sge_intro.html">sge_intro(1)</A></B> for a full statement of rights and  permis-
 
118
     sions.
 
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
</PRE>
 
163
<HR>
 
164
<ADDRESS>
 
165
Man(1) output converted with
 
166
<a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
 
167
</ADDRESS>
 
168
</BODY>
 
169
</HTML>