1 <html><head><meta http-equiv=
"Content-Type" content=
"text/html; charset=UTF-8"><title>sd_journal_get_usage
</title><meta name=
"generator" content=
"DocBook XSL Stylesheets V1.78.1"></head><body bgcolor=
"white" text=
"black" link=
"#0000FF" vlink=
"#840084" alink=
"#0000FF"><style>
11 background-color: #c60f0f;
15 h1:hover
> a.headerlink, h2:hover
> a.headerlink, h3:hover
> a.headerlink, dt:hover
> a.headerlink {
18 </style><a href=
"index.html">Index
</a>·
19 <a href=
"systemd.directives.html">Directives
</a>·
20 <a href=
"../python-systemd/index.html">Python
</a>·
21 <a href=
"../libudev/index.html">libudev
</a>·
22 <a href=
"../libudev/index.html">gudev
</a><span style=
"float:right">systemd
208</span><hr><div class=
"refentry"><a name=
"sd_journal_get_usage"></a><div class=
"titlepage"></div><div class=
"refnamediv"><h2>Name
</h2><p>sd_journal_get_usage — Journal disk usage
</p></div><div class=
"refsynopsisdiv"><h2>Synopsis
</h2><div class=
"funcsynopsis"><pre class=
"funcsynopsisinfo">#include
<systemd/sd-journal.h
></pre><table border=
"0" class=
"funcprototype-table" summary=
"Function synopsis" style=
"cellspacing: 0; cellpadding: 0;"><tr><td><code class=
"funcdef">int
<b class=
"fsfunc">sd_journal_get_usage
</b>(
</code></td><td>sd_journal*
<var class=
"pdparam">j
</var>,
</td></tr><tr><td> </td><td>uint64_t*
<var class=
"pdparam">bytes
</var><code>)
</code>;
</td></tr></table><div class=
"funcprototype-spacer"> </div></div></div><div class=
"refsect1"><a name=
"idm274673159440"></a><h2 id=
"Description">Description
<a class=
"headerlink" title=
"Permalink to this headline" href=
"#Description">¶
</a></h2><p><code class=
"function">sd_journal_get_usage()
</code>
23 determines the total disk space currently used by
24 journal files (in bytes). If
25 <code class=
"constant">SD_JOURNAL_LOCAL_ONLY
</code> was passed
26 when opening the journal, this value will only reflect
27 the size of journal files of the local host, otherwise
28 of all hosts.
</p></div><div class=
"refsect1"><a name=
"idm274673156944"></a><h2 id=
"Return Value">Return Value
<a class=
"headerlink" title=
"Permalink to this headline" href=
"#Return%20Value">¶
</a></h2><p><code class=
"function">sd_journal_get_usage()
</code>
29 returns
0 on success or a negative errno-style error
30 code.
</p></div><div class=
"refsect1"><a name=
"idm274673155088"></a><h2 id=
"Notes">Notes
<a class=
"headerlink" title=
"Permalink to this headline" href=
"#Notes">¶
</a></h2><p>The
<code class=
"function">sd_journal_get_usage()
</code>
31 interface is available as shared library, which can be
32 compiled and linked to with the
33 <code class=
"constant">libsystemd-journal
</code> <a href=
"pkg-config.html"><span class=
"citerefentry"><span class=
"refentrytitle">pkg-config
</span>(
1)
</span></a>
34 file.
</p></div><div class=
"refsect1"><a name=
"idm274673151696"></a><h2 id=
"See Also">See Also
<a class=
"headerlink" title=
"Permalink to this headline" href=
"#See%20Also">¶
</a></h2><p>
35 <a href=
"systemd.html"><span class=
"citerefentry"><span class=
"refentrytitle">systemd
</span>(
1)
</span></a>,
36 <a href=
"sd-journal.html"><span class=
"citerefentry"><span class=
"refentrytitle">sd-journal
</span>(
3)
</span></a>,
37 <a href=
"sd_journal_open.html"><span class=
"citerefentry"><span class=
"refentrytitle">sd_journal_open
</span>(
3)
</span></a>,
38 </p></div></div></body></html>