File: hostnameutils.1

package info (click to toggle)
gridengine 8.1.9%2Bdfsg-13.1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 57,140 kB
  • sloc: ansic: 432,689; java: 87,068; cpp: 31,958; sh: 29,445; jsp: 7,757; perl: 6,336; xml: 5,828; makefile: 4,704; csh: 3,934; ruby: 2,221; tcl: 1,676; lisp: 669; yacc: 519; python: 503; lex: 361; javascript: 200
file content (161 lines) | stat: -rw-r--r-- 4,158 bytes parent folder | download | duplicates (6)
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
'\" t
.\"___INFO__MARK_BEGIN__
.\"
.\" Copyright: 2004 by Sun Microsystems, Inc.
.\"
.\"___INFO__MARK_END__
.\"
.\"
.\" Some handy macro definitions [from Tom Christensen's man(1) manual page].
.\"
.de SB		\" small and bold
.if !"\\$1"" \\s-2\\fB\&\\$1\\s0\\fR\\$2 \\$3 \\$4 \\$5
..
.\"
.de T		\" switch to typewriter font
.ft CW		\" probably want CW if you don't have TA font
..
.\" "
.de TY		\" put $1 in typewriter font
.if t .T
.if n ``\c
\\$1\c
.if t .ft P
.if n \&''\c
\\$2
..
.\"
.de M		\" man page reference
\\fI\\$1\\fR\\|(\\$2)\\$3
..
.TH HOSTNAMEUTILS 1 2009-03-12 "xxRELxx" "xxQS_NAMExx User Commands"
.SH NAME
gethostname, gethostbyname, gethostbyaddr, getservbyname \- get local host information
.PP
.\"
.SH SYNTAX
.BR $SGE_ROOT/utilbin/$ARCH/gethostname\   [ \-help | \-name | \-aname | \-all ]
.PP
.BR $SGE_ROOT/utilbin/$ARCH/gethostbyname\   [ \-help | \-name | \-aname | \-all ]
.I name
.PP
.BR $SGE_ROOT/utilbin/$ARCH/gethostbyaddr\   [ \-help | \-name | \-aname | \-all ]
.I ip
.PP
.BR $SGE_ROOT/utilbin/$ARCH/getservbyname\  [ \-help | \-number ]
.I service
.\"
.\"
.PP
.SH DESCRIPTION
.I gethostname
and
.I gethostbyname
are used to get the local resolved host name.
.I gethostbyaddr
is used to get the hostname of a specified IP address (dotted decimal notation).
.I getservbyname
can be used to get the configured port number of a service (e.g. from /etc/services).
.PP
The hostname utils are primarily used by the xxQS_NAMExx installation scripts.
.I gethostname
,
.I gethostbyname
and
.I gethostbyaddr
called without any option will print out the hostname, all specified aliases, and the
IP address of the locally resolved hostname.
Calling
.I getservbyname
without any option will print out the full service entry.
.PP
.\"
.\"
.SH OPTIONS
.\"
.SS "\fB\-help\fP"
.PP
Prints a list of all options.
.\"
.SS "\fB\-name\fP"
.PP
This option only reports the primary name of the host.
.SS "\fB\-aname\fP"
.PP
If this option is set, the xxQS_NAMExx host alias file is used for host name
resolving. It is necessary to set the environment variable xxQS_NAME_Sxx_ROOT and,
if more than one cell is defined, also xxQS_NAME_Sxx_CELL.
.PP
This option will print out the xxQS_NAMExx host name.
.SS "\fB\-all\fP"
.PP
By using the \fB\-all\fP option all available host information will be printed.
This information includes the host name, the xxQS_NAMExx host name, all host aliases, 
and the IP address of the host.
.SS "\fB\-number\fP"
.PP
This option will print out the port number of the specified service name.
.SS "\fB<name>\fP"
.PP
The host name for which the information is requested.
.SS "\fB<ip>\fP"
The IP address (dotted decimal notation) for which the information is requested.
.SS "\fB<service>\fP"
The service name for which the information is requested (e.g. ftp, sge_qmaster or sge_execd).
.\"
.\"
.SH "EXAMPLES"
.PP
The following example shows how to get the port number of the FTP service:
.PP
.RS
.nf
>/opt/sge/default/lx-amd64/getservbyname \-number ftp
21
.fi
.RE
.PP
The next example shows the output of 
.B "gethostname \-all"
when the host alias file
contains this line:
.PP
gridmaster extern_name extern_name.mydomain
.PP
The local host resolving must also provide the alias name "gridmaster". Each xxQS_NAMExx
host that wants to use the cluster must be able to resolve the host name "gridmaster". 
.PP
.\" fixme:  host_aliases?
To setup an alias name, edit your /etc/hosts file or modify your NIS setup to provide the alias for the NIS clients.
.PP
The host alias file must be readable from each host (use e.g. NFS shared file location).
.PP
.RS
.nf
>/opt/sge/default/lx-amd64/gethostname \-all
Hostname: extern_name.mydomain
SGE name: gridmaster
Aliases:  loghost gridmaster
Host Address(es): 192.168.143.99
.fi
.RE
.\"
.\"
.SH "ENVIRONMENT VARIABLES"
.\" 
.IP "\fBxxQS_NAME_Sxx_ROOT\fP" 1.5i
Specifies the location of the xxQS_NAMExx standard configuration
files.
.\"
.IP "\fBxxQS_NAME_Sxx_CELL\fP" 1.5i
If set, specifies the default xxQS_NAMExx cell.
.\"
.\"
.SH "SEE ALSO"
.M xxqs_name_sxx_intro 1 ,
.M host_aliases 5 ,
.\"
.SH "COPYRIGHT"
See
.M xxqs_name_sxx_intro 1
for a full statement of rights and permissions.