Identifying which process has locked records on windows isam files
Has anyone come up with a means to find out which process has a record locked. I know the key but thats as far as I get.
Thanks in advance
11 Answers
Roger Andrews
If you were using xfServer, synxfmon can provide this information.
6/15/2016 12:29 AM
0
Richard Morris
You can utilise Synergy IO Hooks to record activity to a file ? such as who has just locked a record, and then report on the activity. There is a working example (shown at DevPartner 2016) in GitHub: https://github.com/RichardMorris750/DevPartner2016.
6/17/2016 7:16 AM
0
Glynis Lyttle
Thanks guys.I went with the I/O hooks option and I wrote a viewer to report on locked records. Still in testing. Big question. What kind of overhead does using I/O hooks for this have.?
6/17/2016 11:55 AM
0
Richard Morris
The only real overhead is when you are actually locking a record (if you have coded the IO hook class like the one presented at DevPartner). In this instant there is an extra IO to the control file. I've had no reported performance issues where I've installed this on live customer sites, and it's saved people hours waiting for locks to be released!!
6/17/2016 1:52 PM
0
Glynis Lyttle
OK good. I used the example from KnockKnockWkosLocked from a couple of years back rather than the 2016 version (as I didn't know about it when I started).
6/20/2016 9:48 AM
0
Ryan Olsen
Richard,
I know this post is over 8 years old, but it sounds like the I/O hooks might work really well for a couple issues I'm battling.
How could I get the details of that since the github link isn't working.
I'm running Linux redhat 8 on traditional synergy.
Thanks for any direction.
I know this post is over 8 years old, but it sounds like the I/O hooks might work really well for a couple issues I'm battling.
How could I get the details of that since the github link isn't working.
I'm running Linux redhat 8 on traditional synergy.
Thanks for any direction.
9/30/2024 9:28 PM
0
Glynis Lyttle
Hi Ryan
Did you get other replies?
Let me dig out what I have on this if you still need it.
Glynis
Did you get other replies?
Let me dig out what I have on this if you still need it.
Glynis
10/4/2024 9:24 AM
0
Ryan Olsen
Glynis,
I did not get any other replies yet.
I would love any solutions or direction.
Thanks!
-Ryan
I did not get any other replies yet.
I would love any solutions or direction.
Thanks!
-Ryan
10/4/2024 1:17 PM
0
Kish Baley

I'm not sure what the 2016 solution was, but if it does not use global IO hooks, I strongly suggest using it vs. modifying your IO routines. See Synergy docs https://www.synergex.com/docs/#lrm/lrmChap26Understandingthesynergyiohooksapi.htm? for more information.
10/4/2024 1:59 PM
0
Rachel Gibson

Hi Ryan, the solution from 2016 relies on deprecated technologies that won't work for you today. I am going to reach out to you offline to follow up on alternatives. Appreciate your patience.
10/7/2024 3:30 PM
0
Gordon Ireland

I think many people would welcome sample or template code using Global IO hooks to provide record lock monitoring. Maybe that could come out of the offline conversation with Ryan as suggested by Rachel.
Everyone has the same basic requirement - to be able to see the user name, file name and key for locked records within the system.
The solution should cater for program crashes not leaving records marked as locked - maybe a fatal error handler could clear the logging information for the process which is crashing? Or the log could record the process ID and then the reporting program could check if the process was still running?
My experience of Global IO hooks has been for SQL replication, but surely everyone has suffered from the nightmare of record lock problems on a production system. I'm sure a template could be provided which allowed record lock recording and SQL replication to be configured file by file.
It would also be useful to hold a stack trace against each recorded lock as this would be a useful tool in debugging
eg User FRED is locking key ABC123 on CUSMAS.ISM at line 146 in routine calculate_discount at line 2056 in routine Order_Entry
Everyone has the same basic requirement - to be able to see the user name, file name and key for locked records within the system.
The solution should cater for program crashes not leaving records marked as locked - maybe a fatal error handler could clear the logging information for the process which is crashing? Or the log could record the process ID and then the reporting program could check if the process was still running?
My experience of Global IO hooks has been for SQL replication, but surely everyone has suffered from the nightmare of record lock problems on a production system. I'm sure a template could be provided which allowed record lock recording and SQL replication to be configured file by file.
It would also be useful to hold a stack trace against each recorded lock as this would be a useful tool in debugging
eg User FRED is locking key ABC123 on CUSMAS.ISM at line 146 in routine calculate_discount at line 2056 in routine Order_Entry
10/10/2024 11:34 PM
1
Please log in to comment or answer this question.