diff options
Diffstat (limited to 'src/formats/strace_log.json')
-rw-r--r-- | src/formats/strace_log.json | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/formats/strace_log.json b/src/formats/strace_log.json new file mode 100644 index 0000000..46c3a44 --- /dev/null +++ b/src/formats/strace_log.json @@ -0,0 +1,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>" + } + ] + } +}
\ No newline at end of file |