Get Console Output and Reboot Instances
Console output is a valuable tool for problem diagnosis. It is especially useful for troubleshooting kernel problems and service configuration issues that could cause an instance to terminate or become unreachable before its SSH daemon can be started.
Similarly, the ability to reboot instances that are otherwise unreachable is valuable for both troubleshooting and general instance management.
Amazon EC2 instances do not have a physical monitor through which you can view their console output. They also lack physical controls that allow you to power up, reboot, or shut them down. To allow these actions, we provide them through the Amazon EC2 SOAP API, Query API, and command-line tools.
Get Console Output
For Linux and UNIX instances, the Amazon EC2 instance console output displays the exact console output that would normally be displayed on a physical monitor attached to a machine. This output is buffered because the instance produces it and then posts it to a store where the instances owner can retrieve it.
For Windows instances, the Amazon EC2 instance console output displays the last three system event log errors.
The posted output is not continuously updated; only when it is likely to be of the most value. This includes shortly after instance boot, after reboot, and when the instance terminates.
Note | |
---|---|
Only the most recent 64 KB of posted output is stored, which is available for at least 1 hour after the last posting. |
You can retrieve the console output for an instance through the SOAP API call described in GetConsoleOutput, the Query API call described in GetConsoleOutput, and the command line tool described in ec2-get-console-output.
Note | |
---|---|
Only the instance owner can access the console output. |
Reboot Instances
Just as you can reset a machine by pressing the reset button, you can reset Amazon EC2 instances through the SOAP API described in RebootInstances, the Query API described in RebootInstances, and the command line tool described in ec2-reboot-instances.
Caution | |
---|---|
For Windows instances, this operation performs a hard reboot that might result in data corruption. |