]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/sd_journal_get_usage.xml
man: don't claim systemd-analyze was documented as part of the man-pages project
[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 This file is part of systemd.
9
10 Copyright 2012 Lennart Poettering
11 -->
12
13 <refentry id="sd_journal_get_usage">
14
15 <refentryinfo>
16 <title>sd_journal_get_usage</title>
17 <productname>systemd</productname>
18
19 <authorgroup>
20 <author>
21 <contrib>Developer</contrib>
22 <firstname>Lennart</firstname>
23 <surname>Poettering</surname>
24 <email>lennart@poettering.net</email>
25 </author>
26 </authorgroup>
27 </refentryinfo>
28
29 <refmeta>
30 <refentrytitle>sd_journal_get_usage</refentrytitle>
31 <manvolnum>3</manvolnum>
32 </refmeta>
33
34 <refnamediv>
35 <refname>sd_journal_get_usage</refname>
36 <refpurpose>Journal disk usage</refpurpose>
37 </refnamediv>
38
39 <refsynopsisdiv>
40 <funcsynopsis>
41 <funcsynopsisinfo>#include &lt;systemd/sd-journal.h&gt;</funcsynopsisinfo>
42
43 <funcprototype>
44 <funcdef>int <function>sd_journal_get_usage</function></funcdef>
45 <paramdef>sd_journal *<parameter>j</parameter></paramdef>
46 <paramdef>uint64_t *<parameter>bytes</parameter></paramdef>
47 </funcprototype>
48
49 </funcsynopsis>
50 </refsynopsisdiv>
51
52 <refsect1>
53 <title>Description</title>
54
55 <para><function>sd_journal_get_usage()</function> determines the
56 total disk space currently used by journal files (in bytes). If
57 <constant>SD_JOURNAL_LOCAL_ONLY</constant> was passed when opening
58 the journal, this value will only reflect the size of journal
59 files of the local host, otherwise of all hosts.</para>
60 </refsect1>
61
62 <refsect1>
63 <title>Return Value</title>
64
65 <para><function>sd_journal_get_usage()</function> returns 0 on
66 success or a negative errno-style error code.</para>
67 </refsect1>
68
69 <refsect1>
70 <title>Notes</title>
71
72 <para>All functions listed here are thread-agnostic and only a single thread may operate
73 on a given <structname>sd_journal</structname> object.</para>
74
75 <para>The <function>sd_journal_get_usage()</function> interface is
76 available as a shared library, which can be compiled and linked to
77 with the
78 <constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
79 file.</para>
80 </refsect1>
81
82 <refsect1>
83 <title>See Also</title>
84
85 <para>
86 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
87 <citerefentry><refentrytitle>sd-journal</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
88 <citerefentry><refentrytitle>sd_journal_open</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
89 </para>
90 </refsect1>
91
92 </refentry>