summaryrefslogtreecommitdiff
path: root/src/journal/journald-server.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-12-11 22:55:57 +0100
committerLennart Poettering <lennart@poettering.net>2013-12-11 22:55:57 +0100
commit0c24bb2346b6b6232d67aacd5236b56ea4989de4 (patch)
treedf86ad10ed1ec355da17dae88bac7752eaf6de22 /src/journal/journald-server.h
parent91bf3b3e124575f6f647bff29766e9d992f55b32 (diff)
journald: cache hostname, boot_id and machine_id fields instead of generating them fresh for each log entry
Diffstat (limited to 'src/journal/journald-server.h')
-rw-r--r--src/journal/journald-server.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/journal/journald-server.h b/src/journal/journald-server.h
index 2c3e2c239d..86c4be4ba2 100644
--- a/src/journal/journald-server.h
+++ b/src/journal/journald-server.h
@@ -59,6 +59,7 @@ typedef struct Server {
int native_fd;
int stdout_fd;
int dev_kmsg_fd;
+ int hostname_fd;
sd_event *event;
@@ -71,6 +72,7 @@ typedef struct Server {
sd_event_source *sigusr2_event_source;
sd_event_source *sigterm_event_source;
sd_event_source *sigint_event_source;
+ sd_event_source *hostname_event_source;
JournalFile *runtime_journal;
JournalFile *system_journal;
@@ -130,6 +132,10 @@ typedef struct Server {
struct udev *udev;
bool sync_scheduled;
+
+ char machine_id_field[sizeof("_MACHINE_ID=") + 32];
+ char boot_id_field[sizeof("_BOOT_ID=") + 32];
+ char *hostname_field;
} Server;
#define N_IOVEC_META_FIELDS 20