Chapter Contents

Previous

Next
SAS/SHARE User's Guide

Starting a Server

To start a server, you invoke the PROC SERVER statement, which enables multiple clients to access and to use SAS data libraries and members in those libraries at the same time. As part of server start-up, you must assign a server name, and you may optionally specify operational attributes.

Use the following syntax to start a server with the selected options:

PROC SERVER <ID=>serverid <ALLOC|NOALLOC>
<AUTHENTICATE=OPT|REQ>
<LOG=value><DTF=SAS-datetime-format>;

The following sections explain each of these options for the SERVER procedure. For complete information about server options, see The SERVER Procedure. For an example of a typical log, see Server Log Reporting All Logging Statistics.


Identifying the Server

You assign to the server a valid SAS name that can contain up to eight characters, including alphanumeric characters and the following special characters: dollar sign ($), at sign (@), and pound sign (#). See SAS Language Reference: Concepts for details about SAS naming rules.

Server naming is also constrained by the type of host that the server runs on and the access method that it uses. For complete information about serverids by host, see Communications Access Methods for SAS/CONNECT and SAS/SHARE Software.

Here is an example of how to specify a serverid:

proc server id=share1;


Limiting Users to Pre-Defined Libraries

You can use the NOALLOC option to limit users to accessing only libraries that you pre-define to the server. This option offers a broad method for controlling what data users can access through the server.


Authenticating Users

The AUTHENTICATE= option controls whether the server requires connecting clients to supply valid userid and password pairs when they connect to the server. See Ensuring That Userids Are Authentic for details about user authentication.


Logging Server Usage Statistics

You can log usage statistics for each client that accesses a server. This is useful for debugging and tuning server applications. It also allows you to charge users for their share of server resource consumption. The server, by default, writes a client's usage statistics to the server log when the client disconnects from the server. Here are some of the statistics that you may request:

Number of messages processed
Number of messages (requests and replies) that a client exchanges with a server in a single session.

Bytes transferred
Cumulative number of bytes that are received from a client and that are sent to a client in a single session.

Active time
Cumulative elapsed time that the server processed requests on behalf of a client in a single session. Although this figure is not CPU time, it is related to CPU time. Whereas CPU time for a given operation normally is relatively independent of other server usage, this figure increases with increased server level of activity. However, it should give a good relative indication of the CPU usage by the client compared with other clients' values that are tracked during similar levels of server activity. Note that this value can exceed the elapsed time value, especially in the server totals, because many server requests can be active (hence, being timed) concurrently.

Examples of how to set logging follow:

proc server id=share1 log=message;
proc server id=share1 log=bytecount;
proc server id=share1 log=(message bytecount active 
  elapsedtime);
proc server id=share1 log=all;

A typical example of a client log for all statistics follows:

Usage statistics for user mike(1):
   Messages processed:       5,143
   Bytes transferred:       10,578K
   Active time:       1:47:23.6148
   Elapsed time:      3:28:64.7386

For complete details about the logging options, see The SERVER Procedure. For a more complete example of a SAS log, see Server Log Reporting All Logging Statistics.

To charge users for their share of server resource consumption, allocate that consumption proportionately according to the utilization statistics. You may allocate consumption based on a single statistic or on a combination of statistics. The most useful statistics for this purpose are
number of messages processed
bytes transferred
active time.

You will probably need to experiment with the relative weights of these in your charge-back formula. They are at sensitive to a particular host, access method, server level of activity, and application mix.

Number of messages processed represent actual, billable work by the server. The MESSAGE, BYTECOUNT, and ACTIVETIME values of the LOG= option report data that, together, characterize the work that a user asked the server to perform. Here are a few examples:


Specifying the Format for the Server Log Timestamp

You can prepend a datetime stamp of a particular format to each message that is written to the server log or you can suppress the datetime stamp. The DATETIME22.3 default format presents the date and time in the form DDMMMYYYY:hh:mm:ss.ddd.

Examples of how to set the timestamp follow:

proc server id=share1 alloc log=cpu dtformat=time11.2;
proc server id=share1 noalloc log=io dtformat=_NODTS_;

An example of a datetime format is 18JAN1999:14:02.39.186.


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.