Flash Media Server |
|||
| Managing Flash Media Server > Managing the Server > Logging client connections and other system events > Access log file | |||
Flash Media Server 2 maintains an access log that includes statistics about client connections and stream activity. Flash Media Server 2 also maintains application logs for application activities and application logs for diagnostic logs. The application and diagnostic logs are an addition to operating system logs that log error and informational messages about Flash Media Server 2 operations.
The access log records information about requests by Flash Player and Flash Media Server 2 application instances. Using these logs, you can find out when a user connected to the server, the total bandwidth consumed during the session, and information about resources such as the streams accessed by the connection. You can use this information to determine which applications are the most frequently used.
The default access log is access.xx.log, which is located in the Flash Media Server 2 logs directory. The default configuration for Flash Media Server 2 creates a single access log per server. You can also configure Flash Media Server 2 to create a separate file per vhost. When logging is configured on a per-vhost basis, all logs for a particular vhost are found in a subdirectory within the logs directory. The name of the subdirectory matches the vhost name. Substitution strings can be found in the [] brackets, YYYY, MM, DD, and NN representing year, month, date, and version. You can use the substitution string to customize the filename of the access log.
To configure the server to create separate log files for each vhost, set the value of the Scope tag in the Server.xml file to "vhost" (see the description of the tag Scope).
For more information on logging, see Logger.xml file.
Flash Media Server 2 defines event categories, and for each category it defines events that can be recorded. Logging can be customized to record all events or only specific events. This determines how much information is collected.
The following table lists the access events defined in the Access logs.
|
Event |
Category |
Description |
|---|---|---|
|
connect-pending |
application |
Client connects to the server, waiting for the script to authenticate. |
|
connect |
application |
Client connects to the server. |
|
disconnect |
application |
Client disconnects. |
|
publish |
application |
Client publishes a live stream. |
|
unpublish |
application |
Client unpublishes a live stream. |
|
play |
application |
Client plays a recorded or live stream. |
|
pause |
application |
Client pauses playing a stream. |
|
unpause |
application |
Client resumes playing a stream. |
|
seek |
application |
Client jumps to a new location within a recorded stream. |
|
stop |
application |
Client stops playing a recorded or live stream or stops publishing a live stream. |
|
record |
application |
Client begins the recording of a stream. |
|
recordstop |
application |
Client stops the recording of a stream. |
|
server-start |
application |
Server has started. |
|
server-stop |
application |
Server has stopped. |
|
vhost-start |
application |
A virtual host has started. |
|
vhost-stop |
application |
A virtual host has stopped. |
The following table lists the fields in the access logs.
|
NOTE |
|
When the data for this field contains a space or delimiter, the data is wrapped in double quotation marks. The double quotation marks surrounding the data are not part of the data but are present for better parsing of the data. This applies to the tz, x-ctx, x-adaptor, x-vhost, s-uri, c-referrer, c-user-agent, cs-bytes, sc-bytes, and x-sname fields. |
|
Field |
Event(s) |
Description |
|---|---|---|
|
x-event |
application |
Type of event. |
|
x-category |
application |
Event category. |
|
date |
application |
Date at which the event occurred. |
|
time |
application |
Time at which the event occurred. |
|
tz |
application |
Time zone information. |
|
x-ctx |
application |
Event-dependent context information. |
|
x-pid |
application |
Server process ID. |
|
x-cpu-load |
application |
CPU load. |
|
x-mem-load |
application |
Memory usage (as reported by the |
|
x-adaptor |
application |
Adaptor name. |
|
x-vhost |
application |
Virtual host name. |
|
x-app |
application |
Application names. |
|
x-appinst |
application |
Application instance names. |
|
c-ip |
application |
Client IP address. |
|
c-proto |
application |
Connection protocol: RTMP or RTMPT. |
|
s-uri |
application |
URI of the Flash Media Server 2 application. |
|
c-referrer |
application |
URI of the referrer. |
|
c-user-agent |
application |
User agent. |
|
c-client-id |
application |
Client ID. |
|
cs-bytes |
application |
This field shows the number of bytes transferred from the client to the server. This information can be used to bill customers per session. To calculate the bandwidth usage per session, subtract the 'cs-bytes' in the 'connect' event from the 'cs-bytes' in the 'disconnect' event. |
|
sc-bytes |
application |
This field shows the number of bytes transferred from the server to the client. This information can be used to bill customers per session. To calculate the bandwidth usage per session, subtract the 'sc-bytes' in the 'connect' event by the 'sc-bytes' in the 'disconnect' event |
|
x-sname |
application |
Stream name. |
|
x-file-size |
application |
Stream size in bytes. |
|
x-file-length |
application |
Stream length in seconds. |
|
x-spos |
application |
Stream position. |
|
cs-stream-bytes |
application |
This field shows the number of bytes transferred from the client to the server per stream. To calculate the bandwidth usage per stream, subtract the 'cs-stream-bytes' in the 'publish' event by the 'cs-stream-bytes' in the 'unpublish' event. |
|
sc-stream-bytes |
application |
This field shows the number of bytes transferred from the server to the client per stream. To calculate the bandwidth usage per stream, subtract the 'sc-stream-bytes' in the 'play' event by the 'sc-stream-bytes' in the 'stop' event. |
|
cs-uri-stem |
application |
Stem portion of s-uri (omitting query) field. |
|
cs-uri-query |
application |
Query portion alone of s-uri. |
|
x-sname-query |
application |
Query portion of stream URI specified in play or publish. |
|
x-file-name |
application |
Full path of the file representing x-sname stream. |
|
x-file-ext |
application |
Stream type (currently this can be flv or mp3). |
|
s-ip |
application |
IP address or addresses of the server. |
|
x-duration |
application |
Duration of a stream or session event. |
|
x-suri-query |
application |
Same as x-sname-query. |
|
x-suri-stem |
application |
This is a composite field: cs-uri-stem + x-sname + x-file-ext. |
|
x-suri |
application |
This is a composite field: cs-uri-stem + x-sname + x-file-ext + x-sname-query. |
|
x-status |
application |
For a complete description of the x-status codes and descriptions, see the following table. |
The following events display a status code.
|
Field |
Status Code |
Description |
|---|---|---|
|
connect-pending |
100 |
Waiting for the application to authenticate. |
|
connect |
200 |
Successful connection. |
|
302 |
Application currently unavailable. |
|
|
400 |
Bad request; client connected to server using an unknown protocol. |
|
|
401 |
Connection rejected by the application script. |
|
|
403 |
Connection rejected by access module. |
|
|
404 |
Application not found. |
|
|
409 |
Resource limit exceeded. |
|
|
413 |
License limit exceeded. |
|
|
500 |
Server internal error. |
|
|
502 |
Bad gateway. |
|
|
503 |
Service unavailable; for instance, too many connections pending for authorization by access module. |
|
|
play |
200 |
Successful. |
|
400 |
Bad request (invalid arguments). |
|
|
401 |
Access denied by application. |
|
|
403 |
Play forbidden by stream module. |
|
|
404 |
Stream not found. |
|
|
415 |
Unsupported media type. |
|
|
|
500 |
Server internal error. |
|
publish |
200 |
Successful. |
|
|
400 |
Bad request (invalid arguments). |
|
|
401 |
Access denied by application. |
|
|
409 |
Stream is already being published |
|
|
415 |
Unsupported media type. |
|
|
500 |
Server internal error. |
|
stop |
200 |
Successful. |
|
|
408 |
Stream stopped because client disconnected. |
RSS feed | Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/fms/2/docs/00000181.html
Comments
*ron said on Jan 17, 2007 at 5:08 AM :