Divide reply value

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
oryagel
Posts: 92
Joined: Wed Jul 28, 2010 10:23 am

Divide reply value

Post by oryagel »

Hi,

I have few tests which I need to reply the value divided by 10.
Div isn't good enough, I want to have 1 number after the decimal point.

I saw I can use:

Code: Select all

[(%SuggestedReply% div 10)].[(%SuggestedReply% mod 10)]
But then the returned value is a string and it doesn't count for the purpose of average calculation.

How can I divide the reply by 10?

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

Post by KS-Soft »

But then the returned value is a string and it doesn't count for the purpose of average calculation.
May be you are using wrong decimeal separator (.)?
What decimal separator is used on your system?

Or may be you are using test that should not work with such numbers?
What test method do you use?
HostMonitor version?

Regards
Alex
oryagel
Posts: 92
Joined: Wed Jul 28, 2010 10:23 am

Post by oryagel »

Thank you.

I'll explain more.
HostMonitor version: 8.72
Test type: "External test"

Lets say I have a utility which return the value 34
I want HostMonitor to reply 3.4 and use 3.4 for the average reply value calculation.
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Divide reply value

Post by KS-Soft Europe »

If your system uses "," as decimal separator, you should use Tyne up reply value expression like the following:
[(%SuggestedReply% div 10)],[(%SuggestedReply% mod 10)]
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

External program cannot return float number as error code, that's why HostMonitor does not expect float number as result of this test method.

Solution: start your program using Shell Script test method instead of External test method.

Regards
Alex
oryagel
Posts: 92
Joined: Wed Jul 28, 2010 10:23 am

Post by oryagel »

Thanks

I created a shell script test and it seems to work when I specify the parameters in the script itself.

Code: Select all

D:\WebPerformanceReportQueryTool\WebPerformanceReportQueryTool.exe 0 "D:\WebPerformanceReportQueryTool\dist\WebPerformanceProdReport.txt" f8f58c5b80c34445bffb536a75cd12c 10000 

But when I add the parameters in the parameters field it doesn't work.

Code: Select all

[10:11:47 AM] HostMonitor is going to execute "Parse test Json" script ...
[10:11:48 AM] Script started, invalid result received:
----------
C:\Program Files (x86)\HostMonitor8>D:\WebPerformanceReportQueryTool\WebPerformanceReportQueryTool.exe
Usage: whatever.exe <StepID> <JsonPath> <jobID> <thresholdMS>
The "start cmd" field is:

Code: Select all

cmd /c %script% %params%
What am I doing wrong?
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

But when I add the parameters in the parameters field it doesn't work.
Have you provided input parameters for application inside script ?
Script contents should look like the following:
D:\WebPerformanceReportQueryTool\WebPerformanceReportQueryTool.exe %1 %2 %3 %4
oryagel
Posts: 92
Joined: Wed Jul 28, 2010 10:23 am

Post by oryagel »

No :D
Thanks
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

You are welcome :)
oryagel
Posts: 92
Joined: Wed Jul 28, 2010 10:23 am

Post by oryagel »

Another question about this issue:
The Average value is float, but the Min and Max are int.

How can I change it?
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

How can I change it?
You cannot

Regards
Alex
Post Reply