From e540ab40c0efe6360e9a6e3d9f34b0e1b420fdde Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Wed, 20 Feb 2019 20:21:08 -0800 Subject: codex: initial commit !!! This code is a very quick hack I made in an evening of !!! inspired curiosity, the code should be considered of junk !!! quality. Codex aspires to be a read-only FUSE interface to the journal provided by systemd. At this point it only implements simple reading of the journal through a single match filter selected via filesystem path. With codex mounting the journal @ /mnt, you can see what fields are available for matching against via: `ls /mnt/by-field` This returns a list of fields as directories, which you can then list the contents of to see all the unique values present for the repsective field, returned as regular files: `ls /mnt/by-field/UNIT` Then by reading one of the returned files, you read the contents of the journal filtered on the respective field and value, e.g.: `cat /mnt/by-field/UNIT/apt-daily.timer` and you'll get a stream of all the data in the journal with a filter of UNIT=apt-daily.timer With some work, this could be made more advanced supporting combined filters, perhaps in the form of: `cat /mnt/by-field/UNIT/apt-daily.timer/and/by-field/PRIORITY/3/all` As-is, the path by-field/UNIT/apt-daily.timer is a regular file, so no such constructions are possible. But if it were changed to be another directory, where you can select further matches by traversing yet another and/by-field subpath, where all the fields are available (or maybe only the matching subset of fields if feasible), then more complex uses could be satisfied. Imagine or/by-field and and/by-field being available under every value's directory. Note this commit includes a barely functioning PoC. It is not intended for production, but you can already use it to navigate journals in a way I find more pleasant than journalctl. I think it'd be great to have a tool like this built out with all the bells and whistles. It may make sense to roll something similar into journalctl like `journalctl --mount /mnt/point`. --- bootstrap | 3 +++ 1 file changed, 3 insertions(+) create mode 100755 bootstrap (limited to 'bootstrap') diff --git a/bootstrap b/bootstrap new file mode 100755 index 0000000..c5a7472 --- /dev/null +++ b/bootstrap @@ -0,0 +1,3 @@ +#!/bin/sh + +autoreconf --install -- cgit v1.2.3