Active script sometime hang

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
thomassam
Posts: 3
Joined: Wed Apr 01, 2009 3:05 am

Active script sometime hang

Post by thomassam »

I was try to use Active script to check the server. The vbscitpt is always work if manual run "cscript checkserver.vbs" command in DOS. But use active script run, sometime it will open the DOS and hang.
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

I think, your script does not met requirements, so you should adjust it a bit:
1. script must contain "performtest" function. HM always call function with this name
2. "performtest" function must not have any parameters
3. "performtest" function must return string value. This string contains two parts separated by colon (:) . First obligatory part contains test status, it can take following values:

* "Host is alive"
* "No answer"
* "Unknown"
* "Unknown host"
* "Ok"
* "Bad"
* "Bad contents"

Second optional part contains "Reply" value, HostMonitor displays this value in Reply field, writes to log files, uses to displays charts (Log Analyzer), etc.
Please, read the following article for details: http://www.ks-soft.net/hostmon.eng/mfra ... htm#script

Also you may use examples, located in \Examples\Scripts subfolder of HostMonitor folder.

Alternative solution is to use "Shell Script" test method. But in any case, script should suit requirements: http://www.ks-soft.net/hostmon.eng/mfra ... m#chkShell

Regards,
Max
KS-Soft
Posts: 12821
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

But use active script run, sometime it will open the DOS and hang
Open DOS? Do you mean script opens some additional window? Normally script should not do this.. may be your script needs some additional input or it tries to show some error?

Regards
Alex
thomassam
Posts: 3
Joined: Wed Apr 01, 2009 3:05 am

Post by thomassam »

I use psexec command in the vbscript. It is the psexec command STDOUT or STDERR problem.

I disable STDOUT and STDERR in the vbscript and then the problem has been fixed.
KS-Soft
Posts: 12821
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Great

Regards
Alex
Post Reply