Hilfe die Log-Dateien wachsen und wachsen!

don pedro

New Member
Hallo,
habe festgestellt, dass auf meinem V-Server die Log-Dateien immer grösser werden, und werden auch nicht rotiert. Auf dem Server läuft Ubuntu, und habe folgendes im Wiki gefunden:
"Um genau zu sein, wird syslog nicht von Logrotate gepackt, sondern von einem Cronjob (sysklogd unter /etc/cron.daily/ bzw. /etc/cron.weekly/). Dies betrifft auch andere Dateien wie z. B. auth.log. Eine vollständige Liste kann man sich mit dem Befehl syslogd-listfiles -a [3] anzeigen lassen."

Hier meine vollständige Liste:
/var/log/mail.warn
/var/log/user.log
/var/log/daemon.log
/var/log/messages
/var/log/debug
/var/log/auth.log
/var/log/mail.err
/var/log/syslog
/opt/psa/var/log/maillog
/var/log/kern.log
/var/log/lpr.log
/var/log/mail.info

Das Problem ist eben, dass die o.g. Log-Dateien ständig wachsen.
Kann mir jemand aus der Klemme helfen?

Für Eure Antwort danke im Voraus.

Netter Gruß
Don Pedro
 
Ja, und was steht nun in
/etc/logrotate.conf
und
/etc/logrotate.d/rsyslog
und
/etc/cron.daily/logrotate
drin?
 
Last edited by a moderator:
Hallo,
also der Inhalt von /etc/logrotate.conf :
# see "man logrotate" for details
# rotate log files weekly
weekly

# keep 4 weeks worth of backlogs
rotate 4

# create new (empty) log files after rotating old ones
create

# uncomment this if you want your log files compressed
#compress

# packages drop log rotation information into this directory
include /etc/logrotate.d

# no packages own wtmp, or btmp -- we'll rotate them here
/var/log/wtmp {
missingok
monthly
create 0664 root utmp
rotate 1
}

/var/log/btmp {
missingok
monthly
create 0664 root utmp
rotate 1
}

# system-specific logs may be configured here

der Inhalt von /etc/logrotate.d/rsyslog: die Datei ist hier nicht vorhanden!

der Inhalt von /etc/cron.daily/logrotate:
#!/bin/sh

test -x /usr/sbin/logrotate || exit 0
/usr/sbin/logrotate /etc/logrotate.conf


Bitte um weitere Hilfe.

Gruß
Don Pedro
 
Hallo,
rsyslog.conf ist hier nicht vorhanden sondern syslog.conf. Hier der Inhalt:
Code:
#  /etc/syslog.conf	Configuration file for syslogd.
#
#			For more information see syslog.conf(5)
#			manpage.

#
# First some standard logfiles.  Log by facility.
#

auth,authpriv.*		 -/var/log/auth.log
*.*;auth,authpriv.none		-/var/log/syslog
#cron.*			 -/var/log/cron.log
daemon.*			-/var/log/daemon.log
kern.*				-/var/log/kern.log
lpr.*				-/var/log/lpr.log
mail.*						-/opt/psa/var/log/maillog
user.*				-/var/log/user.log

#
# Logging for the mail system.  Split it up so that
# it is easy to write scripts to parse these files.
#
mail.info			-/var/log/mail.info
mail.warn			-/var/log/mail.warn
mail.err		 -/var/log/mail.err

# Logging for INN news system
#
news.crit		 -/var/log/news/news.crit
news.err		 -/var/log/news/news.err
news.notice			-/var/log/news/news.notice

#
# Some `catch-all' logfiles.
#
*.=debug;\
	auth,authpriv.none;\
	news.none;mail.none	-/var/log/debug
*.=info;*.=notice;*.=warn;\
	auth,authpriv.none;\
	cron,daemon.none;\
	mail,news.none		-/var/log/messages

#
# Emergencies are sent to everybody logged in.
#
*.emerg				*

#
# I like to have messages displayed on the console, but only on a virtual
# console I usually leave idle.
#
#daemon,mail.*;\
#	news.=crit;news.=err;news.=notice;\
#	*.=debug;*.=info;\
#	*.=notice;*.=warn	/dev/tty8

# The named pipe /dev/xconsole is for the `xconsole' utility.  To use it,
# you must invoke `xconsole' with the `-file' option:
# 
#    $ xconsole -file /dev/xconsole [...]
#
# NOTE: adjust the list below, or you'll go crazy if you have a reasonably
#      busy site..
#
daemon.*;mail.*;\
	news.err;\
	*.=debug;*.=info;\
	*.=notice;*.=warn	|/dev/xconsole
bitte um weitere Hilfe.
 
Last edited by a moderator:
Ich weiß nur, dass es vor längerer Zeit in irgendeiner alten Version von Ubuntu Probleme beim Rotieren gab und soweit ich weiß, unterstützen aktuelle Ubuntu-Versionen sysklogd nicht mehr.
Ist dein Ubuntu älter?
 
leider bin ich im Ubuntu kein Fachmann, und die Skripts sind mir etwas unverständlich. Könntest Du vielleicht mir das Schritt für Schritt erklären was da auf der Link-Seite beschrieben ist.
Für Deine Hilfe bedanke ich mich recht herzlich im Voraus.
 
Ich bin auch kein "Fachmann" und habe trotzdem meine Logs im Griff. So schwer ist die Synthax nicht. Fragen ist nicht verboten, aber man sollte nicht erwarten, dass Andere für einen die Arbeit machen. Purge einfach mal dieses sysklogd, und installiere rsyslog. Dann sollten sich deine Probleme von selbst lösen. Besser ist aber wahrscheinlich, nächstes Jahr mit 12.04 neu anzufangen, oder gleich auf Debian Squeeze umzusteigen. Hardy ist nun wirklich schon recht alt.
 
Last edited by a moderator:
hallo,
danke für Deinen Tipp, aber möchte noch fragen ob ich das richtig verstehe:
kann ich so einfach dieses sysklogd löschen? :confused:Und was genau wird nach der Installation von rsyslog passieren, da sich meine Probleme von selbst lösen werden?:confused:
Für Deine Antwort bedanke ich mich im Voraus.

Gruß
Don Pedro
 
Du installierst dadurch ein anderes Syslog-Programm. rsyslog ist Standard bei aktuellen Ubuntu- und Debian-Versionen, und macht das gleiche, was zur Zeit sysklogd bei dir macht, nur besser. Zusammen mit dem Paket werden auch die richtigen Konfigurationsdateien für logrotate installiert, denn rsyslog braucht keine Extrawürste.
 
Back
Top