summaryrefslogtreecommitdiffstats
path: root/src/formats/strace_log.json
blob: 46c3a442792d14f4c87e011c7e2b2df5fce041ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{
    "$schema": "https://lnav.org/schemas/format-v1.schema.json",
    "strace_log": {
        "title": "Strace",
        "description": "The strace output format.",
        "url": "http://en.wikipedia.org/wiki/Strace",
        "multiline": false,
        "regex": {
            "std": {
                "pattern": "^(?<timestamp>\\d{2}:\\d{2}:\\d{2}\\.\\d{6}) (?<syscall>\\w+)\\((?<body>.*)\\)\\s+=\\s+(?<rc>[-\\w]+)(?: (?<errno>\\w+) \\([^\\)]+\\))?(?: <(?<duration>\\d+\\.\\d+)>)?$"
            }
        },
        "level-field": "errno",
        "level": {
            "error": ".+"
        },
        "value": {
            "syscall": {
                "kind": "string",
                "identifier": true,
                "rewriter": ":pipe-line-to explain-syscall.sh ${syscall}"
            },
            "rc": {
                "kind": "integer",
                "foreign-key": true
            },
            "duration": {
                "kind": "float"
            },
            "errno": {
                "kind": "string",
                "identifier": true
            }
        },
        "sample": [
            {
                "line": "08:09:33.814936 execve(\"/bin/ls\", [\"ls\"], [/* 38 vars */]) = 0 <0.000264>"
            },
            {
                "line": "08:09:33.815943 access(\"/etc/ld.so.nohwcap\", F_OK) = -1 ENOENT (No such file or directory) <0.000019>"
            }
        ]
    }
}