"compare files" test timeout

General chat about HostMonitor (all messages posted before March 07, 2003 available here).
Locked
corebusiness
Posts: 3
Joined: Sun Jun 16, 2002 6:00 pm
Location: Rasmus Jensen
Contact:

Post by corebusiness »

I have a compare files test that tests for certain strings in some db export logfiles, sometimes, when the network is slow, i get errors from hostmon saying that the file is not there (i know it is, im looking at it)...

So question is, where can i set some kind of timeout, manual says its 900ms, but sometimes when the network is really slow, i need like 5000ms or maybe more. I checked in the ini file, but i cant seem to find it. Please help.

/ Rasmus Jensen / CoreBusiness
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

I am afraid Windows API do not provide configurable timeout in this case. I think you can use "Repeat test" action to avoid false alerts (http://www.ks-soft.net/hostmon.eng/mfra ... #actRepeat).

Regards
Alex
corebusiness
Posts: 3
Joined: Sun Jun 16, 2002 6:00 pm
Location: Rasmus Jensen
Contact:

Post by corebusiness »

Hey.


Im not sure its a windows timeout, well im pretty sure its not, lemme explain..

Lets say the logfile i need to check for errors is \server1databackuplogslogfile.log

I can reach the file with no problems if i do a "run" from startmenu, then ie. notepad \server1databackuplogslogfile.log

It takes some time, 4-5 secs, but i get the file opened without errors.

If i use that path in hostmonitor, it gives me a file does not exist error after 1 sec....

So it must be in hostmonitor that the "timeout" occurs.

/ Rasmus / CoreBusiness
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Yes, I understand you very well. But its not HostMonitor's timeout, I guarantee. HostMonitor just ask Windows API to retrieve information about specified file (open file in our case), and Windows function returns information about file or returns error code.
All Windows API functions those works with files does not have timeout as parameter. I checked MSDN documentation to try to find some Windows function that can setup timeout but did not find anything. Probably this information undocumented or may be I searched in wrong place.
Also, its possible Windows utilities (notepad, explorer) make several retries when try to open file or start the program. So, you can do the same in HostMonitor using "Repeat test" action.

Regards
Alex
Locked