The tools include in this zip file were used to identify the source of significant lock activity; which in turn was the source of a significant amount of MP_SYNCH time in a large VAX cluster. They don't have a much polish, so you may need to spend a bit of time to get them to do what you want.
RMS_LOCKS.C
This program will show what records are locked in an RMS file. It needs to be run on the node that is mastering the file lock; running it on all the nodes in the cluster should work. To run it, define a symbol pointing to the executable. Specify the filename in parameter 1. If you run it with option 'n' in parameter 2, the null locks on the file are shown; the default is to no show null locks. If run with option 'c' in parameter 2, then the program goes into a loop showing locks as they are enqued and dequed on the file; this option is very CPU intensive.
Sample run:
$ rms_locks="$dsa6:[fruth.rsb]rms_locks"
$ set proc/priv=(cmk,world, readall)
$ rms_locks member_master
(53743,2,512) rsbaddr=82d2ec40 csid=0 (ECHO)
Node LCnt RSB Addr pid image Lock description
ECHO 1 82CDFF80 22A0C5DD ICMENU.EXE EX Record lock. RFA=0xb5e4b; VBN=
214922244.LYONS THOMAS P...c...<..........
CHARLY 1 82F83680 22808E57 ICMENU.EXE EX Record lock. RFA=0x2ffffcd59;
530701344.CARTER JANET L...]...9..........
ECHO 1 823B5580 22A0CEC9 CLKDPHON.EXE;10 EX Record lock. RFA=0xd52f7; VBN=
552739244.KALAYDJIAN AMALIA ...a...0.......... .552739217
In the sample run above, the locks on the file with the logical name member_master are shown. The lock is mastered on ECHO, this is shown on the top line via "csid=0 (ECHO)". The file id of the file is (53743,2,512). There are three records locked, two on ECHO and one on CHARLY. The records are displayed and started with the characters "214922244", "530701344", and "552739244".
RSB_CHAIN.C
This program identifies which locks have the highest current activity. It uses the same data areas in the lock manager database that are used to determine if a lock tree should be mastered on a different node due to higher activity. Refer to lock_activity.txt for more detailed information on the activity data.
In the sample run below, the three most active LOCAL locks, and the three most active distributed locks are shown. Parameter 1 determines the total number of locks to be shown.
$ x:==$dsa6:[fruth.rsb]rsb_chain
$ x 6
Resource name CSID Oac Nac Act RSBaddr
RMS$w/.....HSJ_SET3_NEW... ECHO 13036 10145 1 82F93340
DISK$HSJ_SET3_NEW:[NV44UR.DAT]NEWNOTE.IDX;13
RMS$*......HSJ_SET4 ... ECHO 36 0 1 8328AB80
DISK$HSJ_SET4:[TAPESYS_5R2.USRBAK]OPERATION.FILES_4R4;2
RMS$*......HSJ_SET4 ... ECHO 7 0 1 8328AB80
DISK$HSJ_SET4:[TAPESYS_5R2.USRBAK]OPERATION.FILES_4R4;2
--distributed locks--
F11B$vAXPVMS ALPHA 15 6 1 8198E380
files-11 volume lock : AXPVMS
F11B$vHSJ_SET5 CHARLY 7 0 1 81A09BC0
files-11 volume lock : HSJ_SET5
F11B$vHSJ_SET3_NEW CHARLY 5 14 1 8194B540
files-11 volume lock : HSJ_SET3_NEW
Total locking: TOTAL_OLD_ACT= 13158 TOTAL_NEW_ACT= 10236
Total local locking: TOTAL_OLD_ACT= 13121 TOTAL_NEW_ACT= 10194
Distributed locking: TOTAL_OLD_ACT= 37 TOTAL_NEW_ACT= 42
Completion status: OK
PARSE_TO_RDB_RSB_CHAIN.SCO
This program reads the output of RSB_CHAIN as part of a batch log file and the output into a HOT_LOCKS database. It assumes that somewhere in the log file is a record that is the timestamp, probably from a SHOW TIME command. The output of RSB_CHAIN is only a snapshot of a short period of time on the system. It is necessary to run RSB_CHAIN many times and analyze the result. Having the data in a database is the first step to analysis. See HOT-LOCKS.RPT for a sample of the analysis.
HOT_LOCKS_DB.SQL
This script creates the hot_locks database. It has been five years since I ran it, so it may be a bit out of date.
Bang_Lock.C
This program enques and deques a lock repeatedly. Five years have past between the time I wrote this program and the time I wrote this document. Frankly, I don't recall exactly how this program was used. However I do recall that it was used to test the effects of lock migration.
Linking
To link any of these programs, you may need to link with the /SYSEXE qualifier, and perhaps SYS$LOADABLE_IMAGES:SYSDEF.STB.