Chapter Contents

Previous

Next
SAS/SHARE User's Guide

Managing a Server and Its Libraries

You can use commands in the OPERATE procedure to manage an active server, that is, a server that is running. You may display information about a server, quiesce a server, re-set a server for subsequent management operations, re-start a quiesced server, and stop a server. For details about how to manage a server, see Server Management Commands.

You can also use commands in the OPERATE procedure to manage server libraries. You may allocate a library to an active server, display information about a library, free a library, quiesce a library, or stop a library. For details about how to manage a library, see Library Management Commands.

Finally, you can use commands in the OPERATE procedure to manage users. You may display information about a user, quiesce a user's access to a server, re-start a quiesced or a stopped user, or terminate a user's connection to a server. For details about how to manage users, see User Management Commands.


Server Log Reporting OPERATE Procedure

Administrator's Log for the OPERATE Procedure shows a portion of the server administrator's log, which collects the PROC OPERATE command and its output. The log reports client/server transactions for users John and Maria who are working on a server named SHARE1.

Administrator's Log for the OPERATE Procedure
   LOG
   Command ===>

   1    proc operate serverid=share1;
   ======================================================================
   2    display user _all_;

                                              NUMBER OF
                     USER ID      STATUS      LIBRARIES
                     ----------------------------------
                     john(1)      ACTIVE         1
                     maria(2)     ACTIVE         2
                     myid(3)      ACTIVE         0
   ======================================================================
   3    stop user maria;
   User maria(2) stopped from active state.
   User maria is now disallowed from connecting to server SHARE1.
   ======================================================================
   4    display user maria;

                                              NUMBER OF
                     USER ID      STATUS      LIBRARIES
                     ----------------------------------
                     maria(2)     STOPPED        0
   ======================================================================
   5    quiesce user 1;
   User john(1) quiesced from active state.
   ======================================================================
   6    display user 1;
                                              NUMBER OF
                     USER ID      STATUS      LIBRARIES
                     ----------------------------------
                     john(1)      QUIESCED       1

   User john(1) is accessing these libraries:

          USER LIBREF    SERVER LIBREF    LIBRARY NAME
          -------------------------------------------------------------
          DATALIB        SYSUSE           <SAS-library-name>

   User john(1) is accessing these data sets:

   USER LIBREF    SERVER LIBREF    MEMBER       TYPE         OPEN MODE
   --------------------------------------------------------------------
   DATALIB        SYSUSE           USAGE        CATALOG       UPDATE
   ======================================================================
   7    start user maria;
   User maria started from stopped state and therefore has become unknown
   to server SHARE1.
   ======================================================================
   8    quit;

The OPERATE procedure sends commands 2 through 8 (shown in Administrator's Log for the OPERATE Procedure) to be executed. The DISPLAY USER command requests general information about all users who are currently accessing SHARE1. The users are listed by userid along with their current status and the number of library assignments to the server.

Next, the STOP USER command immediately disconnects user MARIA(2) from the server. If Maria is updating an observation by using the FSEDIT procedure when the STOP command is issued, she loses the updates on her display, but she does not lose previous updates. The STOP command terminates all attachments to that server, and she is prohibited from accessing that server until the administrator issues a START command.

After stopping Maria, the server administrator issues the DISPLAY USER command to check her current status. No libraries are listed for Maria because the STOP command released them.

The QUIESCE USER command gradually terminates user JOHN(1) to allow John to finish work in the data sets that he currently has open. The subsequent DISPLAY USER command reports that John is still accessing member USAGE in library DATALIB. When John closes USAGE in that library, the server releases the library and disconnects John. Because John's session was quiesced by its connect number, John can re-connect to the server when he wants to. He receives a new connection number at that time.

Next, the administrator issues the START USER command to allow Maria to access the server again. Note that the START USER command does not establish a communication path between the server and Maria. It simply enables Maria to re-establish a path by using a LIBNAME statement or an SQL CONNECT TO statement. She must explicitly re-access the server.

Finally, the QUIT statement terminates PROC OPERATE.


Server Log Reporting All Logging Statistics

Sample Log for SAS/SHARE Server SHARE2 shows a typical server log with all logging statistics reported for the server SHARE2 that is running on a UNIX host.

Sample Log for SAS/SHARE Server SHARE2
Command ===>
1?  PROC SERVER ID=share2 LOG=(ACTIVETIME BYTECOUNT ELAPSEDTIME MESSAGE) msgnumber; 
2?  run;
07JAN1999:07:15:36.690 043131 SAS server SHARE2 started.
07JAN1999:07:16:20.048 043021 User john(1) has connected to server SHARE2.
07JAN1999:07:16:20.442 043143 User john(1) has created "Line Mode Process"(1) 
                              under "Kernel"(0).
07JAN1999:07:16:21.206 043069 Server library TESTDATA 
                              ('/local/u/john/server' V8) accessed as 
                              TESTDATA by user john(1).
07JAN1999:07:16:31.593 043021 User maria(2) has connected to server SHARE2.
07JAN1999:07:16:31.846 043143 User maria(2) has created "Line Mode Process"(1) 
                              under "Kernel"(0).
07JAN1999:07:16:31.923 043069 Server library DEMOTEST 
                              ('/local/u/john/server' V8) accessed as 
                              DEMOTEST by user maria(2).
07JAN1999:07:17:32.462 043143 User maria(2) has created "PRINT"(2) under 
                              "Line Mode Process"(1).
07JAN1999:07:17:33.537 043100 DEMOTEST.X.DATA(1) opened for input/S via 
                              engine V8 by "PRINT"(2) of user maria(2).
07JAN1999:07:17:40.361 043102 DEMOTEST.X.DATA(1) closed by "PRINT"(2) 
                              of user maria(2).
07JAN1999:07:17:40.422 043144 User maria(2) has terminated "PRINT"(2) 
                              (under "Line Mode Process"(1)).
07JAN1999:07:18:05.575 043143 User maria(2) has created "DATASTEP"(3) 
                              under "Line Mode Process"(1).
07JAN1999:07:18:05.668 043100 DEMOTEST.DEMO.DATA(1) opened for output via 
                              engine V8 by "DATASTEP"(3) of user maria(2).
07JAN1999:07:18:06.016 043102 DEMOTEST.DEMO.DATA(1) closed by "DATASTEP"(3) 
                              of user maria(2).
07JAN1999:07:18:06.096 043144 User maria(2) has terminated "DATASTEP"(3) 
                              (under "Line Mode Process"(1)).
07JAN1999:07:18:48.262 043143 User john(1) has created "PRINT"(2) 
                              under "Line Mode Process"(1).
07JAN1999:07:18:48.313 043100 TESTDATA.DEMO.DATA(1) opened for input/S via
                              engine V8 by "PRINT"(2) of user john(1).
07JAN1999:07:18:49.734 043102 TESTDATA.DEMO.DATA(1) closed by "PRINT"(2) 
                              of user john(1).
07JAN1999:07:18:49.765 043144 User john(1) has terminated "PRINT"(2) 
                              (under "Line Mode Process"(1)).
07JAN1999:07:18:58.322 04306A Server library DEMOTEST (accessed as DEMOTEST) 
                              released by user maria(2).
07JAN1999:07:18:58.338 043144 User maria(2) has terminated "Line Mode 
                              Process"(1) (under "Kernel"(0)).
07JAN1999:07:18:58.909 043022 User maria(2) has disconnected from server SHARE2.
07JAN1999:07:18:59.886 043151 Usage statistics for user maria(2):
                                  Messages processed:                  24
                                  Bytes transferred:                8,028 
                                  Active time:               0:00:02.7525
                                  Elapsed time:              0:02:28.3527
07JAN1999:07:19:06.298 04306A Server library TESTDATA (accessed as TESTDATA) 
                              released by user john(1).
07JAN1999:07:19:06.319 043144 User john(1) has terminated "Line Mode 
                              Process"(1) (under "Kernel"(0)).
07JAN1999:07:19:06.411 043022 User john(1) has disconnected from server SHARE2.
07JAN1999:07:19:06.425 043151 Usage statistics for user john(1):
                                  Messages processed:                  14
                                  Bytes transferred:                3,133 
                                  Active time:               0:00:01.8139
                                  Elapsed time:              0:02:46.6840
07JAN1999:07:19:16.018 043021 User john(3) has connected to server SHARE2.
07JAN1999:07:19:16.569 0430A9 PROC OPERATE command from user john(3): STOP SERVER;
07JAN1999:07:19:16.603 043132 Normal termination of SAS server SHARE2 has occurred.
07JAN1999:07:19:17.212 043022 User john(3) has disconnected from server SHARE2.
07JAN1999:07:19:17.246 043151 Usage statistics for user john(3):
                                  Messages processed:                   2
                                  Bytes transferred:                  102 
                                  Active time:               0:00:01.0691
                                  Elapsed time:              0:00:01.9230
07JAN1999:07:19:17.642 043150 Usage statistics for server SHARE2:
                                  Messages processed:                  40
                                  Bytes transferred:               11,263 
                                  Active time:               0:00:05.6355
                                  Elapsed time:              0:03:42.8948
NOTE: PROCEDURE SERVER used:
      real time           3:45.51
      cpu time            0.74 seconds

In the server log, a message is posted for each significant client/server transaction. A log message is presented in the form:

dtformat msgnumber message

The dtformat and msgnumber fields are controlled by options that you provide in the PROC SERVER statement. See The SERVER Procedure for explanations of these options.

In the server log, users JOHN(1), MARIA(2), and JOHN(3) started and terminated three separate server sessions. Upon termination, usage statistics were generated for each of the three sessions. In addition, cumulative usage statistics were reported for the server SHARE2. The usage statistics are controlled by values that you provide for the LOG option in the PROC SERVER statement. See The SERVER Procedure for explanations of usage statistics for messages processed (MESSAGE), bytes transferred (BYTECOUNT), active time (ACTIVETIME), and elapsed time (ELAPSEDTIME).

To make the raw data in the server log meaningful, you can use a set of server log analysis programs to examine specific data resources and to create usable reports. See Analyzing the Server Log for details about analyzing the server log.


Chapter Contents

Previous

Next

Top of Page

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