sap-log-referencelisted
Install: claude install-skill adam0thman/sap-basis-ops
# SAP Log & Trace Reference (hunting + reading)
Different layer → different location. This is the **locator**: symptom → which log → where it lives →
how to read it. It complements [sap-health-triage](../sap-health-triage/SKILL.md) (which extracts logs via
SAPControl) and [sap-housekeeping](../sap-housekeeping/SKILL.md) (which cleans them up).
> **Guardrail note:** reading is non-destructive — but confirm the **SID/host** before reading another
> system's logs, and remember many SAPControl read methods are **protected** (`service/protectedwebmethods`
> — see health-triage §7). Raising trace **levels** (§ references) *does* change system behaviour/space —
> lower them again after diagnosis.
---
## 1. How to read a log
**OS shell (UNIX — Linux/AIX):**
```bash
tail -f <file> # follow live
less +G <file> # open at the end
grep -niE "ERROR|ORA-|\*\*\* ERROR|abort" <file> # hunt for errors
```
**OS shell (Windows):**
```powershell
Get-Content <file> -Tail 100 -Wait # follow live
Select-String -Path <file> -Pattern "ERROR|abort"
```
**Remotely / no shell — via SAPControl** (cross-ref [health-triage](../sap-health-triage/SKILL.md) §2):
```bash
sapcontrol -nr <nr> -function ListDeveloperTraces # list the instance's dev_* files
sapcontrol -nr <nr> -function ReadDeveloperTrace dev_w0 0 # read one (size 0 = whole file)
sapcontrol -nr <nr> -function ReadLogFile <path> '' # any instance log file
sapcontrol -nr <nr> -function