servstat program




VSupported on OpenVMS

The servstat program enables the system manager to start, stop, and modify parameters of Synergy/DE xfServer and xfServerPlus on OpenVMS. The program may be run either on the OpenVMS host machine or on a remote machine. You can either run it interactively, letting it prompt you for options and values, or you can specify command line arguments (if it is set up as a foreign symbol).

Servstat checks whether the server is running. If not, it asks whether to start the server. If the answer is no, the program exits.

The servstat program also checks for the existence of the connection manager by scanning all running processes for process names of the form RSDMS$MGR_nnnn, where nnnn is the IP port on which the server is listening. This allows more than one server to be running on the host. If more than one connection manager is found, you are prompted for which one to use.

The servstat menu offers the following options:

[1] Display status
[2] Change free pool size
[3] Purge free pool
[4] Shutdown server
[5] Show server global logicals
[6] Show session server logicals
[7] Change cull interval
[8] Change pool extend time
[9] Display xfServerPlus status
[10] Purge xfServerPlus free pool
[11] Cycle xfServerPlus log file

Typing the EOF key sequence or entering any invalid response exits the program.

Servstat allows the system manager to monitor the performance of the server in processing incoming connections. If the peak number of pending servers (processes started but not yet registered with the connection manager) is ever greater than the minimum free pool size, you may want to expand the free pool at the startup command line in the command file SYS$COMMON:[SYSMGR]SYNERGY_STARTUP.COM to speed up connections at peak usage times. The server attempts to optimize the free pool size itself if there is a sudden onslaught of connections. If the number of pending servers ever exceeds the current free pool size, the free pool is enlarged by one process.

When the connection manager increases the free pool in this way, the free pool may stay elevated above the minimum free pool size specified in SYNERGY_STARTUP.COM for the “free pool extend time.” If no connections are processed in this time, the free pool is cut back by one server. This happens until the free pool recedes back to the minimum free pool size. The frequency of free pool size checks is determined by the “Cull interval” period. This defaults to one-fifth of the free pool extend time (unless the free pool extend time is less than 15 minutes, in which case it is one-half of that time).

The free pool extend time is changed using option 8. The cull interval is changed at the same time according to the above rule. You can also change the cull interval using option 7.

Running servstat with command line arguments

The servstat program can accept command line arguments if it’s set up as a foreign symbol:

$ servstat :== $SYNERGYDE$ROOT:[SERVER]servstat

To run servstat using command line arguments, enter the same values that you would enter if you were running servstat interactively. For example, if you want to change the pool extend time, enter

servstat 8 "time"

where time is the length of time the free pool is allowed to be elevated above the minimum free pool size.

The following example, which includes output, runs servstat with option 5, to show server global logicals:

$ servstat 5
Synergy server version 9.5.3
     PID      Process name      Image
Option> 5

You can enter up to two arguments at the command line. If multiple servers are running, you will need to specify which of the servers are to be modified or inspected. In the following example, six servers are running, and we select the first to do option 5:

$ servstat 1 5
Synergy server version 9.5.3
     PID       Process name     Image
Which server (1-6) [1] 1
Option> 5


If multiple servers are running and the selected option requires a value, only the server number and option can be specified on the command line, and the value must be specified at the prompt. For example, you will get an error if you enter the following:

$ servstat 1 2 3
Too many command line arguments
Usage: servstat cmd
Usage: servstat cmd1 cmd2

The correct way to run servstat with these arguments is as follows:

$ servstat 1 2  
Synergy server version 9.5.3
     PID      Process name      Image
Which server (1-2) [1] 1
Option> 2
New pool size: 3

servstat options

[1] Display status

Option 1 displays the current status of the OpenVMS server system and the session server processes as follows:

         Synergy Server Manager Status at 6-MAR-2017 12:45:06.93
  Encryption mode:            No
  Number of active servers:   32
  Peak # of active servers:   4
  Servers in use:             1
  Free pool:                  2 - Free pool extend time:    0 00:30:00.00
  Minimum free pool:          2   MIN_POOL:     0
  Free servers:               2
  Number pending servers:     0
  Peak # pending servers:     2
  Cull interval:              0 00:06:00.00
  Next cull:                  6-MAR-2017 12:50:28.43
  Pid       Status        Time at that status   User          I.P address
21236CC0    Ready        48 21:56:54.19         CSTEST
212234C1    Serving       3 03:50:53.60         CSTEST
2124A45A    Ready         3 03:50:53.42                       

[2] Change free pool size

Option 2 manually changes the size of the free pool. When prompted, enter the new pool size as an integer. If the new number is greater than the current number, the connection manager creates new server processes. If the new number is less than the current number, the free pool is trimmed after the free pool extend time has expired. To change the pool size from the command line, enter

servstat 2 pool_size

Assuming only one server is running, the following example changes the free pool size to 3:

servstat 2 3

[3] Purge free pool

Option 3 purges the free pool back down to the minimum free pool size.

[4] Shutdown server

Option 4 closes down the server. By default, serving processes close when their clients disconnect.

[5] Show server global logicals

Option 5 displays all logicals from the logical name table LNM$RSDMS$MGR_nnnn, where nnnn is the port on which the connection manger is listening. This table is shared by all server processes controlled by the connection manager and is used to resolve logical names after the process and job name tables have been scanned. Logicals may be added to this table by setting them in the command file DBLDIR:SERVER_INIT.COM. The server startup command file runs this command file when the server process has been created. This is a more efficient way to set server-specific logicals than putting definitions in SYNRC.COM. We advise using the server with the /NOUSE_SYNRC qualifier in SYNERGY_STARTUP.COM.

[6] Show session server logicals

If the server is using SYNRC.COM, each session server processes SYNRC.COM in the default directory of the connection user. The logicals defined in this directory are placed in the process-private logical name table LNM$SYNSVR_xxxxxxxx, where xxxxxxxx is the PID of the session server. This table is used to resolve logicals before the server-wide name table LNM$RSDMS$MGR_nnnn.

[7] Change cull interval

Option 7 changes how often the free pool size is checked and trimmed. The time must be entered in the form D HH:MM:SS. For instance, 0 00:29:59 equals 29 minutes and 59 seconds. The time must be enclosed in quotation marks if you are running from the command line. For example, you would enter the following to change the cull interval to 30 minutes from the command line:

servstat 7 "0 00:30:00"

[8] Change pool extend time

Option 8 changes how long the free pool is allowed to be elevated above the minimum free pool size while no connections have been processed. The time must be entered in the form D HH:MM:SS and must be in quotation marks if you are running from the command line.

[9] Display xfServerPlus status

Option 9 displays status information about xfServerPlus. It shows the PID for each xfServerPlus process and specifies whether it is free or in use and by which IP. The output looks like this:

         Synergy xfServerPlus Manager Status at 6-MAR-2017 12:38:42.11
  xfServerPlus is enabled on port 3205 as CSTEST
  Encryption mode:           Master, Cipher=High 
  Certificate file:          DBLDIR:rsynd.pem
  xfServerPlus free pool:    2
  Number of active servers:  0
  Number of pending servers: 0
  Servers in use:            0 - Inactive for             49 00:00:44.48
  Free pool:                 2 - Free pool extend time:    0 00:30:00.00
  Minimum free pool:         0   MIN_POOL:     0
  Free servers:              2
  Number pending servers:    0
  Peak # pending servers:    2
  Cull interval:             0 00:06:00.00
  Next cull:                 6-MAR-2017 12:44:27.13
  Pid       Status        Time at that status   Port  I.P. address
212234C3    Ready        49 00:00:40.97               
212234C4    Ready        49 00:00:40.95   

If option 9 shows that xfServerPlus is not enabled, refer to the rsynd log file for information about what went wrong. By default the rsynd log file is named node_rsynd_port.log and is located in DBLDIR.

[10] Purge xfServerPlus free pool

Option 10 causes all processes in the xfServerPlus free pool to be destroyed and the pool to be repopulated with new processes.

[11] Cycle xfServerPlus log file

Option 11 closes and then opens a new version of the xfServerPlus log file (DBLDIR:xfpl.log, by default). This enables you to examine the log file without shutting down rsynd.