Menu
Amazon AppStream
Developer Guide

This documentation is for an older version of Amazon AppStream. For information about the latest version, see the Amazon AppStream 2.0 Developer Guide.

Enabling Logging on a Streaming Application

When your application exhibits unusual behaviors, such as unexpected shutdowns, intermittent streaming, or poor performance, or you want to know what your streaming application is doing, you can enable logging to see what is happening.

When logging is enabled, Amazon AppStream creates a .zip file of all the logs that you specify and uploads that .zip file is then uploaded to a specified Amazon S3 bucket in your account. Once the logs are stored in Amazon S3, you can download them and see what was happening within your streaming application during the session.

Although Amazon AppStream only upload logs after a session terminates, log creation during a session can adversely affect the streaming experience. Balance the need for logging events with the effect on the streaming experience by enabling logging.

Note

Amazon AppStream does not encrypt the log files by default. If you want encrypted logs, encrypt them when they are generated (client side encryption) or on the Amazon S3 bucket (server side encryption).

AppStream Log Names

Amazon AppStream uses this pattern to name the .zip file:

<bucketName>/AppStream/<region>/<Application ID>/yyyy-mm-dd/<log file name>.zip

Default Amazon AppStream Logs

By default, Amazon AppStream saves the following logs:

  • A file called launch.txt.failed with the output if Amazon AppStream fails to start the streaming application.

  • Minidump files (.dmp)

  • Standard error stream (launch.txt.stderr)

  • Standard output stream (launch.txt.stdout)

  • Utilization metrics (utilization.csv) which is a file that provides operational metrics. The first row contains column headings and the following rows are comma-separated values:

    • UTC Time—Time in Universal Coordinated Time (UTC) when the row was created.

    • Processor (n) %—The percentage of use for each CPU core starting with Core 0.

    • Memory in Use (Bytes)—Memory that was used in bytes.

    • Memory Available (Bytes)—Memory that was available in bytes.

    • Disk Read (Bytes)—Disk read speed in bytes per second.

    • Disk Write (Bytes)—Disk write speed in bytes per second.

    • GPU Utilization %—The percentage of use for the GPU.

    • GPU Memory Utilization %—The percentage of GPU memory that was used.

    • GPU Memory Total (MB)—The total GPU memory available in the megabytes (MB).

    • GPU Memory Used (MB)—The amount of GPU memory used in MB.

    • GPU Memory Free (MB)—The amount of GPU memory available in MB.

    • GPU Temperature (C)—The temperature of the GPU in degrees centigrade.

    • GPU Power Draw (W),—The number of watts the GPU is using.

    • GPU Power Limit (W)—The maximum number of watts required by the GPU.

    The following is an example of the metrics in this utilization log.

    Copy
    UTC Time,Processor(0) %,Processor(1) %,Processor(2) %,Processor(3) %,Memory In Use (Bytes),Memory Available (Bytes),Disk Write (Bytes/sec),Disk Read (Bytes/sec),GPU Utilization %,GPU Memory Utilization %,GPU Memory Total (MB),GPU Memory Used (MB),GPU Memory Free (MB),GPU Temperature (C),GPU Power Draw (W),GPU Power Limit (W) 2014/05/15 11:17:39,0.92,3.14,6.58,1.88,2724400196.27,14014595549.87,614818.20,103422.13,0, 1, 4095, 4063, 32, 33, 18.44, 125.00 2014/05/15 11:18:40,0.95,1.15,0.32,1.24,2745420390.40,14010372983.47,8689.31,99415.41,0, 1, 4095, 4063, 32, 33, 18.26, 125.00 2014/05/15 11:19:41,0.36,0.67,0.20,1.30,2734278997.33,14029225574.40,6994.11,18322.61,0, 1, 4095, 4063, 32, 33, 18.44, 125.00 2014/05/15 11:20:42,0.08,0.69,0.10,0.97,2724477064.53,14033759027.20,27142.17,14072.01,0, 1, 4095, 4063, 32, 33, 18.54, 125.00 2014/05/15 11:21:43,0.18,0.27,0.10,1.42,2719389627.73,14038990438.40,40446.51,203.51,0, 1, 4095, 4063, 32, 33, 18.53, 125.00 2014/05/15 11:22:44,0.13,0.44,0.12,0.87,2720666555.73,14039756800.00,43574.68,1696.60,0, 1, 4095, 4063, 32, 32, 18.67, 125.00 2014/05/15 11:23:45,0.18,0.44,0.24,0.92,2718720887.47,14040533674.67,44824.72,271.31,0, 1, 4095, 4063, 32, 32, 18.43, 125.00 2014/05/15 11:24:46,0.30,0.50,0.14,1.73,2707566796.80,14053706888.53,72334.31,209776.90,0, 1, 4095, 4063, 32, 32, 18.21, 125.00 2014/05/15 11:25:46,0.34,0.44,0.14,1.52,2654716040.53,14106968064.00,43219.86,1479.45,0, 1, 4095, 4063, 32, 33, 18.41, 125.00 2014/05/15 11:26:47,0.05,0.88,0.16,1.08,2655204010.67,14107344554.67,43875.24,0.00,0, 1, 4095, 4063, 32, 32, 18.31, 125.00 2014/05/15 11:27:48,0.38,0.79,0.16,1.25,2653159219.20,14107987626.67,40567.09,0.00,0, 1, 4095, 4063, 32, 33, 18.23, 125.00 2014/05/15 11:28:49,0.17,0.59,0.09,1.32,2650824772.27,14108805666.13,43111.49,0.00,0, 1, 4095, 4063, 32, 33, 18.20, 125.00 2014/05/15 11:29:50,0.16,0.45,0.07,0.76,2651427157.33,14109135803.73,43341.33,0.00,0, 1, 4095, 4063, 32, 33, 18.33, 125.00 2014/05/15 11:30:51,0.05,0.83,0.11,0.92,2650787703.47,14109916501.33,44690.80,0.00,0, 1, 4095, 4063, 32, 33, 18.30, 125.00 2014/05/15 11:31:52,0.13,0.64,0.29,0.79,2651821602.13,14110050781.87,44109.33,0.00,0, 0, 4095, 4063, 32, 33, 18.18, 125.00 2014/05/15 11:32:52,0.14,0.99,0.44,1.34,2655279445.33,14108282675.20,56575.66,2570.57,0, 0, 4095, 4063, 32, 32, 17.78, 125.00

Custom Amazon AppStream Logs

In addition to the above files, Amazon AppStream also collects logs located in directories that you specify. To specify custom files or directories simply include that information during the create application process or by updating the metadata of your application.

If you want Amazon AppStream to create the bucket, the new bucket name will use the following naming convention:

AppStream-<region>-<Account ID>

If you want to use your own bucket, you must allow Amazon AppStream to use the PutObject method. To allow this method, use a bucket policy similar to the following:

Copy
{ "Version": "2008-10-17", "Id": "Policy1396472828471", "Statement": [ { "Sid": "Stmt1396472820469", "Effect": "Allow", "Principal": {"AWS":"arn:aws:iam::990116983315:root"}, "Action": ["s3:PutObject"], "Resource": "arn:aws:s3:::your bucket name/*" } ] }

For more information about modifying the Amazon S3 bucket policy, see Bucket Policy Examples in the Amazon S3 Developer Guide.

You can also specify log files from other directories by filling the text box with the paths to directories that contain the log files or the path and filename of the log. Separate each path with a semi-colon (;). The paths and files must meet the following requirements:

  • Log files must be located in the C:\ directory.

  • Log paths must be fully qualified paths. Do not use relative paths. You can use wildcards.

  • Log paths must be less than the path length limits. See Naming Files, Paths, and Namespaces.

  • Log file names cannot contain Windows reserved characters. See Naming Conventions.

  • Your application must have read access to the paths.

Note

The total size of logs in the .zip file is subject to the Amazon S3 key size limits.

Enabling Amazon AppStream Logging through The Console

  1. Sign in to the AWS Management Console and open the Amazon AppStream console at https://console.aws.amazon.com/appstream/.

  2. In the Amazon AppStream console, click View your streaming applications. This button appears only if you have added applications to Amazon AppStream.

  3. In the list of applications, click the name of the streaming application to view.

    The Streaming Application Summary page displays information about the streaming application.

  4. On the Streaming Application Summary page, open Log Details.

  5. Under Log Details, click Edit.

  6. Select Yes, save application logs.

  7. (Optional) Use the text box that appears to specify other paths or log files to include in the .zip file. Each time you fill in a text box, another text box appears so that you can specify other paths or logs.

  8. To have Amazon AppStream send your logs to the default Amazon S3 bucket, click Create a default bucket. To use one of your existing Amazon S3 buckets, click the down arrow next to Create a default bucket and select one of your buckets.

  9. Click Save.

Enabling Amazon AppStream Logging Programatically

You can enable logging programmatically when you add your streaming application to Amazon AppStream or update the metadata for an existing streaming application. In either case, use one of the methods to provide the relevant data in the applicationManifest input field.

To enable logging when creating a new streaming application:

  1. Access the root by calling /.

  2. Follow the Applications link to get a list of applications.

  3. Follow the application:create link to create the application.

  4. Fill in the necessary information in the applicationManifest input field.

To enable logging on an existing streaming application:

  1. Access the root by calling /.

  2. Follow the Applications link to get a list of applications.

  3. Follow the application:by-id link to get the proper application representation.

  4. Follow the application:update link to update the streaming application.

  5. Fill in the necessary information in the applicationManifest input field.