RMA: 301 - Error: Unable to lock a region of a file

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
Arilexed
Posts: 26
Joined: Mon Dec 06, 2004 1:39 am
Location: The Lowlands
Contact:

RMA: 301 - Error: Unable to lock a region of a file

Post by Arilexed »

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.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

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:
...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.
I would recommend to try External mode.

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
Arilexed
Posts: 26
Joined: Mon Dec 06, 2004 1:39 am
Location: The Lowlands
Contact:

Post by Arilexed »

Dear Alex,

Cheers, I'm using external now. The errors are gone. And yes, I forgot to mention but I was using a memory perf counter.

Regards,

Arend
Arilexed
Posts: 26
Joined: Mon Dec 06, 2004 1:39 am
Location: The Lowlands
Contact:

Post by Arilexed »

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
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

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.
We don't know :(
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
Arilexed
Posts: 26
Joined: Mon Dec 06, 2004 1:39 am
Location: The Lowlands
Contact:

Post by Arilexed »

It happens all the time but NOT after the first occurence. It runs fine for a while and suddenly it give returns the error. After that, I haven't seen a valid result. I will let it run for a few days and wait if the error disappears from time to time.

Regards,

Arend
Arilexed
Posts: 26
Joined: Mon Dec 06, 2004 1:39 am
Location: The Lowlands
Contact:

Post by Arilexed »

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
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

2. What test could we run to receive a reliable performance counter?
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?

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
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
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...

Regards
Alex
Arilexed
Posts: 26
Joined: Mon Dec 06, 2004 1:39 am
Location: The Lowlands
Contact:

Post by Arilexed »

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?
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: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...
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
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

I've restarted the agent again and uptill now the results are good.
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...
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).
H'm.. I checked source code - RMA does not modify counter value in any way. It simply request Windows and returns result to HostMonitor.

Regards
Alex
Arilexed
Posts: 26
Joined: Mon Dec 06, 2004 1:39 am
Location: The Lowlands
Contact:

Post by Arilexed »

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...
Np, we'll do.
H'm.. I checked source code - RMA does not modify counter value in any way. It simply request Windows and returns result to HostMonitor.
Ok, well frankly, you could tell me anything and I'd believe it :wink: I'm not to great with Windows perf counters.
Post Reply