When I run an onstat -p on Informix 9.21 UC5 on Solaris, I get over 800000000 lockreqs, but when I run the following query against the sysmaster database, I get less than 300000000. Where is onstat -p getting it's information on lockreqs?
Actually, I would like to know how many lock requests there are at any moment in time by the active sessions. If I sum up the lockreqs in syssesprof, that will give me the number of requests made by the current session during their entire session---how would I get a snapshot of the total lock requests being made at a particular moment in time?
The locks requests over the session profile is a acumulative information.
You have 2 ways (not a beautiful way, but, maybe work).
1) execute the "onstat -z" and refresh all statistics information (ALL statistics) and them you get how much locks requests are made over the session. (I strongly not recommend this option because if you need to monitor any other information will be an partial information).
2) execute the select over the syssesprof each time you want and calculate the difference between each one, them you will get how much locks are requested over this space of time.