The AnswerBook2 server software maintains logs that show server errors and server access. In addition, it provides a summary report that displays how often document collections are being accessed and how many errors occur.
To see a summary of access to the books on the server, select View Book Access Summary from the Admin GUI. The book access report summarizes how often each book on the server has been accessed. For each book on the server, it displays the following:
Book title -- The book's title as it appears on the Library Page
Book short name -- The short name for the book as identified in the book's configuration file
Collection name -- The short name of the collection to which the book belongs, as identified in the collinfo file
Hits -- Number of times the book has been accessed
Errors -- Number of errors associated with the book
To turn on or turn off access logging, select Modify Server Configuration from the Admin GUI.
To have information about who is accessing information on the documentation server written into the access log file, click on the button next to on, then click Apply. The default location for this file is /var/log/ab2/logs/access-8888.log.
To stop having information written into the access log file, click on the button next to off, then click Apply.
You can also use the following commands to perform these functions:
% /usr/lib/ab2/bin/ab2admin -o access_on [-m server_name] [-p server_port] |
% /usr/lib/ab2/bin/ab2admin -o access_off [-m server_name] [-p server_port] |
After you change the logging function, you must stop and start the documentation server. Log in as root on the server machine and type the following commands:
# /usr/lib/ab2/bin/ab2admin -o stop # /usr/lib/ab2/bin/ab2admin -o start |
To view the access log file, select View Log Files from the Admin GUI, then click on View Access Log File. The access log file is a text file that lists every access made to the documentation server. Each line in the access log looks similar to the following:
129.146.83.55 - - [04/Nov/1996:15:07:05 -0800] "GET /icons/ab2_curr_home.gif HTTP/1.0" 200 1938 |
Where:
The first set of numbers is the IP (Internet Protocol) address of the client. For example, 129.146.83.55.
The information between the square brackets is the date and time of the access. For example, [04/Nov/1996:15:07:05 -0800] .
The information between the double quotes tells you what access occurred. This typically identifies a URL or file name as well as the protocol used to respond to the access request. For example, "GET /icons/ab2_curr_home.gif HTTP/1.0" tells you that the access was to get the file /icons/ab2_curr_home.gif using the HTTP 1.0 protocol.
The next-to-last number indicates whether the access was successful (200) or not (anything else).
The last number indicates the size (in Kilobytes) of any information returned to the requestor. For example, 1938 is the size of the .gif file retrieved.
You can also use the following command to perform this function:
% /usr/lib/ab2/bin/ab2admin -o view_access [-m server_name] [-p server_port] |
To turn on or turn off error logging, select Modify Server Configuration from the Admin GUI.
To have information about any errors that occur on the documentation server written into the error log file, click on the button next to on, then click on Apply. The default location for this file is /var/log/ab2/logs/errors-8888.log.
To stop having information written into the error log file, click on the button next to off, then click on Apply.
You can also use the following commands to perform these functions:
% /usr/lib/ab2/bin/ab2admin -o error_on [-m server_name] [-p server_port] |
% /usr/lib/ab2/bin/ab2admin -o error_off [-m server_name] [-p server_port] |
After you change the logging function, you must stop and start the documentation server. Log in as root on the server machine and type the following commands:
# /usr/lib/ab2/bin/ab2admin -o stop # /usr/lib/ab2/bin/ab2admin -o start |
To view the error log file, select View Log Files from the Admin GUI, then click on View Error Log File. The error log file lists every error that occurred on this documentation server. You can use this information to determine the cause of server problems or unusual behaviors. These errors usually identify the server and port with which the error is associated, as well as some text that describes the error.
You can also use the following command to perform this function:
% /usr/lib/ab2/bin/ab2admin -o view_error [-m server_name] [-p server_port] |
The AnswerBook2 product allows you to save the current access or error log to a file and start logging information into an empty file.
To rotate the error log, select Rotate Error Log File from the Admin GUI.
To rotate the access log, select Rotate Access Log File from the Admin GUI.
When the Rotate Access (Error) Log File page appears:
Enter the file name to save to in the Save Log File field.
The default value is current_date.current_log_file_name. Where current_date is of the form YearYearYearYear_MonthMonth_DayDay_HourHour and current_log_file_name defaults to access-8888 or error-8888 (for example, 1997_02_26_14.access-8888.log).
Note that the Log file location field shows you the path to where the file is saved. You cannot change this information on this page.
Click on Apply.
After you change the logging function, you must stop and start the documentation server. Log in as root on the server machine and type the following commands:
# /usr/lib/ab2/bin/ab2admin -o stop # /usr/lib/ab2/bin/ab2admin -o start |
You can also use the following commands to perform these functions:
% /usr/lib/ab2/bin/ab2admin -o rotate_error [-m server_name] [-p server_port] |
% /usr/lib/ab2/bin/ab2admin -o rotate_access [-m server_name] [-p server_port] |