1 /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
6 This file is part of systemd.
8 Copyright 2011 Lennart Poettering
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.
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.
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/>.
25 #include <sys/types.h>
28 #include "journal-file.h"
32 #include "journal-rate-limit.h"
35 typedef enum Storage {
44 typedef struct StdoutStream StdoutStream;
46 typedef struct Server {
54 JournalFile *runtime_journal;
55 JournalFile *system_journal;
56 Hashmap *user_journals;
63 JournalRateLimit *rate_limit;
64 usec_t rate_limit_interval;
65 unsigned rate_limit_burst;
67 JournalMetrics runtime_metrics;
68 JournalMetrics system_metrics;
73 bool forward_to_syslog;
74 bool forward_to_console;
76 uint64_t cached_available_space;
77 usec_t cached_available_space_timestamp;
79 uint64_t var_available_timestamp;
84 LIST_HEAD(StdoutStream, stdout_streams);
85 unsigned n_stdout_streams;
92 int max_level_console;
96 bool dev_kmsg_readable;
98 uint64_t *kernel_seqnum;
101 /* gperf lookup function */
102 const struct ConfigPerfItem* journald_gperf_lookup(const char *key, unsigned length);
104 int config_parse_storage(const char *filename, unsigned line, const char *section, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
106 const char *storage_to_string(Storage s);
107 Storage storage_from_string(const char *s);