Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
steam
systemd
Commits
2b43f939
Commit
2b43f939
authored
Sep 06, 2012
by
Lennart Poettering
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
journald: avoid logging to kmsg in the normal paths
parent
f687b273
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
27 deletions
+21
-27
TODO
TODO
+0
-6
src/journal/journal-file.c
src/journal/journal-file.c
+6
-6
src/journal/journal-vacuum.c
src/journal/journal-vacuum.c
+1
-1
src/journal/journald-kmsg.c
src/journal/journald-kmsg.c
+1
-1
src/journal/journald.c
src/journal/journald.c
+13
-13
No files found.
TODO
View file @
2b43f939
...
...
@@ -51,8 +51,6 @@ Features:
* Query Paul Moore about relabelling socket fds while they are open
* log fewer journal internal messages to the kernel kmsg
* move keymaps to /usr/lib/... rather than /usr/lib/udev/...
* journald: check whether it is OK if the client can still modify delivered journal entries
...
...
@@ -209,8 +207,6 @@ Features:
* journal: hook up with EFI firmware log
* handle C-A-Del in logind, like the power/suspend buttons?
* nspawn: make use of device cgroup contrller by default
* drop accountsservice's StandardOutput=syslog and Type=dbus fields
...
...
@@ -337,8 +333,6 @@ Features:
* journalctl: --cursor support
* systemctl status: show coredumps
* save coredump in Windows/Mozilla minidump format
* support crash reporting operation modes (https://live.gnome.org/GnomeOS/Design/Whiteboards/ProblemReporting)
...
...
src/journal/journal-file.c
View file @
2b43f939
...
...
@@ -490,7 +490,7 @@ static int journal_file_setup_data_hash_table(JournalFile *f) {
if
(
s
<
DEFAULT_DATA_HASH_TABLE_SIZE
)
s
=
DEFAULT_DATA_HASH_TABLE_SIZE
;
log_
info
(
"Reserving %llu entries in hash table."
,
(
unsigned
long
long
)
(
s
/
sizeof
(
HashItem
)));
log_
debug
(
"Reserving %llu entries in hash table."
,
(
unsigned
long
long
)
(
s
/
sizeof
(
HashItem
)));
r
=
journal_file_append_object
(
f
,
OBJECT_DATA_HASH_TABLE
,
...
...
@@ -2386,11 +2386,11 @@ void journal_default_metrics(JournalMetrics *m, int fd) {
m
->
keep_free
=
DEFAULT_KEEP_FREE
;
}
log_
info
(
"Fixed max_use=%s max_size=%s min_size=%s keep_free=%s"
,
format_bytes
(
a
,
sizeof
(
a
),
m
->
max_use
),
format_bytes
(
b
,
sizeof
(
b
),
m
->
max_size
),
format_bytes
(
c
,
sizeof
(
c
),
m
->
min_size
),
format_bytes
(
d
,
sizeof
(
d
),
m
->
keep_free
));
log_
debug
(
"Fixed max_use=%s max_size=%s min_size=%s keep_free=%s"
,
format_bytes
(
a
,
sizeof
(
a
),
m
->
max_use
),
format_bytes
(
b
,
sizeof
(
b
),
m
->
max_size
),
format_bytes
(
c
,
sizeof
(
c
),
m
->
min_size
),
format_bytes
(
d
,
sizeof
(
d
),
m
->
keep_free
));
}
int
journal_file_get_cutoff_realtime_usec
(
JournalFile
*
f
,
usec_t
*
from
,
usec_t
*
to
)
{
...
...
src/journal/journal-vacuum.c
View file @
2b43f939
...
...
@@ -211,7 +211,7 @@ int journal_directory_vacuum(const char *directory, uint64_t max_use, uint64_t m
break
;
if
(
unlinkat
(
dirfd
(
d
),
list
[
i
].
filename
,
0
)
>=
0
)
{
log_
info
(
"Deleted archived journal %s/%s."
,
directory
,
list
[
i
].
filename
);
log_
debug
(
"Deleted archived journal %s/%s."
,
directory
,
list
[
i
].
filename
);
sum
-=
list
[
i
].
usage
;
}
else
if
(
errno
!=
ENOENT
)
log_warning
(
"Failed to delete %s/%s: %m"
,
directory
,
list
[
i
].
filename
);
...
...
src/journal/journald-kmsg.c
View file @
2b43f939
...
...
@@ -359,7 +359,7 @@ int server_flush_dev_kmsg(Server *s) {
if
(
!
s
->
dev_kmsg_readable
)
return
0
;
log_
info
(
"Flushing /dev/kmsg..."
);
log_
debug
(
"Flushing /dev/kmsg..."
);
for
(;;)
{
r
=
server_read_dev_kmsg
(
s
);
...
...
src/journal/journald.c
View file @
2b43f939
...
...
@@ -304,7 +304,7 @@ static void server_rotate(Server *s) {
Iterator
i
;
int
r
;
log_
info
(
"Rotating..."
);
log_
debug
(
"Rotating..."
);
if
(
s
->
runtime_journal
)
{
r
=
journal_file_rotate
(
&
s
->
runtime_journal
,
s
->
compress
,
false
);
...
...
@@ -349,7 +349,7 @@ static void server_vacuum(Server *s) {
sd_id128_t
machine
;
int
r
;
log_
info
(
"Vacuuming..."
);
log_
debug
(
"Vacuuming..."
);
r
=
sd_id128_get_machine
(
&
machine
);
if
(
r
<
0
)
{
...
...
@@ -444,7 +444,7 @@ static void write_to_journal(Server *s, uid_t uid, struct iovec *iovec, unsigned
return
;
if
(
journal_file_rotate_suggested
(
f
))
{
log_
info
(
"Journal header limits reached or header out-of-date, rotating."
);
log_
debug
(
"Journal header limits reached or header out-of-date, rotating."
);
server_rotate
(
s
);
server_vacuum
(
s
);
vacuumed
=
true
;
...
...
@@ -475,11 +475,11 @@ static void write_to_journal(Server *s, uid_t uid, struct iovec *iovec, unsigned
}
if
(
r
==
-
E2BIG
||
r
==
-
EFBIG
||
r
==
EDQUOT
||
r
==
ENOSPC
)
log_
info
(
"Allocation limit reached, rotating."
);
log_
debug
(
"Allocation limit reached, rotating."
);
else
if
(
r
==
-
EHOSTDOWN
)
log_info
(
"Journal file from other machine, rotating."
);
else
if
(
r
==
-
EBUSY
)
log_info
(
"Un
l
cean shutdown, rotating."
);
log_info
(
"Unc
l
ean shutdown, rotating."
);
else
log_warning
(
"Journal file corrupted, rotating."
);
...
...
@@ -491,7 +491,7 @@ static void write_to_journal(Server *s, uid_t uid, struct iovec *iovec, unsigned
if
(
!
f
)
return
;
log_
info
(
"Retrying write."
);
log_
debug
(
"Retrying write."
);
}
}
...
...
@@ -890,7 +890,7 @@ static int server_flush_to_var(Server *s) {
if
(
!
s
->
system_journal
)
return
0
;
log_
info
(
"Flushing to /var..."
);
log_
debug
(
"Flushing to /var..."
);
r
=
sd_id128_get_machine
(
&
machine
);
if
(
r
<
0
)
{
...
...
@@ -918,7 +918,7 @@ static int server_flush_to_var(Server *s) {
r
=
journal_file_copy_entry
(
f
,
s
->
system_journal
,
o
,
f
->
current_offset
,
NULL
,
NULL
,
NULL
);
if
(
r
==
-
E2BIG
)
{
log_
info
(
"Allocation limit reached."
);
log_
debug
(
"Allocation limit reached."
);
journal_file_post_change
(
s
->
system_journal
);
server_rotate
(
s
);
...
...
@@ -954,7 +954,7 @@ static int process_event(Server *s, struct epoll_event *ev) {
ssize_t
n
;
if
(
ev
->
events
!=
EPOLLIN
)
{
log_
info
(
"Got invalid event from epoll."
);
log_
error
(
"Got invalid event from epoll."
);
return
-
EIO
;
}
...
...
@@ -990,7 +990,7 @@ static int process_event(Server *s, struct epoll_event *ev) {
int
r
;
if
(
ev
->
events
!=
EPOLLIN
)
{
log_
info
(
"Got invalid event from epoll."
);
log_
error
(
"Got invalid event from epoll."
);
return
-
EIO
;
}
...
...
@@ -1004,7 +1004,7 @@ static int process_event(Server *s, struct epoll_event *ev) {
ev
->
data
.
fd
==
s
->
syslog_fd
)
{
if
(
ev
->
events
!=
EPOLLIN
)
{
log_
info
(
"Got invalid event from epoll."
);
log_
error
(
"Got invalid event from epoll."
);
return
-
EIO
;
}
...
...
@@ -1132,7 +1132,7 @@ static int process_event(Server *s, struct epoll_event *ev) {
}
else
if
(
ev
->
data
.
fd
==
s
->
stdout_fd
)
{
if
(
ev
->
events
!=
EPOLLIN
)
{
log_
info
(
"Got invalid event from epoll."
);
log_
error
(
"Got invalid event from epoll."
);
return
-
EIO
;
}
...
...
@@ -1143,7 +1143,7 @@ static int process_event(Server *s, struct epoll_event *ev) {
StdoutStream
*
stream
;
if
((
ev
->
events
|
EPOLLIN
|
EPOLLHUP
)
!=
(
EPOLLIN
|
EPOLLHUP
))
{
log_
info
(
"Got invalid event from epoll."
);
log_
error
(
"Got invalid event from epoll."
);
return
-
EIO
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment