How can I define my own functions in URL Scripts for Webserver Stress Tool?

Up

0

Down

I want to create my own functions in URL scripts for Webserver Stress Tool.

custom script webserver-stress-tool

Created on Feb 24, 2010 8:58:45 AM by  Daniel Zobel [Paessler Support] (9,594) 3 3


1 Reply

Accepted Answer

Up

0

Down

Defining Own Functions for Webserver Stress Tool

If you want to create your own functions in URL Scripts for Webserver Stress Tool please refer to the following sample in order to understand the necessary syntax:

sub MyTest(a)
  myresult="The Result is "+a
end sub

Sub OnBeforeClick
  data.url="http://web.de"
  data.log="Beforeclick: "+MyTest(inttostr(data.usernumber+1))
end Sub

Sub OnAfterClick
   data.log="Afterclick: "+MyTest(inttostr(data.usernumber+1))
end sub

Sub OnbeforeRequest
   data.log=""
end sub

Sub OnAfterRequest
   data.log=""
end sub

This will give you log file entries like this:

27.06.2010 11:57:10: User #2 Click #1: Beforeclick: The Result is 2
27.06.2010 11:57:12: User #2 Click #1: Afterclick: The Result

Created on Feb 24, 2010 9:00:22 AM by  Daniel Zobel [Paessler Support] (9,594) 3 3


Please log in or register to enter your reply.

Disclaimer:The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.

Top Tags


View all Tags

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions! Learn more