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