Salesforce

Extracting the OpenEdge database process id from the .lk lock file

« Go Back

Information

 
TitleExtracting the OpenEdge database process id from the .lk lock file
URL Name000032518
Article Number000152535
EnvironmentProduct: Progress
Version: 8.x, 9.x
Product: OpenEdge
Version: All supported versions
OS: All supported platforms
Question/Problem Description
How to extract the PID from the .lk file.
How to view the Process Id for the owning process running the OpenEdge database.
How to find the PID recorded in the database .lk file
Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement Number
Cause
Resolution
The OpenEdge lock file, <dbname>.lk, amongst other information contains the process id of the process running the OpenEdge database.

To find the process id, take a copy of the database .lk file and open it with a binary/hex file editor.
  • Ignore the first 4 bytes of the file.
  • The process id is stored inside the next four bytes: at HEX offset 04-07

Example: A Unix .lk file
 
$   od -x dbname.lk
 

0000000  0000 0002 01e1 019c 5149 5141 3835 0000
0000020  0000 0000 0000 0000 0000 0000 0000 0000
...

The PID of the owning process = 31523228

Example: A Windows .lk file

On a windows machine, to convert these hex bytes to decimal first swap the bytes and then convert the resulting hex number to decimal.
 
00000000h: 02 00 00 00 90 22 00 00 46 2D 35 38 41 51 49 51
00000010h: 46 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
...
 
The PID is:  90 22 00 00 (hex) 
Swap the bytes: 00 00 22 90
The PID of the owning process = 8848 = (0 * 16^0) + (9 * 16^1) + (2 * 16^2) + (2 * 16^3) 





 
Workaround
Notes
Progress Article:

 The database .lk file.  
Keyword Phrase
Last Modified Date12/2/2020 4:36 PM

Powered by