1<?xml version='1.0'?> <!--*-nxml-*--> 2<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" 3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> 4<!-- SPDX-License-Identifier: LGPL-2.1-or-later --> 5 6<refentry id="sd_journal_get_usage" xmlns:xi="http://www.w3.org/2001/XInclude"> 7 8 <refentryinfo> 9 <title>sd_journal_get_usage</title> 10 <productname>systemd</productname> 11 </refentryinfo> 12 13 <refmeta> 14 <refentrytitle>sd_journal_get_usage</refentrytitle> 15 <manvolnum>3</manvolnum> 16 </refmeta> 17 18 <refnamediv> 19 <refname>sd_journal_get_usage</refname> 20 <refpurpose>Journal disk usage</refpurpose> 21 </refnamediv> 22 23 <refsynopsisdiv> 24 <funcsynopsis> 25 <funcsynopsisinfo>#include <systemd/sd-journal.h></funcsynopsisinfo> 26 27 <funcprototype> 28 <funcdef>int <function>sd_journal_get_usage</function></funcdef> 29 <paramdef>sd_journal *<parameter>j</parameter></paramdef> 30 <paramdef>uint64_t *<parameter>bytes</parameter></paramdef> 31 </funcprototype> 32 33 </funcsynopsis> 34 </refsynopsisdiv> 35 36 <refsect1> 37 <title>Description</title> 38 39 <para><function>sd_journal_get_usage()</function> determines the 40 total disk space currently used by journal files (in bytes). If 41 <constant>SD_JOURNAL_LOCAL_ONLY</constant> was passed when opening 42 the journal, this value will only reflect the size of journal 43 files of the local host, otherwise of all hosts.</para> 44 </refsect1> 45 46 <refsect1> 47 <title>Return Value</title> 48 49 <para><function>sd_journal_get_usage()</function> returns 0 on 50 success or a negative errno-style error code.</para> 51 </refsect1> 52 53 <refsect1> 54 <title>Notes</title> 55 56 <xi:include href="threads-aware.xml" xpointer="strict"/> 57 58 <xi:include href="libsystemd-pkgconfig.xml" xpointer="pkgconfig-text"/> 59 </refsect1> 60 61 <refsect1> 62 <title>See Also</title> 63 64 <para> 65 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, 66 <citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>, 67 <citerefentry><refentrytitle>sd_journal_open</refentrytitle><manvolnum>3</manvolnum></citerefentry>, 68 </para> 69 </refsect1> 70 71</refentry> 72