]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/sd_journal_get_usage.xml
verify: use manager_load_startable_unit_or_warn() to load units for verification
[thirdparty/systemd.git] / man / sd_journal_get_usage.xml
CommitLineData
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
ZJS
6 SPDX-License-Identifier: LGPL-2.1+
7
a1a03e30
LP
8 This file is part of systemd.
9
10 Copyright 2012 Lennart Poettering
11
12 systemd is free software; you can redistribute it and/or modify it
13 under the terms of the GNU Lesser General Public License as published by
14 the Free Software Foundation; either version 2.1 of the License, or
15 (at your option) any later version.
16
17 systemd is distributed in the hope that it will be useful, but
18 WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 Lesser General Public License for more details.
21
22 You should have received a copy of the GNU Lesser General Public License
23 along with systemd; If not, see <http://www.gnu.org/licenses/>.
24-->
25
26<refentry id="sd_journal_get_usage">
27
798d3a52
ZJS
28 <refentryinfo>
29 <title>sd_journal_get_usage</title>
30 <productname>systemd</productname>
31
32 <authorgroup>
33 <author>
34 <contrib>Developer</contrib>
35 <firstname>Lennart</firstname>
36 <surname>Poettering</surname>
37 <email>lennart@poettering.net</email>
38 </author>
39 </authorgroup>
40 </refentryinfo>
41
42 <refmeta>
43 <refentrytitle>sd_journal_get_usage</refentrytitle>
44 <manvolnum>3</manvolnum>
45 </refmeta>
46
47 <refnamediv>
48 <refname>sd_journal_get_usage</refname>
49 <refpurpose>Journal disk usage</refpurpose>
50 </refnamediv>
51
52 <refsynopsisdiv>
53 <funcsynopsis>
54 <funcsynopsisinfo>#include &lt;systemd/sd-journal.h&gt;</funcsynopsisinfo>
55
56 <funcprototype>
57 <funcdef>int <function>sd_journal_get_usage</function></funcdef>
58 <paramdef>sd_journal *<parameter>j</parameter></paramdef>
59 <paramdef>uint64_t *<parameter>bytes</parameter></paramdef>
60 </funcprototype>
61
62 </funcsynopsis>
63 </refsynopsisdiv>
64
65 <refsect1>
66 <title>Description</title>
67
68 <para><function>sd_journal_get_usage()</function> determines the
69 total disk space currently used by journal files (in bytes). If
70 <constant>SD_JOURNAL_LOCAL_ONLY</constant> was passed when opening
71 the journal, this value will only reflect the size of journal
72 files of the local host, otherwise of all hosts.</para>
73 </refsect1>
74
75 <refsect1>
76 <title>Return Value</title>
77
78 <para><function>sd_journal_get_usage()</function> returns 0 on
79 success or a negative errno-style error code.</para>
80 </refsect1>
81
82 <refsect1>
83 <title>Notes</title>
84
a8d46a16
ZJS
85 <para>All functions listed here are thread-agnostic and only a single thread may operate
86 on a given <structname>sd_journal</structname> object.</para>
87
798d3a52
ZJS
88 <para>The <function>sd_journal_get_usage()</function> interface is
89 available as a shared library, which can be compiled and linked to
90 with the
91 <constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
92 file.</para>
93 </refsect1>
94
95 <refsect1>
96 <title>See Also</title>
97
98 <para>
99 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
100 <citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
101 <citerefentry><refentrytitle>sd_journal_open</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
102 </para>
103 </refsect1>
a1a03e30
LP
104
105</refentry>