RMA: 301 - Error: Unable to lock a region of a file
RMA: 301 - Error: Unable to lock a region of a file
We are receiving this error from various remote servers running Windows 2000 SP4. We are using RMA version 3.14 on the remote servers.
On the HM server we are running Windows 2000 SBS with HM 5.38.
On the HM server we are running Windows 2000 SBS with HM 5.38.
What test method displays this error? I assume Performance Counter? Its some bug in pdh.dll...
What mode do you use for this test method?
Quote from the manual:
Remote Monitoring Agent (RMA) can use perfobj.exe utility as well (utility should be located in the same directory where RMA is installed).
If you want to change test method used by the agent, add line "PerfWorkMode=N" into [Misc] section of the rma.ini file and restart agent. N is a code of the mode:
0 - MultiThread mode;
1 - OneByOne mode;
2 - Smart mode;
3 - External mode
Regards
Alex
What mode do you use for this test method?
Quote from the manual:
I would recommend to try External mode....that's why in HostMonitor we have implemented several different methods to work with pdh.dll:
MultiThread - allows to start several tests in separate threads (fastest method)
OneByOne - HostMonitor starts Performance Counter tests one by one
Smart - multithreading model, HostMonitor tries to reload pdh.dll when error occurs
External - HostMonitor uses external (perfobj.exe) utility to perform the tests. This is fast and most reliable method.
You can specify which test mode will be used on Miscellaneous page in the Options dialog.
Remote Monitoring Agent (RMA) can use perfobj.exe utility as well (utility should be located in the same directory where RMA is installed).
If you want to change test method used by the agent, add line "PerfWorkMode=N" into [Misc] section of the rma.ini file and restart agent. N is a code of the mode:
0 - MultiThread mode;
1 - OneByOne mode;
2 - Smart mode;
3 - External mode
Regards
Alex
Alex,
The error is back on one of the servers. Is it possible that this error occurs whenever the amount of memory in use exceeds the amount of memory physicly installed. E.g. we have 768MB installed. The ammount of memory in use is 980MB. Thus the server is using 980MB - 768MB = 212MB of his swapfile.
Regards,
Arend
The error is back on one of the servers. Is it possible that this error occurs whenever the amount of memory in use exceeds the amount of memory physicly installed. E.g. we have 768MB installed. The ammount of memory in use is 980MB. Thus the server is using 980MB - 768MB = 212MB of his swapfile.
Regards,
Arend
We don't knowThe error is back on one of the servers. Is it possible that this error occurs whenever the amount of memory in use exceeds the amount of memory physicly installed.

PDH.DLL is part of Windows, only Microsoft knows exactly how it works...
This error appears all the time (after 1st occurence)? Or sometimes test returns valid result?
Regards
Alex
Alex,
Ok, I've monitored the monitoring
for several days now. And frankly, I'm in a loss here...
So the situation is now as follows:
We are using RMA on server A. The agent monitors server B on the same network.
On both servers we run a performance counter test:
\\servername\\Memory\Available MBytes
When the RMA is started the tests seems to run fine for a while. After a certain period of time the error message reappears.
What makes it even more odd is that when the RMA is started on server A the test "Performance counter \\servername\\Memory\Available MBytes" on server B responds OK with 11MB average free memory. But actually when you physicly look on server B the total physical memory is fully used as well as 30% of the 1536MB swapfile.
So my quesions are:
1. How is it possible the performance counter returns such a result when in fact the result either should be "0MB" with an BAD result, or 70% of 1536MB is free with a GOOD result.
2. What test could we run to receive a reliable performance counter?
Regards,
Arend
Ok, I've monitored the monitoring

So the situation is now as follows:
We are using RMA on server A. The agent monitors server B on the same network.
On both servers we run a performance counter test:
\\servername\\Memory\Available MBytes
When the RMA is started the tests seems to run fine for a while. After a certain period of time the error message reappears.
What makes it even more odd is that when the RMA is started on server A the test "Performance counter \\servername\\Memory\Available MBytes" on server B responds OK with 11MB average free memory. But actually when you physicly look on server B the total physical memory is fully used as well as 30% of the 1536MB swapfile.
So my quesions are:
1. How is it possible the performance counter returns such a result when in fact the result either should be "0MB" with an BAD result, or 70% of 1536MB is free with a GOOD result.
2. What test could we run to receive a reliable performance counter?
Regards,
Arend
Are you sure you have changed work mode to "External" for this agent? May be you have changed option for HostMonitor only? Have you restarted agent after ini file modification?2. What test could we run to receive a reliable performance counter?
When error occurs, could you try to check different counter, e.g. \\servername\PhysicalDisk(_Total)\Avg. Disk Bytes/Read
If memory test fails but disk test returns result, more likely problem is not in pdh.dll but in perfos.dll
This is steady result? I mean there are always difference it result? Or it happens sometime? Probably some application strongly uses memory, it allocates and next second releases some memory...RMA is started on server A the test on server B responds OK with 11MB average free memory. But actually when you physicly look on server B the total physical memory is fully used
Regards
Alex
I did stop and start the agent but ok, I've restarted the agent again and uptill now the results are good.KS-Soft wrote: Are you sure you have changed work mode to "External" for this agent? May be you have changed option for HostMonitor only? Have you restarted agent after ini file modification?
The result is steady. The counter does not return the correct amount of free memory. However, this only applies to the server B (the server which the RMA isn't installed on).KS-Soft wrote:This is steady result? I mean there are always difference it result? Or it happens sometime? Probably some application strongly uses memory, it allocates and next second releases some memory...
If error occurs again, could you try to setup monitor to request that disk counter (see my previous post)?I've restarted the agent again and uptill now the results are good.
If memory test fails but disk test returns result, more likely problem is not in pdh.dll but in perfos.dll
We will not be able to fix problem anyway, but we will know what to search on microsoft.com. May be Microsoft has patch for this DLL...
H'm.. I checked source code - RMA does not modify counter value in any way. It simply request Windows and returns result to HostMonitor.The result is steady. The counter does not return the correct amount of free memory. However, this only applies to the server B (the server which the RMA isn't installed on).
Regards
Alex
Np, we'll do.KS-Soft wrote: If error occurs again, could you try to setup monitor to request that disk counter (see my previous post)?
If memory test fails but disk test returns result, more likely problem is not in pdh.dll but in perfos.dll
We will not be able to fix problem anyway, but we will know what to search on microsoft.com. May be Microsoft has patch for this DLL...
Ok, well frankly, you could tell me anything and I'd believe itH'm.. I checked source code - RMA does not modify counter value in any way. It simply request Windows and returns result to HostMonitor.
