Server management programs

The programs kfsmonw (Windows) and kfsmonc (UNIX) are used to monitor and manage server connections. The programs are written in Sculptor and are located in the directory $SCULPTOR\server. The programs have the same functionality, with the UNIX version being adapted for use with character windows.

kfsmonw monitors and manages the Windows kfserver and the Windows service program kfservnt. The program is started by running servmgr.exe. Prior to Sculptor 5.8, this program was the front end for kfservnt. It is now a small program that requests Administrator privileges (necessary under Vista) and then calls kfsmonw.

batch file kfsmon.bat starts the program.

kfsmonc monitors and manages the UNIX kfserver. The shell script kfsmon starts the program.

The remote server manager, remmon, is no longer supported since Sculptor version 6.0.0.


Display

The controls at the top of the window are:

Server Host

The name of the host computer.

Server Version

The version number of kfserver.exe or, if running a Windows service, kfservnt.exe.

Server Started

The time and date when kfserver or kfservnt was last started.

Last Refreshed

The time and date when the connections table was last refreshed.

Clients

The number of licensed clients currently connected. Note that connections from clients running on the server do not use a license, and multiple connections from the same client count as one license.

Mobiles

The number of licensed mobiles currently connected.

Max Clients

The maximum number of clients, excluding mobiles, permitted by the Sculptor licence.

Max Mobiles

The maximum number of mobile connections permitted by the Sculptor licence.

Connections

The number of current connections.

Server Control

Opens the Sculptor Server Control window.

Refresh

Press this button to force an immediate refresh.

Connections are displayed in a table, each row corresponding to a single connection via a TCP/IP port. The table is refreshed automatically at a user-defined interval.

The data displayed in each line is as follows:

Port

The port number allocated to this client’s socket connection.

Client

The name of the client computer.

Mobile

Displays M to indicate a mobile connection, otherwise blank.

Last Command

The last operation serviced by kfserver or kfservnt, e.g. KeyFile Open, SeqFile Open#.

Trans #

The transaction id number if the client program has called begin() and has not yet called commit() or rollback(). The presence of a Trans # indicates that the client program is in a transaction. The id number itself is not very meaningful; it is part of the name of a temporary file in which Sculptor stores information about this transaction.

# Locks

The total number of file and record locks currently held by this client program.

Idle Secs

The time in seconds since the last operation. i.e. the number of seconds the port has been idle.

Program

The name of the Sculptor program that has made this client connection (if the client is running Sculptor 5.8.1 or later).

The following colour scheme is used to display connections:

Active

black

Inactive

brown. The number of seconds that elapse before a client is deemed inactive is set on the Server Control screen.

Incomplete

blue. The client had an incomplete command at the time the table was last refreshed.


Client Details

To open a details window for any client connection:

Windows

Double click on the table row.

UNIX

This version of the program uses a listbox to display connections. TAB till the listbox has focus, then use the arrow keys to select the correct row and press RETURN.

The client details window provides the following extra information about the connection:

Client ID

A unique number allocated to this client connection by the Sculptor server.

Command @

The time and date when the last command was executed.

A Disconnect this Client button is provided on the details window. This terminates the currently selected client connection, freeing the resources that the client is using on the server. This option can be used if the client has been physically disconnected and cannot be reconnected, has encountered an irrecoverable error and has not disconnected automatically, or needs to be forcibly disconnected for some other good reason. Note that disconnecting a client in this way may leave the application database in an inconsistent state.

Arrow keys can be used to display the next or previous client from the list.

Note that automatic refreshing is suspended whenever the connections table or listbox has focus, regardless of whether the Client Details window is open.


Server Control

This window is opened when the Server Control button is pressed. See also Setting up kfservnt.

Startup options

Auto Start

The kfservnt Windows service starts automatically when the system is booted. This is normally the best option.

Demand Start

The kfservnt Windows service must be started manually, using this program or the Windows Service Manager.

Disabled

The service is currently disabled and cannot be started.

Binary Pathname

The full path to kfservnt.exe. This is commonly C:\\sculptor\\bin\\kfservnt.exe.

Service Start Options

Options for when the Windows service starts. See Interactive Server Options below.

Account

Two pre-defined accounts are provided; alternatively, a dedicated account can be created for the Sculptor server.

LocalSystem

This pre-defined account can be used if all client connections will be from the same, local computer (i.e. client connection from other computers on the network is not required). The LocalSystem account has unrestricted access to the local computer and no password. No other actions should be necessary to use LocalSystem.

NT Authority\Network Service

To allow connections from other clients on the network, choose the pre-defined “NT Authority\Network Service” account which also has no password. When using this account it is necessary, on some platforms, to modify the security settings for kfservnt.exe and for all the directories to which it needs access. If the service will not start, open the property pages for SCULPTOR\bin\kfservnt.exe and, on the Security tab, add the user name “Authenticated Users”. Tick all permissions except Full Control. Repeat this process for the SCULPTOR directory and for all directories that will be accessed by the Sculptor server.

Dedicated account

Alternatively, create a dedicated account for the Sculptor server. The account name “kfservnt” is suggested, but any name can be used. Give the account a password that does not expire and the security settings that it needs. See Setting up kfservnt for details of how to set up an account.

After the account has been created, enter its name as “\UserName” if using the built-in domain, otherwise as “Domain\UserName”.

Password

Password for the Sculptor server dedicated account.

Create Service

Create the Sculptor service. This gives the account the right to log on as a service if not already set. The button then changes to Delete Service.

Delete Service

Removes the kfservnt service from the Windows Service Manager.

Dynamic Options

These settings can be changed at any time. It is not necessary to restart kfserver | kfservnt.

Enable the remote monitor

If this box is ticked (the equivalent on UNIX is a + sign) a snapshot of all client connections is written to a Sculptor file each time the client list is refreshed. This file can be viewed over a network by running the remote management program remmon on a Windows client:

%SCULPTOR%\server\remmon.q

If the Sculptor server allows connections from the Internet, this makes it possible to manage kfserver connections on a remote client site. The remote management option can be turned on and off at any time. It is not necessary to restart kfserver.

NOTE: The remote server manager, remmon, is no longer supported since Sculptor version 6.0.0.

Interactive Server Options

These settings cannot be changed once kfserver | kfservnt is running. The server program must be stopped, and then restarted with the new setting(s).

The same values can be set to be applied when the Windows service starts.

The options in this section correspond to the command line options displayed in brackets after the option description,

RELATED TOPICS

Log file (UNIX)

Log file (Windows)

The remmon program


Create a new log file (-n)

Tick this box to create a new, empty log file, If it is unticked, messages are appended to the existing log file.

Show lock details in the remote monitor (-l)

If this box is ticked, details of all locks held by all connected clients are written into a Sculptor file. A table of locks can be viewed in the remote management program remmon. The remote monitor must be enabled (see Enable the remote monitor above). Although this program is designed to run on a remote client, it can also be run on the server itself.

Lock debugging mode has a performance overhead, so it should only be used to diagnose locking issues.

When kfserver is started from the command line, lock debugging mode can be selected by using the command line option -l. The service version kfservnt also honours command line options.

Log all connections and disconnections (-d)

If this box is ticked, all client connections and disconnections are logged in the log file. If it is not, the only events logged are server start, stop and errors (such as failed socket connections.)

Don’t use the Sculptor security database (-s)

If this box is unticked, kfserver checks all requests against the permissions granted in the security database.

If this box is ticked, kfserver does not check the security database at all.

Refresh Interval

The number of elapsed seconds before an automatic refresh of connection information. Note that automatic refreshing is suspended whenever the connections table (or listbox, under UNIX) has focus. Defaults to 4.

Idle Client Highlight Time

The number of elapsed seconds without activity before a client is deemed inactive. Defaults to 180.

Use Windows Service

Use Interactive Server

Determines whether the program is currently controlling kfservnt or kfserver. The labels in the buttons beneath change accordingly. It is not possible to change this setting if either kfserver or kfservnt is currently running, Note also that kfserver and kfservnt cannot be run at the same time.

Start Server/ Stop Server

Stop or start kfserver.exe. If any ports are connected, a warning is given, because the connected Sculptor client programs will generate an error if their connection is closed.

Start Service

Requests the Windows Service Manager to start the kfservnt service, which is named “Sculptor Server (kfservnt)”. If the domain name or password supplied when the service was created were incorrect, an error message is displayed. If this happens, it can be useful to examine the event log in:

Programs>Administrative Tools (Common)>Event Viewer

Once the service has been started, it will continue running irrespective of the logon status of the server. If kfsmonw is started when kfservnt is running, it will immediately detect the presence of the service and invoke the display of active ports.

When kfsmonw is closed, the kfservnt service continues in its current state.

Stop Service

Stops the kfservnt service. Any applications that are connected to kfservnt service ports will fail.


The remmon program

NOTE: The remote server manager, remmon, is no longer supported since Sculptor version 6.0.0.

The remmon (remote management) program is used to manage kfserver connections on a remote client site. The program is written in Sculptor and is located in the directory $SCULPTOR\server.

remmon can only be used if Allow Remote Manager is ticked on the Sculptor Server Control screen. Selecting this option causes a snapshot of all client connections to be written to a Sculptor file each time the client list is refreshed. This file can be viewed over a network by running remmon on a Windows client. If the Sculptor server allows connections from the Internet, this makes it possible to manage kfserver connections on a remote client site.

The controls at the top of the window are:

Server Name

The name of the server the program is to connect to.

Sculptor Path on Server

The name of the root Sculptor directory on the server. This is frequently C:\sculptor.

User Name

The user name. This and the password are supplied as values to the login_server() function.

Password

The user password.

Refresh Interval

The number of elapsed seconds before an automatic refresh of connection information.

Stop Auto Refresh

Prevents automatic refreshing. Only enabled if the program has connected the client to the server.

Connect/Disconnect

This button logs into the server specified in Server Name, using the user name and password provided, and displays connection and file/record lock information. Once connected, the button label changes to Disconnect, and is used to disconnect from the server.

The tabbed windows beneath contain information on individual client connections. The Client Connections table displays the same information as the main kfsmon table, with the addition of the Client ID. The File and Record Locks tab lists details of all file read locks, file write locks and record locks.


RELATED TOPICS

Servers

Sculptor server programs

The Windows server program kfserver

The Windows server service program kfservnt

Setting up kfservnt