ec2-get-console-output
Description
Retrieves console output for the specified instance.
Instance console output is buffered and posted shortly after instance boot, reboot, and termination. Amazon EC2 preserves the most recent 64 KB output which will be available for at least one hour after the most recent post.
Syntax
ec2-get-console-output
instance_id
[-r]
Options
Name | Description | Required |
---|---|---|
|
ID of the instance for which you want console output. Type: String Default: None Example: i-10a64379 |
Yes |
|
Raw output. Do not escape the output to facilitate reading. Type: String Default: None Example: -r |
Yes |
Output
The command returns a table that contains the following information:
-
A timestamp indicating the time of the last update
-
The instance console output. By default the ^ESC character is escaped and duplicate new-lines are removed to facilitate reading
Amazon EC2 displays errors on stderr.
Examples
Example Request
This example retrieves the console output for the i-10a64379
Linux and UNIX instance.
PROMPT>ec2-get-console-output i-10a64379
2007-01-03 12:00:00 Linux version 2.6.16-xenU ([email protected]) (gcc version 4.0.1 20050727 (Red Hat 4.0.1-5)) #1 SMP Thu Oct 26 08:41:26 SAST 2006 BIOS-provided physical RAM map: Xen: 0000000000000000 - 000000006a400000 (usable) 980MB HIGHMEM available. 727MB LOWMEM available. NX (Execute Disable) protection: active IRQ lockup detection disabled Built 1 zonelists Kernel command line: root=/dev/sda1 ro 4 Enabling fast FPU save and restore... done. ... ec2: -----BEGIN SSH HOST KEY FINGERPRINTS----- ec2: 2048 bc:89:29:c6:45:4b:b3:e2:c1:41:81:22:cb:3c:77:54 /etc/ssh/ssh_host_key.pub ec2: 2048 fc:8d:0c:eb:0e:a6:4a:6a:61:50:00:c4:d2:51:78:66 /etc/ssh/ssh_host_rsa_key.pub ec2: 1024 b5:cd:88:6a:18:7f:83:9d:1f:3b:80:03:10:17:7b:f5 /etc/ssh/ssh_host_dsa_key.pub ec2: -----END SSH HOST KEY FINGERPRINTS----- Fedora release 8 (Werewolf) Kernel 2.6.21.7-2.fc8xen on an i686