blob: 9fc640d1efd79245965fb171cf5217ae066ba07b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
'\" t
.TH "SD_JOURNAL_GET_USAGE" "3" "" "systemd 255" "sd_journal_get_usage"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
sd_journal_get_usage \- Journal disk usage
.SH "SYNOPSIS"
.sp
.ft B
.nf
#include <systemd/sd\-journal\&.h>
.fi
.ft
.HP \w'int\ sd_journal_get_usage('u
.BI "int sd_journal_get_usage(sd_journal\ *" "j" ", uint64_t\ *" "bytes" ");"
.SH "DESCRIPTION"
.PP
\fBsd_journal_get_usage()\fR
determines the total disk space currently used by journal files (in bytes)\&. If
\fBSD_JOURNAL_LOCAL_ONLY\fR
was passed when opening the journal, this value will only reflect the size of journal files of the local host, otherwise of all hosts\&.
.SH "RETURN VALUE"
.PP
\fBsd_journal_get_usage()\fR
returns 0 on success or a negative errno\-style error code\&.
.SH "NOTES"
.PP
All functions listed here are thread\-agnostic and only a single specific thread may operate on a given object during its entire lifetime\&. It\*(Aqs safe to allocate multiple independent objects and use each from a specific thread in parallel\&. However, it\*(Aqs not safe to allocate such an object in one thread, and operate or free it from any other, even if locking is used to ensure these threads don\*(Aqt operate on it at the very same time\&.
.PP
Functions described here are available as a shared library, which can be compiled against and linked to with the
\fBlibsystemd\fR\ \&\fBpkg-config\fR(1)
file\&.
.SH "HISTORY"
.PP
\fBsd_journal_get_usage()\fR
was added in version 190\&.
.SH "SEE ALSO"
.PP
\fBsystemd\fR(1),
\fBsd-journal\fR(3),
\fBsd_journal_open\fR(3),
|