1HOSTNAMEUTILS(1) Grid Engine User Commands HOSTNAMEUTILS(1)
2
3
4
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
19 gethostname [-help|-name|-aname|-all]
20
21 gethostbyname [-help|-name|-aname|-all] <name>
22
23 gethostbyaddr [-help|-name|-aname|-all] <ip>
24
25 getservbyname [-help|-number] <service>
26
28 gethostname and gethostbyname are used to get the local resolved host
29 name. gethostbyaddr is used to get the hostname of a specified IP
30 address (dotted decimal notation). getservbyname can be used to get
31 the configured port number of a service (e.g. from /etc/services).
32
33 The hostname utils are primarily used by the Grid Engine installation
34 scripts. gethostname , gethostbyname and gethostbyaddr called without
35 any option will print out the hostname, all specified aliases, and the
36 IP address of the locally resolved hostname. Calling getservbyname
37 without any option will print out the full service entry.
38
40 -help
41 Prints a list of all options.
42
43 -name
44 This option only reports the primary name of the host.
45
46 -aname
47 If this option is set, the Grid Engine host alias file is used for host
48 name resolving. It is necessary to set the environment variable GE_ROOT
49 and, if more than one cell is defined, also GE_CELL.
50
51 This option will print out the Grid Engine host name.
52
53 -all
54 By using the -all option all available host information will be
55 printed. This information includes the host name, the Grid Engine host
56 name, all host aliases, and the IP address of the host.
57
58 -number
59 This option will print out the port number of the specified service
60 name.
61
62 <name>
63 The host name for which the information is requested.
64
65 <ip>
66 The IP address (dotted decimal notation) for which the information is
67 requested.
68
69 <service>
70 The service name for which the information is requested (e.g. ftp,
71 sge_qmaster or sge_execd).
72
74 The following example shows how to get the port number of the FTP ser‐
75 vice:
76
77 >getservbyname -number ftp
78 21
79
80 The next example shows the output of gethostname -all when the host
81 alias file contains this line:
82
83 gridmaster extern_name extern_name.mydomain
84
85 The local host resolving must also provide the alias name "gridmaster".
86 Each Grid Engine host that wants to use the cluster must be able to
87 resolve the host name "gridmaster".
88
89 To setup an alias name, edit your /etc/hosts file or modify your NIS
90 setup to provide the alias for the NIS clients.
91
92 The host alias file must be readable from each host (use e.g. NFS
93 shared file location).
94
95 >gethostname -all
96 Hostname: extern_name.mydomain
97 SGE name: gridmaster
98 Aliases: loghost gridmaster
99 Host Address(es): 192.168.143.99
100
102 GE_ROOT Specifies the location of the Grid Engine standard con‐
103 figuration files.
104
105 GE_CELL If set, specifies the default Grid Engine cell.
106
108 ge_intro(1), host_aliases(5),
109
111 See ge_intro(1) for a full statement of rights and permissions.
112
113
114
115
116GE 6.2u5 $Date: 2009/03/12 16:06:25 $ HOSTNAMEUTILS(1)