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