This section explains how to make analysis aiming at response when the customer accesses a page.
Analysis aiming at response enables the following information to be recognized and used for Web site operation.
How long does it take for processing on the server system?
SQC extended log is used to analyze response.
The SQC Extended Log Collection is used to collect and accumulate data not collected by the functions provided by the Web service (such as the Web server). Data accumulated by the SQC Extended Log Collection is called the "SQC extended log." The following SQC extended log can be collected and stored.
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
JavaTM 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 is collected.
To run this function, refer to "Editing WebPages" in advance.
Data collection function2
JavaTM 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 WebPages" 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".
See
JavaTM applet is used by the data accumulation function (ResLog1.class, ResLog2.class). For details about JavaTM applet, refer to "3.2 Environment Settings procedures".
Editing WebPages
Incorporate the JavaTM 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 JavaTM 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 JavaTM 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 JavaTM 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 JavaTM 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 show 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 (or comment out) 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 "9.1.6.2.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 "9.1.6.3 SQC extended log file".
This subsection explains the SQC extended log file.
The SQC extended log file is created automatically by the SQC extended log collection when the SQC extended logs are accumulated.
Storage location
The SQC extended log file is stored under the following directory.
[Windows]
<Variable file storage directory>\extend-log\ |
[UNIX]
/var/opt/FJSVssqc/extend-log/ |
File name format
The SQC extended log file name has the following format. A new file name is created each time the SQC extended log file is switched. Characters shown in blue indicate variables.
logyyyymmdd_nn
[Explanation of variable characters]
Symbol | Meaning |
---|---|
yyyy | Year created (1970 -) |
mm | Month created (01 to 12) |
dd | Day created (01 to 31) |
nn | Serial number of the SQC extended log file among those log files created on the same day (01 to 99) |
The formula for estimating the capacity per day is as follows. Characters shown in blue indicate variables.
(Capacity per day) = (50 + A + B) * C
Symbol | Meaning |
---|---|
A: | Average number of bytes of host name or IP address (of the Web page user) when the browser is operating |
B: | Average number of bytes of path in HTML document of Web page |
C: | Average number of access to HTML document of Web page per day |
To simplify work such as backup of the SQC extended log file, the SQC Extended Log Collection periodically creates a new SQC extended log file (file name described in "9.1.6.3.1 File name": logyyyymmdd_nn) to change the accumulation destination of the SQC extended log to a new log file. This is called "SQC extended log file switching."
SQC extended log file switching is performed in accordance with the settings in the Extended Log Environment Definition File "ExtendLogConfig".
For details on how to set the Extended Log Environment Definition File, refer to "9.1.6.4 Setting an extended log environment definition file".
"Extended log environment definition file" is a file in which SQC extended log accumulation methods are defined. The extended log environment definition file needs to be set before the SQC extended log is collected.
This setting is required only when the SQC extended log is collected.
The extended log environment definition file is a text file. Use a text editor such as Notepad to create and edit the file. The file path is given below.
[Windows]
<Variable file storage directory>\control\ExtendLogConfig |
[UNIX]
/etc/opt/FJSVssqc/ExtendLogConfig |
A sample of the extended environment definition file is prepared. Edit this sample to facilitate installation. This sample is stored in the following directory.
[Windows]
<Installation directory>\sample\ExtendLogConfig |
[UNIX]
/opt/FJSVssqc/sample/ExtendLogConfig |
The character code is as follows:
[Windows]
ASCII |
[UNIX]
ASCII |
A definition example of the extended log environment definition file is given below.
See "15.2.2 Extended Log Environment Definition File", in the online manual for details on setting the extended log environment definition file.
01/Jan/2001:00:00:00 +0900 [Log] LogfileInterval = week(sun) 01/Jan/2001:00:00:00 +0900 |
LogfileInterval is used to define extended log file switching units. The meaning of each option is listed below.
<Option> | <Meaning> |
---|---|
day | Daily |
week(...) | Weekly |
month(...) | Monthly |
For "Week," use the following value to specify the start point for a week in parentheses.
<Option> | <Meaning> |
---|---|
sun | Sunday |
mon | Monday |
tue | Tuesday |
wed | Wednesday |
thu | Thursday |
fri | Friday |
sat | Saturday |
For "month," use the following value to specify the start point for a month in parentheses. However, the last day of the month is specified if the start point is omitted.
<Option> | <Meaning> |
---|---|
Integer number from 1 to 31 | Day of the month |
Note
Before providing the Web page service to collect the SQC extended log, execute a test to confirm that the SQC extended log is actually collected.
The Usage DB Environment Definition File defines the conditions for creating databases used to store various log data on
the Web services. The file also defines the conditions for creating usage DBs.
Definitions in the use trend DB environment definition file are required to analyze response reports by using the collected SQC extended log.
Specify the analysis target log definition block for the SQC extended log in the use trend DB environment definition file.
For detail of the setting of a use trend database environment definition file, refer to "15.2.1 Usage DB Environment Definition File".
The following shows a definition example.
[Windows]
[Server] Symbol = PUBLIC <-- omission --> [Log] Symbol = WWW <-- omission --> [Log] Symbol = Response Name = ResponseLog Path = "C:\SystemwalkerSQC\extend-log\log*" Format = SQC-Extend Region = +0900 |
[UNIX]
[Server] Symbol = PUBLIC <-- omission --> [Log] Symbol = WWW <-- omission --> [Log] Symbol = Response Name = ResponseLog Path = "/var/opt/FJSVssqc/extend-log/log*" Format = SQC-Extend Region = +0900 |
Specify the following as the SQC extended log storage destination to be specified for Path.
[Windows]
Path = "<Variable file storage directory>\extend-log\log*" |
[UNIX]
Path = "/var/opt/FJSVssqc/extend-log/log*" |
Specify "SQC-Extend" as the format.
Region uses a time difference from GMT (Greenwich Mean Time) to specify the region for the time.
To analyze from the standpoint of response,specify the following in the usage analysis window.
Item | Contents specified |
---|---|
Analysis target server | Specify the server or group to be analyzed. |
Analyzed data type | Response report |
Analysis method | Specify one of the following:
|
Analysis period | Specify the analysis target period and its unit. |
By combining the management server on which Manager is installed and the managed server on which Agent for Business is installed, you can analyze response reports on the managed server by using the management server.
The following explains how to analyze response reports on the managed server by using the management server.
Settings for the management server
Make the following settings on the management server:
Use "7.2.2.1 Registering a usage service" for the managed server setting in the environment settings to set the management location for the use trend DB in "Management Server."
Define the managed server in the analysis target server definition block in the use trend DB environment definition file.
Specify the following in the analysis target server definition block.
Item | Setting contents |
---|---|
Symbol | Specify the same symbol as that of the use trend DB environment definition file of the managed server. |
Name | Specify the server name that is defined in the managed server setting window for environment settings. |
DatabaseMode | db To register in the use trend database the log information that is transferred from the managed server and analyze it, specify that database. |
Specify the following in the analysis target log definition block.
[Windows]
Item | Setting contents |
---|---|
Path | "<Variable file storage directory>\database\csv\<server directory>\e*.csv" |
Format | SQC-ExtCSV Specify the CSV format extended log file as the recording format of the analysis target log file. |
Region | +0000 Specify no time difference as the region definition for the time data that is stored in the analysis target log file. |
[UNIX]
Item | Setting contents |
---|---|
Path | "<Variable file storage directory>/database/csv/<server directory>/e*.csv" |
Format | SQC-ExtCSV Specify the CSV format extended log file as the recording format of the analysis target log file. |
Region | +0000 Specify no time difference as the region definition for the time data that is stored in the analysis target log file. |
*1 The server directory is created with the name that is specified for Symbol in the analysis target server definition block in the use trend DB environment definition file.
The following shows a definition example.
[Windows]
[Server] Symbol = PUBLIC <-- omission --> DatabaseMode = db [Log] Symbol = WWW <-- omission --> [Log] Symbol = Response Name = ResponseLog Path = "C:\SystemwalkerSQC\database\csv\PUBLIC\e*.csv" Format = SQC-ExtCSV Region = +0000 |
[UNIX]
[Server] Symbol = PUBLIC <-- omission --> DatabaseMode = db [Log] Symbol = WWW <-- omission --> [Log] Symbol = Response Name = ResponseLog Path = "/var/opt/FJSVssqc/database/csv/PUBLIC/e*.csv" Format = SQC-ExtCSV Region = +0000 |
By making the setting above, Web server log information is transferred from the managed server to the management server and stored in the use trend DB of the management server.
Settings for the managed server
Make the following setting on the managed server.
Specify the operation that uses the CSV format log file as a use trend DB operation type in the analysis target server definition block in the use trend dB environment definition file.
DatabaseMode = csv |
The following shows a definition example.
[Windows]
[Server] Symbol = PUBLIC <-- omission --> DatabaseMode = csv [Log] Symbol = WWW <-- omission --> [Log] Symbol = Response Name = ResponseLog Path = "C:\SystemwalkerSQC\extend-log\log*" Format = SQC-Extend Region = +0900 |
[UNIX]
[Server] Symbol = PUBLIC <-- omission --> DatabaseMode = csv [Log] Symbol = WWW <-- omission --> [Log] Symbol = Response Name = ResponseLog Path = "/var/opt/FJSVssqc/extend-log/log*" Format = SQC-Extend Region = +0900 |
The use trend DB registration engine outputs the CSV format extended log file to the following directory.
* < > indicates a directory.
(*1) The server directory is created with the name that is specified for Symbol in the analysis target definition block in the use trend DB environment definition file.
(*2) The name variable (yyyymmdd_nnn) for the CSV format extended log file is given below. The year, month, and date are when the use trend DB is switched (created).
yyyy | Year (1980 or later) |
mm | Month (01 to 12) |
dd | Date (01 to 31) |
nnn | Serial No. (001 to 999) |
When the setting above is made, a CSV format extended log file is created as a use trend DB for response report on the managed server, and log information is transferred between the managed server and the management server.
Analyzing the managed server
Trend Viewer of the management server is used to analyze the managed server log on the management server.