Hoi Sauerland1
Vielen Dank fuer den Link. Leider komme ich damit auch nicht wirklich weiter:-(
zu #3 aus dem Link:
/usr/lib/systemd/system/logrotate.service gibt es bei mir und hat folgenden Inhalt:
Code:
[Unit]
Description=Rotate log files
Documentation=man:logrotate(8) man:logrotate.conf(5)
ConditionACPower=true
[Service]
Type=oneshot
ExecStart=/usr/sbin/logrotate /etc/logrotate.conf
Nice=19
IOSchedulingClass=best-effort
IOSchedulingPriority=7
Wenn ich "/usr/sbin/logrotate /etc/logrotate.conf" manuell starte, wird das Logrotate richtig ausgefuehrt. Aber das schrub ich bereits in #1.
Ein "systemctl status logrotate.service" zeigt mir dass der Status "dead" ist. Ein "systemctl start logrotate.service" fuehrt ebenfalls das Logrotate aus. Ein "systemctl enable logrotate.service" bringt folgendes:
Code:
The unit files have no [Install] section. They are not meant to be enabled
using systemctl.
Possible reasons for having this kind of units are:
1) A unit may be statically enabled by being symlinked from another unit's
.wants/ or .requires/ directory.
2) A unit's purpose may be to act as a helper for some other unit which has
a requirement dependency on it.
3) A unit may be started when needed via activation (socket, path, timer,
D-Bus, udev, scripted systemctl call, ...).
zu #3 aus dem Link:
Das File "/var/lib/logrotate.status" zeigt alle Namen der Logfiles und wann sie zuletzt von Logrotate komprimiert wurden. Leider nutzt mir das nicht viel, sondern ist rein informativ.
zu #9:
Das Ergebnis von "systemctl list-timers --all" gibt aus:
Code:
NEXT LEFT UNIT ACTIVATES
Mon 2018-11-12 11:44:46 CET 21h left systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.service
n/a n/a systemd-readahead-done.timer systemd-readahead-done.service
2 timers listed.
zu #10:
Die Maschine, um die es hier geht, ist (m)ein Server im Keller. Und wie der Name impliziert, laeuft diese Kiste 24/7.
Aus alledem schliesse ich, dass irgendetwas bei meinem Server nicht mehr richtig funktioniert. "Frueher" (das letzte Logfile mit Extension "xz" datiert vom Sommer 2017) lief es definitiv noch. Anyway: Da diese Kiste sowieso ersetzt wird, baue ich als work-around das Logrotate als Cronjob ein.
Und uebrigens: Auch der neue Server, der momentan als Stand-by laeuft, hat ebenfalls keinerlei Cronjob-Eintraege. Er funktioniert, aber anscheinend ebenso mit irgenwelchen kruden Mechanismen. Hier sieht es mit dem Timer allerdings besser aus:
Code:
NEXT LEFT LAST PASSED UNIT ACTIVATES
Sun 2018-11-11 21:17:15 CET 6h left Sat 2018-11-10 21:17:15 CET 17h ago systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.service
Mon 2018-11-12 00:00:00 CET 9h left Mon 2018-11-05 00:00:00 CET 6 days ago fstrim.timer fstrim.service
Mon 2018-11-12 00:00:00 CET 9h left Sun 2018-11-11 00:00:00 CET 14h ago logrotate.timer logrotate.service
3 timers listed.
Pass --all to see loaded but inactive timers, too.
Besten Dank fuer Deine Hilfe und Gruss aus Winti
Pit.
Lesezeichen