Examining Log Files on an Instance

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

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

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.

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/*