Examining Log Files on an Instance

Use log files to identify what's occurring on an instance to help troubleshoot issues.

Windows Logs

Instance Type Log File Location

Windows Server 2016

C:\Users\OCAOSMH\AppData\Local\OracleCloudAgent\plugins\oci-osmh\osmh-agent\stateDir\log\osmh-agent.log

Windows Server 2019

Windows Server 2022

C:\Windows\ServiceProfiles\OCAOSMH\AppData\Local\OracleCloudAgent\plugins\oci-osmh\osmh-agent\stateDir\log\osmh-agent.log

Linux Logs

Instance Type Log File Location

OCI

/var/lib/oracle-cloud-agent/plugins/oci-osmh/osmh-agent/stateDir/log/osmh-agent.log

/var/lib/oracle-cloud-agent/plugins/oci-osmh/osmh-agent/stateDir/log/osmh-cmd.log

/var/log/oracle-cloud-agent/plugins/oci-osmh/oci-osmh.log

/var/log/oracle-cloud-agent/agent.log

On-premises or third-party cloud

/opt/oracle/mgmt_agent/plugins/osmh/stateDir/log/osmh-agent.log

/opt/oracle/mgmt_agent/plugins/osmh/stateDir/log/osmh-cmd.log

Management stations

/var/log/httpd/access_log

/var/log/httpd/error_log

/var/log/httpd/ssl_access_log

/var/log/httpd/ssl_error_log

Examining the osmh-agent.log file

Examining the plugin log can be useful if the instance can't communicate, isn't checking in with the service, or isn't picking up jobs.

Linux

Run the following with root permissions. These examples use the OCI instance log location.

To view current log activity:

tail -f /var/lib/oracle-cloud-agent/plugins/oci-osmh/osmh-agent/stateDir/log/osmh-agent.log

To check for errors or failures:

grep -i -e error -e fail /var/lib/oracle-cloud-agent/plugins/oci-osmh/osmh-agent/stateDir/log/*

To check for workrequests:

grep osmhworkrequest /var/lib/oracle-cloud-agent/plugins/oci-osmh/osmh-agent/stateDir/log/*
Windows

To view current log activity, run the following as an administrator:

Get-Content C:\Windows\ServiceProfiles\OCAOSMH\AppData\Local\OracleCloudAgent\plugins\oci-osmh\osmh-agent\stateDir\log\osmh-agent.log -Wait -Tail 10