Viewing the Boot Log of an Instance

After creating an instance in Compute Classic, you can view the boot log of the instance. If there are any issues after an instance has started or while restarting an instance, viewing the boot log helps you to detect those issues.

Boot logs are enabled by default in Oracle-provided images from mid-May 2016 onwards. For instances created using any other images, boot logs might not be visible by default. In this case, you can log in to the instance and configure it to show boot logs on the web console. See How can I access the boot log for my instance?

To complete this task, you must have the Compute_Monitor or Compute_Operations role. If this role isn’t assigned to you or you’re not sure, then ask your system administrator to ensure that the role is assigned to you in Oracle Cloud Infrastructure Classic Console. See Modifying User Roles in Managing and Monitoring Oracle Cloud.

  1. Sign in to the Compute Classic console. If your domain spans multiple sites, select the appropriate site. To change the site, click the Site menu near the top of the page.
  2. The Instances page shows a list of instances. Go to the instance for which you want to view the boot log. From the menu icon menu, select View.
  3. On the instance details page, click the Logs tab in the left pane.
    The Logs page displays the boot log for the instance. The output from the latest start or restart is displayed.

    Note:

    Boot logs are truncated at 81920 bytes.

    Note:

    If your instance isn’t configured to display boot logs, the Logs page displays a message stating that no log was found.

    The following is a sample output of a boot log, which has been truncated for readability:

    user pid=8847 uid=0 auid=0 ses=674 msg='op=PAM:setcred acct="root" exe="/usr/sbin/crond" hostname=? addr=? terminal=cron res=success'
    [341545.271630] type=1106 audit(1462252801.375:4058): user pid=8847 uid=0 auid=0 ses=674 msg='op=PAM:session_close acct="root" exe="/usr/sbin/crond" hostname=? addr=? terminal=cron res=success'
    [342145.291725] type=1101 audit(1462253401.394:4059): user pid=8855 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:accounting acct="root" exe="/usr/sbin/crond" hostname=? addr=? terminal=cron res=success'
    [342145.315757] type=1103 audit(1462253401.418:4060): user pid=8855 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:setcred acct="root" exe="/usr/sbin/crond" hostname=? addr=? terminal=cron res=success'
    ...
    ...
    ...
    [345145.356807] type=1103 audit(1462256401.460:4096): user pid=8918 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:setcred acct="root" exe="/usr/sbin/crond" hostname=? addr=? terminal=cron res=success'
    [345145.372663] type=1006 audit(1462256401.476:4097): pid=8918 uid=0 old auid=4294967295 new auid=0 old ses=4294967295 new ses=681
    [345145.383251] type=1105 audit(1462256401.486:4098): user pid=8918 uid=0 auid=0 ses=681 msg='op=PAM:session_open acct="root" exe="/usr/sbin/crond" hostname=? addr=? terminal=cron res=success'
    [345145.440485] type=1104 audit(1462256401.543:4099): user pid=8918 uid=0 auid=0 ses=681 msg='op=PAM:setcred acct="root" exe="/usr/sbin/crond" hostname=? addr=? terminal=cron res=success'
    [345145.458101] type=1106 audit(1462256401.560:4100): user pid=8918 uid=0 auid=0 ses=681 msg='op=PAM:session_close acct="root" exe="/usr/sbin/crond" hostname=? addr=? terminal=cron res=success'

To view instance console output using the CLI, use the opc compute instance-console get command. For help with that command, run the command with the -h option. For the instructions to install the CLI client, see Preparing to Use the Compute Classic CLI in CLI Reference for Oracle Cloud Infrastructure Compute Classic.

To view instance console output using the API, use the GET /instanceconsole/name method. For more information, see REST API for Oracle Cloud Infrastructure Compute Classic.