Displaying the Console History for an Instance
You can capture and display recent serial console data for an instance. The data includes configuration messages that occur when the instance boots, such as kernel and BIOS messages, and is useful for checking the status of the instance or diagnosing and troubleshooting problems.
The console history captures up to a megabyte of the most recent serial console data for the specified instance. Note that the raw console data, including multi-byte characters, is captured.
The console history is a point-in-time record. To troubleshoot a malfunctioning instance using an interactive console connection, use a serial console connection or a VNC console connection.
Required IAM Policy
To use Oracle Cloud Infrastructure, you must be granted security access in a policy by an administrator. This access is required whether you're using the Console or the REST API with an SDK, CLI, or other tool. If you get a message that you don't have permission or are unauthorized, verify with your administrator what type of access you have and which compartment to work in.
For administrators: The policy in Let users launch compute instances includes the ability to manage console history data. If the specified group doesn't need to launch instances or attach volumes, you could simplify that policy to include only manage instance-family
, and remove the statements involving volume-family
and virtual-network-family
.
Tagging Resources
Apply tags to your resources to help organize them according to your business needs. Apply tags at the time you create a resource, or update the resource later with the wanted tags. For general information about applying tags, see Resource Tags.
Managing Console History Data
You can use the Console, CLI, or API to manage console history captures. Console history lets you see serial output from your instance without having to connect to the instance remotely. You can use this information to troubleshoot instance access issues.
Using the Console
On the instance details page in the Console, you can capture and download console histories, view and edit metadata details, and delete console history captures.
- Open the navigation menu and click Compute. Under Compute, click Instances.
- Click the instance that you're interested in.
- Under Resources, click Console history.
-
Click View current history.
- Enter an optional name for the console history. Avoid entering confidential information.
- Show tagging options: If you have permissions to create a resource, then you also have permissions to apply free-form tags to that resource. To apply a defined tag, you must have permissions to use the tag namespace. For more information about tagging, see Resource Tags. If you're not sure whether to apply tags, skip this option or ask an administrator. You can apply tags later.
- To download a copy of the console history, click Download.
- Click Save and close.
- Open the navigation menu and click Compute. Under Compute, click Instances.
- Click the instance that you're interested in.
- Under Resources, click Console history.
- In the console history list, for the console history capture that you want to download, click the the , click Download, and then save the file.
- Open the navigation menu and click Compute. Under Compute, click Instances.
- Click the instance that you're interested in.
- Under Resources, click Console history.
-
In the console history list, for the console history capture that you want to view, click the the Actions menu (), and then click View details.
- Open the navigation menu and click Compute. Under Compute, click Instances.
- Click the instance that you're interested in.
- Under Resources, click Console history.
-
In the console history list, click the the Actions menu () next to the console history, and then click View details.
- Optionally, edit the name for the console history. Avoid entering confidential information.
- To view or edit tags, click Show tagging options.
- To edit or remove tags, click the edit icon next to the tag. To edit a tag, in the Edit Tag dialog, make any changes, and then click Save. To remove a tag, click Remove Tag.
- Click Save and close.
- Open the navigation menu and click Compute. Under Compute, click Instances.
- Click the instance that you're interested in.
- Under Resources, click Console history.
-
In the console history list, for the console history capture that you want to delete, click the the Actions menu (), and then click Delete.
- In the confirmation dialog, click Delete console history.
Using the CLI
For information about using the CLI, see Command Line Interface (CLI). To manage the serial console logs using the CLI, open a command prompt and run any of the following commands.
When using the CLI to capture the instance's serial console data history, include the following option to ensure that full history is captured. Without this option, the data might be truncated:
--length 10000000
.Use the compute console-history capture command:
oci compute console-history capture --instance-id <instance-id>
See the CLI online help for a list of options:
oci compute console-history capture --help
Use the compute console-history get command:
oci compute console-history get --instance-console-history-id <instance-console-history-id>
See the CLI online help for a list of options:
oci compute console-history get --help
Use the compute console-history get-content command:
oci compute console-history get-content --file <file_name> --instance-console-history-id <instance-console-history-id>
See the CLI online help for a list of options:
oci compute console-history get-content --help
Use the compute console-history update command:
oci compute console-history update --instance-console-history-id <instance-console-history-id>
See the CLI online help for a list of options:
oci compute console-history update --help
Use the compute console-history list command:
oci compute console-history list --compartment-id <COMPARTMENT_OCID>
See the CLI online help for a list of options:
oci compute console-history list --help
Use the compute console-history delete command:
oci compute console-history delete --instance-console-history-id <instance-console-history-id>
See the CLI online help for a list of options:
oci compute console-history delete --help
Using the API
For information about using the API and signing requests, see REST API documentation and Security Credentials. For information about SDKs, see SDKs and the CLI.
Use the following API operations to manage the console history data.
- To capture the console history, use the CaptureConsoleHistory method.
- To get details of console history metadata, use the GetConsoleHistory method.
- To get the details of console history content, use the GetConsoleHistoryContent method.
- To edit console history metadata, use the UpdateConsoleHistory method.
- To list console history captures, use the ListConsoleHistories method.
- To delete console history captures, use the DeleteConsoleHistory method.