Using Get Console Output and Reboot Instances
Amazon EC2 instances don't have a physical monitor to display their console output on. They also don't have physical controls to allow them to be powered-up, rebooted or shutdown. Instead these actions are enabled via the EC2 SOAP and Query APIs.
Console output is a valuable tool for problem diagnosis. It is especially useful for troubleshooting kernel problems and service configuration issues that may cause an instance to terminate or become unreachable before its ssh daemon can be started. Amazon EC2 provides a way to programmatically access instance console output via both the SOAP and Query APIs and the corresponding command-line tool.
Similarly, the ability to reboot instances that are otherwise unreachable is valuable for both trouble-shooting and general instance management. Amazon EC2 provides such a facility via the SOAP and Query APIs and the corresponding command-line tool.
Amazon EC2 instance console output reflects exactly the character based console output that would otherwise be displayed on 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 it is available for a period of at least 1 hour after the last posting.
The console output for an instance can be retrieved via the SOAP API call described in the section called “GetConsoleOutput” and the Query API call described in the section called “GetConsoleOutput”. The corresponding command line tool, described in the section called “ec2-get-console-output”, can be used to retrieve the console output for an instance and display it to the user.
Console output can only be accessed by the instance owner.
As machines can be rebooted by pressing the reset button, EC2 instances can be rebooted via the SOAP API described in the section called “RebootInstances” and the Query API described in the section called “RebootInstances”. The corresponding command line tool described in the section called “ec2-reboot-instances” can be used to reboot a set of specified instances from the command-line.