PreviousNext

Configuring Servers

Use the server create operation to make an application server accessible to the server control facility. Configuring a server means creating the information needed to start and control the server. Typically this includes a server's starting command line and arguments, along with other information needed to start DCE applications.

Some servers need to be available whenever a host system is running. For instance, you might want a server that provides information on host activity to start at the host boot time and run until the host shuts down. Other kinds of services might be needed or only for brief periods. The server control facility has an administrative interface that lets you specify some conditions for starting and stopping servers:

· Explicit - You can set a server so that you can explicitly start it whenever you want.

· Boot - You can set a server to start at boot time.

· Automatic - You can set a server to start on demand; that is, it starts whenever a client request for its services is received at the host system.

· Failure - You can set a server to start automatically if it exits unexpectedly.

The following example creates an entry for a fictitious video clip server named video_clip on the local host. For a remote host or a host in another cell, use the cell-relative or the global name. The program name vclip invokes the server which is located in the /usr/local/bin working directory. The server has a catalog mode that we set by specifying -catalog as the argument. The server uses DCE security so the server has a principal name Vclip_Srv_1. The -entryname option specifies the entry name in CDS where the server stores its binding information. The -starton option sets the server to start when the dced receives an explicit server start operation that names the video_clip server. The failure attribute further specifies to restart the server if it exits with a status that is not successful. The -services option has annotation information to help administrators identify servers when this information is returned with server show operations. The interface attribute is needed because the DCE daemon copies this information into the host endpoint map when the server starts.

dcecp> server create /.:/hosts/silver/config/srvrconf/video_clip \

> -program {/usr/local/bin/vclip} \

> -directory {/tmp} -arguments {-catalog} \

> -principal {Vclip_Srv_1} \

> -entryname {/.:/subsys/applications/video_clip_1} \

> -starton {explicit failure} \

> -services {{annotation {Video Clip Catalog and Server}} \

> {interface {d860322b-d499-11cd-9dfb-0000c08adf56 1.0}}}

dcecp>

The next example configures the same server to start whenever the host system boots. The only difference from the preceding example is that the -starton option has a value of boot.

dcecp> server create /.:/hosts/silver/config/srvrconf/video_clip \

> -program {/usr/local/bin/vclip} \

> -directory {/tmp} -arguments {-catalog} \

> -principal {Vclip_Srv_1} \

> -entryname {/.:/subsys/applications/video_clip_1} \

> -starton {boot} \

> -services {{annotation {Video Clip Catalog and Server}} \

> {interface {d860322b-d499-11cd-9dfb-0000c08adf56 1.0}}}

dcecp>

The final configuration example sets the video_clip server to start whenever a client request for its services is received at the host system. The -starton option value is auto. Unconfiguring Servers discusses the steps for disabling and enabling services.

dcecp> server create /.:/hosts/silver/config/srvrconf/video_clip \

> -program {/usr/local/bin/vclip} \

> -directory {/tmp} -arguments {-catalog} \

> -principal {Vclip_Srv_1} \

> -entryname {/.:/subsys/applications/video_clip_1} \

> -starton {auto} \

> -services {{annotation {Video Clip Catalog and Server}} \

> {interface {d860322b-d499-11cd-9dfb-0000c08adf56 1.0}}}

dcecp>