]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/sd_journal_get_usage.xml
Merge pull request #288 from phomes/cgroup-util
[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"
681eb9cf
FB
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
4<!ENTITY % entities SYSTEM "custom-entities.ent" >
5%entities;
6]>
a1a03e30
LP
7
8<!--
9 This file is part of systemd.
10
11 Copyright 2012 Lennart Poettering
12
13 systemd is free software; you can redistribute it and/or modify it
14 under the terms of the GNU Lesser General Public License as published by
15 the Free Software Foundation; either version 2.1 of the License, or
16 (at your option) any later version.
17
18 systemd is distributed in the hope that it will be useful, but
19 WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 Lesser General Public License for more details.
22
23 You should have received a copy of the GNU Lesser General Public License
24 along with systemd; If not, see <http://www.gnu.org/licenses/>.
25-->
26
27<refentry id="sd_journal_get_usage">
28
798d3a52
ZJS
29 <refentryinfo>
30 <title>sd_journal_get_usage</title>
31 <productname>systemd</productname>
32
33 <authorgroup>
34 <author>
35 <contrib>Developer</contrib>
36 <firstname>Lennart</firstname>
37 <surname>Poettering</surname>
38 <email>lennart@poettering.net</email>
39 </author>
40 </authorgroup>
41 </refentryinfo>
42
43 <refmeta>
44 <refentrytitle>sd_journal_get_usage</refentrytitle>
45 <manvolnum>3</manvolnum>
46 </refmeta>
47
48 <refnamediv>
49 <refname>sd_journal_get_usage</refname>
50 <refpurpose>Journal disk usage</refpurpose>
51 </refnamediv>
52
53 <refsynopsisdiv>
54 <funcsynopsis>
55 <funcsynopsisinfo>#include &lt;systemd/sd-journal.h&gt;</funcsynopsisinfo>
56
57 <funcprototype>
58 <funcdef>int <function>sd_journal_get_usage</function></funcdef>
59 <paramdef>sd_journal *<parameter>j</parameter></paramdef>
60 <paramdef>uint64_t *<parameter>bytes</parameter></paramdef>
61 </funcprototype>
62
63 </funcsynopsis>
64 </refsynopsisdiv>
65
66 <refsect1>
67 <title>Description</title>
68
69 <para><function>sd_journal_get_usage()</function> determines the
70 total disk space currently used by journal files (in bytes). If
71 <constant>SD_JOURNAL_LOCAL_ONLY</constant> was passed when opening
72 the journal, this value will only reflect the size of journal
73 files of the local host, otherwise of all hosts.</para>
74 </refsect1>
75
76 <refsect1>
77 <title>Return Value</title>
78
79 <para><function>sd_journal_get_usage()</function> returns 0 on
80 success or a negative errno-style error code.</para>
81 </refsect1>
82
83 <refsect1>
84 <title>Notes</title>
85
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>