]>
Commit | Line | Data |
---|---|---|
a1a03e30 LP |
1 | <?xml version='1.0'?> <!--*-nxml-*--> |
2 | <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" | |
12b42c76 | 3 | "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> |
a1a03e30 LP |
4 | |
5 | <!-- | |
572eb058 | 6 | SPDX-License-Identifier: LGPL-2.1+ |
a1a03e30 LP |
7 | --> |
8 | ||
7d6b2723 | 9 | <refentry id="sd_journal_get_usage" xmlns:xi="http://www.w3.org/2001/XInclude"> |
a1a03e30 | 10 | |
798d3a52 ZJS |
11 | <refentryinfo> |
12 | <title>sd_journal_get_usage</title> | |
13 | <productname>systemd</productname> | |
798d3a52 ZJS |
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 <systemd/sd-journal.h></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 | ||
a8d46a16 ZJS |
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 | ||
7d6b2723 | 62 | <xi:include href="libsystemd-pkgconfig.xml" xpointer="pkgconfig-text"/> |
798d3a52 ZJS |
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> | |
a1a03e30 LP |
74 | |
75 | </refentry> |