|This feature is supported from API version 2007-01-03 and its supporting command-line tools.|
This feature provides a means to retrieve the console output for instances and to reboot instances. It is exposed via two separate calls using either the SOAP or Query EC2 APIs. Corresponding command line tools are also provided.
Amazon EC2 instance console output reflects exactly the character based console output that would otherwise be displayed by a physical monitor attached to a machine. This output is buffered as it is produced by the instance and then posted to a store from which it can be retrieved by the instance's owner. The posted output is not continuously updated. Rather, it is updated shortly after instance boot, reboot and once the instance terminates when it is likely to be of most value. Only the most recent 64KB of posted output is stored and is available for a period of at least 1 hour after the last posting.
Retrieve console output:
$ ec2-get-console-output i-10a64379
Linux version 2.6.16-xenU (firstname.lastname@example.org) (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.
The output in this example has been truncated.
A reboot instances request queues a reboot operation for one or more instances that will be carried out provided the instance(s) is (are) owned by the caller and the instance(s) is (are) running.
Reboot a single instance:
$ ec2-reboot-instances i-10a64379
|More details about this feature can be found in the “Using Get Console Output and Reboot Instances” section of the Developers Guide.|