Product Documentation

FairCom RTG COBOL Edition User's Guide

Previous Topic

Next Topic

Listing connections with a particular file open

Sometimes it is useful to find information about the connection that is holding the lock on a particular file.

Visual Tools

From ACE Monitor it is easy to obtain the connection number(s) associated with a file. From the "Files/Locks" tab find your table of interest and obtain the connection number from the first column.

Server Monitor - File Users

Then from the "Active Connections" tab, locate the user and obtain additional information such as IP address, etc. about them.

SrvMonitor-ActiveConnection.gif

Command Line Tools

The ctadmn Administrator's utility can provide this information.

From ctadmn, select option 3 and enter the name of the file in question (litliv.dat in the example below):

1. List all files open by the c-tree Server

2. List all files open by a particular connection

3. List connections that have a particular file open

4. List locks held on a particular file

5. Close a file that is open in KEEPOPEN mode

Enter your choice (1-5), or 'q' to return to previous menu>> 3

Enter complete file name >> litliv.dat

================================================================

List of Users with File litliv.dat Open

================================================================

User

Connection File

Number Number User Name

23 0 ADMIN

================================================================

Press RETURN to continue...

Once you have retrieved the "Connection Number" you can use it to find info about the connection:

Monitor Clients:

1. List Attached Clients

2. Kill Client

Enter your choice (1-2), or 'q' to return to previous menu>> 1

UserID: ADMIN NodeName:

Task 23 Communications: FSHAREMM

Memory: 3392K Open Files: 2 Logon Time: 0:03

Tran Time: 0:01 Rqst Time: 0:00 InProcess Rqst# 245 RTG_REWDEL

Press RETURN to continue...

You may notice that "NodeName:" is empty because we did not set the <instance name> FairCom RTG configuration option.

If we set <instance server="FAIRCOMS" name="pid:%p"/> as described elsewhere in the documentation, the output is:

Monitor Clients:

1. List Attached Clients

2. Kill Client

Enter your choice (1-2), or 'q' to return to previous menu>> 1

UserID: GUEST NodeName: pid:29216

Task 23 Communications: FSHAREMM

Memory: 4353K Open Files: 2 Logon Time: 0:03

Tran Time: 0:01 Rqst Time: 0:00 InProcess Rqst# 245 RTG_REWDEL

Press RETURN to continue...

Notice that "%p" is substituted with the PID of the process. Also notice that other substitutions are available. See Substitution Specifiers.

Similar information is also available in the FairCom monitoring tool.

TOCIndex