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+ -->
6 <refentry id=
"sd_journal_get_usage" xmlns:
xi=
"http://www.w3.org/2001/XInclude">
9 <title>sd_journal_get_usage
</title>
10 <productname>systemd
</productname>
14 <refentrytitle>sd_journal_get_usage
</refentrytitle>
15 <manvolnum>3</manvolnum>
19 <refname>sd_journal_get_usage
</refname>
20 <refpurpose>Journal disk usage
</refpurpose>
25 <funcsynopsisinfo>#include
<systemd/sd-journal.h
></funcsynopsisinfo>
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>
37 <title>Description
</title>
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>
47 <title>Return Value
</title>
49 <para><function>sd_journal_get_usage()
</function> returns
0 on
50 success or a negative errno-style error code.
</para>
56 <xi:include href=
"threads-aware.xml" xpointer=
"strict"/>
58 <xi:include href=
"libsystemd-pkgconfig.xml" xpointer=
"pkgconfig-text"/>
62 <title>See Also
</title>
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>,