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 |
|
On-premises or third-party cloud |
|
Management stations |
|
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