The response log is a log in which data on the response time of the CGI program collected in terms of the Web page user is accumulated.
The response time is a time interval required to receive a result from the CGI program after the Web page user executes a service that calls the CGI program.
For example, in the case of a Web page that executes searches, the response time is a time interval required to display a search result after the search is started.
Data is collected and accumulated in the response log by using the following three functions:
Data collection function1
Java(TM) applet (ResLog1.class) that runs on the Web browser. This function is called when the user references the Web pages and executes a service that calls the CGI program; and data when the service is executed is collected.
To run this function, refer to "Editing Web pages" in advance.
Data collection function2
Java(TM) applet (ResLog2.class) that runs on the Web browser. This function is called when the Web page user receives a result of a service that calls the CGI program. This applet collects data when a result is received and then sends the response time to the data accumulation function after calculating it together with data of the data collection function1.
To run this function, refer to "Editing Web pages" in advance.
Data accumulation function
CGI program (reslog.cgi) that runs on the Web server (installation machine). The data accumulation function is automatically started when data collection function2 is started. This function accumulates data sent from the data collection function2 in the SQC extended log file.
This section explains how to make settings for response log collection.
Before making settings
It is necessary to register the CGI program (reslog.cgi) of the data accumulation function with the Web server in advance so that it can be executed. For details of the registration, refer to "4.1 Settings for Web Server".
Information
Java(TM) applet (ResLog1.class, ResLog2.class) is used by the data accumulation function. For information about the Java(TM) applet, refer to "3.2 Environment Settings procedures".
Editing Web pages
Incorporate the Java(TM) applet for log collection into the HTML documents of each Web page that makes log collection. Both of the following two related Web pages must be edited:
Web page that calls a service
Web page that calls the CGI program of a service
For example, a Web page that executes searches when a keyword is given.
Web page that receives results
Web page that receives results (displays results) from the CGI program.
For example, a Web page that displays search results.
Editing Web pages that call a service
Incorporate the Java(TM) applet (ResLog1.class) of data collection function1 into the HTML document of the Web page that calls a service.
The following is a sample HTML document. URL in CODEBASE within the sample is described assuming that, like the setting example in "4.1 Settings for Web Server" the physical path of the directory www under the installation directory is registered as the alias "SQC".
In the following example, the Java(TM) applet (ResLog1.class) of the data collection function1 is called when the search button is clicked.
<!-- --> <!-- Response log collection page Sample (Part 1) --> <!-- --> <HTML> <HEAD> <TITLE> Search service page (sample)</TITLE> </HEAD> <BODY BGCOLOR=WHITE> <!-- ************ Systemwalker SQC (begin) ****************** --> <APPLET NAME="ResLog1" CODEBASE="/SQC/classes" CODE="ResLog1.class" ARCHIVE="reslog.jar" WIDTH=1 HEIGHT=1> </APPLET> <!-- ************ Systemwalker SQC (end) ******************** --> <CENTER><FONT COLOR=GREEN> Search service page (sample) </FONT></CENTER> <BR><BR> <FONT SIZE=5 COLOR=BLUE> Search service </FONT> <HR> <FORM METHOD="post" ACTION="/cgi-bin/search.cgi"> Search key <INPUT TYPE="text" NAME="key1" SIZE="25"> <BR><BR> <INPUT TYPE="reset" VALUE="Reset"> <INPUT TYPE="submit" VALUE="Search" onClick="document.ResLog1.run()"> </FORM> <HR> <FONT COLOR=RED> Notes </FONT> <P> This site records and accumulates response reports of the search service. Results are used exclusively to improve the search service. No violation of privacy is intended. </P> </BODY> </HTML> |
[Sample explanation]
Content | Explanation |
---|---|
Blue character | Description for incorporating data collection function1 |
Path to be specified in CODEBASE | URL of the storage directory of the Java(TM) class file of this product |
The above sample is stored at the following storage location after installation.
[Windows]
Installation directory \sample\search_request_jp.html |
[UNIX]
/opt/FJSVssqc/sample/search_request_jp.html |
Editing the Web page that receives results
Incorporate the Java(TM) applet (ResLog2.class) into the HTML document of the Web page that receives (displays) results.
The following is a sample HTML document. URL in CODEBASE within the sample is described assuming that, like the setting example in "4.1 Settings for Web Server" the physical path of the directory www under the installation directory is registered as the alias "SQC".
<!-- --> <!-- Response log collection page Sample (Part 2) --> <!-- --> <HTML> <HEAD> <TITLE> Search service page (sample) </TITLE> </HEAD> <BODY BGCOLOR=WHITE> <!-- ************ Systemwalker SQC (begin) ****************** --> <APPLET CODEBASE="/SQC/classes" CODE="ResLog2.class" ARCHIVE="reslog.jar" WIDTH=1 HEIGHT=1> <PARAM NAME=url VALUE="/SQC/cgi-bin/reslog.cgi"> </APPLET> <!-- ************ Systemwalker SQC (end) ******************** --> <CENTER><FONT COLOR=GREEN> Search service page (sample) </FONT></CENTER> <BR><BR> <FONT SIZE=5 COLOR=BLUE> Search service </FONT> <HR> <P> Search result... </P> </BODY> </HTML> |
[Sample explanation]
[Windows]
Content | Explanation |
---|---|
Blue character | Description for incorporating data collection function2 |
Path to be specified in CODEBASE | URL corresponding to the following directory: Installation directory\www\classes |
Path to be specified in VALUE | URL corresponding to the following file: Installation directory\www\cgi-bin\reslog.cgi |
The above sample is stored at the following storage location after installation.
Installation directory\sample\search_result_jp.html |
[UNIX]
Content | Explanation |
---|---|
Blue character | Description for incorporating data collection function2 |
Path to be specified in CODEBASE | URL corresponding to the following directory: /opt/FJSVswmag/www/classes |
Path to be specified in VALUE | URL corresponding to the following file: /opt/FJSVswmag/www/cgi-bin/reslog.cgi |
The above sample is stored at the following storage location after installation.
/opt/FJSVssqc/sample/search_result_jp.html |
Notes on Web page editing
Use the identical string to specify URL in CODEBASE inside the APPLET tag of the Web page that calls a service and that in CODEBASE inside the APPLET tag of the Web page that receives (displays) results. Note that, if the URL is not identical, for example, if one URL is specified using a relative path and the other URL is specified using an absolute path, no response log can be collected.
Operation after settings
If a Web page with the settings for this log collection is used, log collection is carried out in the sequence as shown below:
Target | Operation description |
---|---|
[1]Web user: | References URL of the Web page using the Web browser. |
[2]Web user: | Executes a service (for example, a search service) that calls the CGI program. |
[3]Web user: | Receives a result from the CGI program. |
[4]Inside: | The response log is collected and accumulated. |
[5]Inside: | The log is registered with the Usage DB by the Usage DB Registration Engine. |
[6]Analyzer: | An analysis can be carried out and results can be displayed on the analysis window. The URL based response analysis and client based response analysis are supported. |
Note
If there is any error in the edited Web page, the response log cannot be collected. Before providing a Web page service, carry out tests to make sure that the response log is actually collected.
To stop the response log collection, delete the lines added to the HTML document of the Web page that start log collection. Delete such text from both the HTML page that calls a service and the HTML page that receives results.
To be deleted is the blue text in each HTML page as described in "11.4.1.2 Making settings for log collection" Once deleted, no response log is collected and accumulated even if this Web page is referenced and a service is called.
A response log with one line of text is accumulated in the SQC extended log file in response to one piece of data sent from data collection function2.
The format of one line is as follows. The field is delimited by one blank character.
1.Date 2.Type 3.Version 4.HostName 5.Path 6.Reserve 7.KeyData
No. | Field | Explanation | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Date | Time at the log is accumulated. This time is a local time on the installation machine. Its format is as follows and blue characters are variable: [dd/mon/yyyy:hh:mm:ss SHHMM] The meaning of each field is as follows:
| ||||||||||||||||||||
2. | Type | Data type (code that indicates the log type) The response log corresponds to "2". | ||||||||||||||||||||
3. | Version | Version level of the log format. Currently only "1" for the response log. | ||||||||||||||||||||
4. | HostName | (Web page user's) host name or IP address where the browser operates | ||||||||||||||||||||
5. | Path | Path to the HTML document of the Web page | ||||||||||||||||||||
6. | Reserve | Reserved Currently always "0" | ||||||||||||||||||||
7. | KeyData | Response time (in milliseconds) |
For the file name, capacity estimation and SQC extended log file switching, refer to "15.2.5 SQC extended log file".