WebGet command

Used in a Server.Load script to retrieve information from a specified URL.

Syntax

Web Mail workload usage of WEBGET:

WEBGET [-sumonly | -alldata]

{-url <urlname>   [-walk  <depth> <span>]    [-proxy <urlname>]   
[-mi | -mis  <msgsize> <numrecipients> [<nthIteration>] 
| -mir <numtoread> [<numtodel>] | -mp] }  | 
[ -holdtime <waitconn> <waitsend><waitrecv>]

iNotes® Workload usage of WEBGET:

WEBGET [-sumonly | -alldata]

{ -url <urlname>   [-walk  <depth> <span>]    [-proxy <urlname>]   
[ -qp | -qi | -qt  | 
-qis <msgsize> <numrecipients> [<nthIteration>]  | 
-qir <numtoread> [<numtodel>] | 
-qca <msgsize> <duration> <mindaysaway> <maxdaysaway> [<nthIteration>] | 
-qci <msgsize> <duration> <mindaysaway> <maxdaysaway> <numrecipients>[<nthIteration>] | 
-qmr <num> [<nthIteration>] }  | 
[ -holdtime <waitconn> <waitsend><waitrecv>]

Description

The [sumonly | alldata] parameter retrieves either summary information (sumonly) or actual data -- for example, a graphic image (alldata) for a specified URL. The summary information is retrieved with the HTTP HEAD command; the actual data is retrieved with the HTTP GET command. Summary mode is useful for placing a light load on the HTTP server, as summary information is typically less than 300 bytes, versus an HTML document or image which can be any size.

[{-url <urlname> [-walk <depth> <span>] [-proxy <urlname>] } -[holdtime <ct> <st><waitrecv>] 

After Web content has been retrieved from a URL (for example, -url www.ibm.com), the -walk switch can be used to traverse hyperlinks found on each page. The <depth> parameter indicates the number of hyperlinks to traverse for a given page; for each HTML document traversed, and is recursively applied to that page as well. The <span> parameter indicates the maximum number of pages for a given link that can be traversed before coming back to the initial request page.

The -walk switch does not traverse links that have previously been traversed (that is, a back-to-home link will not be selected); this prevents an endless recursive loop. The -walk command also does not explore links that lead to other HTTP servers (that is, a link on www.renovations.com that leads to www.ibm.com will not be selected), avoiding the endless exploration of HTTP servers.

The -proxy switch should be used when the specified URL is an external site --that is, one that must be accessed via the specified proxy server.

The -holdtime switch specifies the amount of time WebGet will wait before completing an HTTP transaction. The sequence of events required to complete an HTTP transaction is: establish a connection to an HTTP server, send the command to the HTTP server, receive data from the HTTP server.

The <ct> parameter indicates the amount of time, in milliseconds, to wait after issuing a command to the HTTP server. This effectively holds the HTTP server thread/process that has been dispatched to service the request in an idle state. <ct> should be less than the HTTP server's connect time timeout parameter (typically 2 minutes). The <st> parameter specifies the amount of time to wait after sending the command to the HTTP server. This effectively holds the servicing HTTP server thread/process idle, even though it may be ready to send data. The <rt> parameter specifies the amount of time to wait after receiving the requested data from the HTTP server.

The -mi switch is used specifically for the WebMail workloads to open a user's Web Mail inbox.

-mis <msgsize> <numrecipients> [<nthIteration>] 

The -mis switch is used specifically for the Web Mail workload to send mail (msgsize = the size of the message body) or the word 'profile' is used to randomly select a message and an attachment of a size determined according to the following profile:

Table 1. Switch: -mis

Body Size

Attachment

Frequently used (%)

500.00

10.00

10000.00

30.00

50000.00

40.00

50000.00

50000.00

10.00

150000.00

9.50

1000.00

10000000.00

0.50

The <numrecipients> parameter equals the number of message recipients, the optional parameter <nthiteration> controls the frequency with which command is actually executed. For example,

  • If nthiteration = 1, the command is always executed.
  • If nthiteration = 2, the command is executed on every other iteration.
  • If nthiteration = 6, the command is executed on every 6th iteration.

The -mir <numtoread> [<numtodel>] switch is used specifically for the Web Mail workloads to read Web Mail. The parameter numtoread indicates the number of messages to read and the optional parameter numtodel indicates the number of messages to delete.

The -mp switch is used specifically for the WebMail workloads to set the owner of the Web Mail database.

The -qp switch is used specifically for the iNotes® workloads to set the owner of the iNotes® database.

The -qi switch is used specifically for the iNotes® workloads to open a user's iNotes® database (inbox), without reading any documents.

The -qt switch is used specifically for the iNotes® workloads to determine the mail template used for this database.

The -qis <msgsize> <numrecipients> [<nthIteration>] switch is used specifically for the iNotes® workload to send mail. The parameter msgsize equals the size of the message body , the word 'profile' is used to randomly select a message and an attachment of a size determined according to the following profile:

Table 2. Switch: -qis

Body Size

Attachment

Frequently used (%)

500.00

10.00

10000.00

30.00

50000.00

40.00

50000.00

50000.00

10.00

150000.00

9.50

1000.00

10000000.00

0.50

The parameter numrecipients equals the number of message recipients and the optional parameter, nthiteration, controls the frequency with which this command is actually executed. For example,

  • If nthiteration = 1, the command is always executed.
  • If nthiteration = 2, the command is executed on every other iteration.
  • If nthiteration = 6, the command is executed on every 6th iteration.

The -qir <numtoread> [<numtodel>] [<numtoadd>] switch is used specifically for the iNotes® workload to read mail. The parameter <numtoread> indicates the number of messages to read and the optional parameter, <numtodel> indicates the number of messages to delete from the $Inbox. The optional parameter <numtoadd> indicates the number of messages to add to the $Inbox.

The -qca <msgsize> <duration> <mindaysaway> <maxdaysaway> [<nthIteration>] switch is used specifically for the iNotes® workload to create a calendar appointment. The parameter msgsize equals the size of the appointment body, the parameter duration equals duration of the appointment in minutes, the parameter mindaysaway equals the minimum number of days from today to schedule the appointment, the parameter maxdaysaway equals the maximum number of days from today to schedule the appointment. The optional parameter nthiteration controls how frequently this command is actually executed.

The -qci <msgsize> <duration> <mindaysaway> <maxdaysaway> <numrecipients> [<nthIteration>] switch is used specifically for the iNotes® workload to create and send an invitation. The parameter msgsize equals the size of the invitation body, the parameter duration equals the duration of the invitation in minutes, the parameter mindaysaway equals the minimum number of days after today to schedule the invitation, the parameter maxdaysaway equals the maximum number of days after today to schedule the invitation, and the parameter numrecipients equals the number of message recipients. The optional parameter nthiteration controls the frequency with which this command is actually executed.

The -qmr <num> [<nthIteration>] switch is used specifically for the iNotes® workload to create and send a response to a received invitation. The parameter num equals the number of RSVPs to create, that is, the number of received invitations to process. The optional parameter nthiteration controls the frequency with which this command is actually executed.

Example 1

The command [-url www.renovations.com -walk 2 1] is interpreted by a Web browser as follows: starting at Web page www.renovations.com, select two links on the page to click (if the page has at least two links). Click the first selected link, return back to the initial page, then click the second link, and return back to the initial page.

Example 2

The command [-url www.renovations.com -walk 1 2] is interpreted by a Web browser as follows: starting at Web page www.renovations.com, select one link on the page to click. Click the link, then apply the same rule recursively to each new page. Assuming that the first link clicked is www.renovations.com/sales.htm, the rule then requires WebGet to find one link on that page and traverse it. The span parameter indicates a stopping point for the recursive process.

Additionally, -walk 0 0 indicates that WebGet should only request the page indicated by <urlname> and no more. Equivalent to leaving out the -walk switch. Or, -walk 10000 10000 (or another large number) indicates that you want WebGet to traverse every conceivable link on that page, much like a Web robot.