A
A
Alexey2019-10-03 21:56:39
linux
Alexey, 2019-10-03 21:56:39

Why are logs output to *.log.1 files?

For some reason, all the main log files (auth.log, syslog, etc.) are always empty, and the logs are displayed in auth.log.1, syslog.1
Who is to blame and what to do?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Developer, 2019-10-03
@samodum

auth.log and others are active, open files that are currently being logged. At a certain point in time, this file is closed and renamed to auth.log.1, available for analysis, and a new auth.log is created

A
Alexey Dmitriev, 2019-10-04
@SignFinder

Because logrotate renames the logs and after that it must issue a command to the service so that it starts writing logs to a new file. But this does not happen and the service continues to write logs to the old file even after renaming it.
Dig into /etc/logrotate.d

K
ky0, 2019-10-04
@ky0

Wang some kind of bad with file descriptors. Something like "the active log is renamed and only then a new one is created, so the sending process both sent to that fd and sends it."

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question