SD_JOURNAL_GET_USAGE(3)
π sd_journal_get_usage(3) β journal disk usage, bestie π
okay so real talk: the manual page name is sd_journal_get_usage(3), and the function we're hyping is sd_journal_get_usage(). it's giving βhow much disk are my journal files eating?β energy, and honestly? useful. no cap. π
β¨ NAME β¨
sd_journal_get_usage β journal disk usage. literally that. π
πΈ SYNOPSIS πΈ
#include <systemd/sd-journal.h>
int sd_journal_get_usage(sd_journal *j, uint64_t *bytes);
π¦ DESCRIPTION π¦
sd_journal_get_usage() determines the total disk space currently used by journal files, in bytes. yes bestie, bytes. π₯
If SD_JOURNAL_LOCAL_ONLY was passed when opening the journal, this value will only reflect the size of journal files of the local host, otherwise of all hosts. simple as that, fr fr. π«Ά
π RETURN VALUE π
sd_journal_get_usage() returns 0 on success or a negative errno-style error code. that's the whole vibe check. if it's not 0, bestie, it's negative and errno-style. π
π NOTES π
- all functions listed here are thread-agnostic, and only a single thread may operate on a given object at any given time. different threads may access the same object at different times. multiple independent objects may be used from different threads in parallel. π§
- functions described here are available as a shared library, which can be compiled against and linked to with the
libsystemdpkg-config(1)file. β¨
β HISTORY β
sd_journal_get_usage() was added in version 190. iconic since 190, periodt. π«
π SEE ALSO π
this page is brought to you by source/version systemd 261.3 and the footerβs SD_JOURNAL_GET_USAGE(3) moment β the date slot is empty on this one, so weβre not out here inventing dates, bestie. bye and go check your journal disk usage responsibly πβ¨π
π¦ where this page comes from
- ubuntu stonking: libsystemd-dev 261.3-0ubuntu3 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms