[systemd-devel] Thoughts about storing unit/job statistics

Dan Nicholson nicholson at endlessm.com
Mon Dec 2 16:19:25 UTC 2019


On Thu, Nov 28, 2019 at 1:32 AM Lennart Poettering
<lennart at poettering.net> wrote:
>
> Ideally we wouldn't even come up with our own file format for these
> ring buffers, and just use what is already established, but afaiu
> there's no established standard for time series ring buffer files so
> far, hence I figure we need to come up with our own. I mean, after all
> the intention is not to process this data ourselves but have other
> tools do that.

A classic and still widely used format for this is an RRD file as
popularized by RRDtool. You can see some description at
https://oss.oetiker.ch/rrdtool/tut/rrdtutorial.en.html and
https://en.wikipedia.org/wiki/RRDtool.

Another one we came across at Endless was a whisper database used by
Graphite. It's a text format similar to RRD. See
https://graphite.readthedocs.io/en/latest/whisper.html.

A more recent and popular tool is prometheus. See
https://prometheus.io/docs/prometheus/latest/storage/ for how it
stores data on disk. It appears that the actual on disk format is
documented at https://github.com/prometheus/prometheus/blob/master/tsdb/docs/format/README.md.
Alternatively, you could potentially setup systemd as a prometheus
exporter (https://prometheus.io/docs/instrumenting/exporters/) that
prometheus pulls from. That obviously makes systemd metrics not as
usable out of the box and more suited to server usage than desktop
usage.


More information about the systemd-devel mailing list