HOSTNAMEUTILS(1)           Grid Engine User Commands          HOSTNAMEUTILS(1)



[1mNAME[0m
       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

[1mSYNTAX[0m
       [1mgethostname [-help|-name|-aname|-all][0m

       [1mgethostbyname [-help|-name|-aname|-all] <name>[0m

       [1mgethostbyaddr [-help|-name|-aname|-all] <ip>[0m

       [1mgetservbyname [-help|-number] <service>[0m


[1mDESCRIPTION[0m
       [4mgethostname[24m  and  [4mgethostbyname[24m are used to get the local resolved host
       name.  [4mgethostbyaddr[24m is used to get the  hostname  of  a  specified  IP
       address  (dotted  decimal  notation).  [4mgetservbyname[24m 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.   [4mgethostname[24m , [4mgethostbyname[24m and [4mgethostbyaddr[24m called without
       any option will print out the hostname, all specified aliases, and  the
       IP  address  of  the  locally resolved hostname.  Calling [4mgetservbyname[0m
       without any option will print out the full service entry.


[1mOPTIONS[0m
   [1m-help[0m
       Prints a list of all options.

   [1m-name[0m
       This option only reports the primary name of the host.

   [1m-aname[0m
       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 GE_ROOT
       and, if more than one cell is defined, also GE_CELL.

       This option will print out the Grid Engine host name.

   [1m-all[0m
       By using the  [1m-all  [22moption  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.

   [1m-number[0m
       This option will print out the port number  of  the  specified  service
       name.

   [1m<name>[0m
       The host name for which the information is requested.

   [1m<ip>[0m
       The  IP  address (dotted decimal notation) for which the information is
       requested.

   [1m<service>[0m
       The service name for which the  information  is  requested  (e.g.  ftp,
       sge_qmaster or sge_execd).

[1mEXAMPLES[0m
       The  following example shows how to get the port number of the FTP ser-
       vice:

              >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

[1mENVIRONMENTAL VARIABLES[0m
       [1mGE_ROOT        [22mSpecifies  the location of the Grid Engine standard con-
                      figuration files.

       [1mGE_CELL        [22mIf set, specifies the default Grid Engine cell.

[1mSEE ALSO[0m
       [4mge_intro[24m(1), [4mGE_H_ALIASES[24m(5),

[1mCOPYRIGHT[0m
       See [4mge_intro[24m(1) for a full statement of rights and permissions.



GE 6.2u2                 $Date: 2007/01/05 19:56:12 $         HOSTNAMEUTILS(1)
