Nie jesteś zalogowany.
Jeśli nie posiadasz konta, zarejestruj je już teraz! Pozwoli Ci ono w pełni korzystać z naszego serwisu. Spamerom dziękujemy!
Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.
Nie wiem dlaczego ale po ostatnim odlaczeniu energii przez elektrownie przestal dzialac logrotate.. i nie wiem dlaczego tak sie stalo :(
syslog ma ponad 100MB - powoli zaczyna brakowac miejsca na dysku.. a co najgorsze to jak usune mu pliki logow (przeniose) to nie utworzy sam nowych..
oto plik
/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
pliku niemodyfikowalem ..
reczne wywolanie logrotate konczy sie setkami lini bledow :
debian:/home# logrotate -d /etc/logrotate.conf reading config file /etc/logrotate.conf including /etc/logrotate.d reading config file apache reading config info for /var/log/apache/*.log reading config file aptitude reading config info for /var/log/aptitude reading config file base-config reading config info for /var/log/base-config.log reading config info for /var/log/base-config.timings reading config file dirmngr reading config info for /var/log/dirmngr.log reading config file exim4-base reading config info for /var/log/exim4/mainlog /var/log/exim4/rejectlog /var/log/exim4/paniclog reading config file mysql-server reading config info for /var/log/mysql.log /var/log/mysql/mysql.log /var/log/mysql.err /var/log/mysql/mysql.err /var/log/mysql/mysql-slow.log reading config file ppp reading config info for /var/log/ppp-connect-errors reading config file samba reading config info for /var/log/samba/log.smbd reading config info for /var/log/samba/log.nmbd reading config file scrollkeeper reading config info for /var/log/scrollkeeper.log reading config file vsftpd reading config info for /var/log/vsftpd.log reading config info for /var/log/wtmp reading config info for /var/log/btmp Handling 14 logs rotating pattern: /var/log/apache/*.log weekly (52 rotations) empty log files are not rotated, old logs are removed considering log /var/log/apache/access.log log does not need rotating considering log /var/log/apache/error.log log does not need rotating not running shared postrotate script, since no logs were rotated rotating pattern: /var/log/aptitude monthly (6 rotations) empty log files are not rotated, old logs are removed considering log /var/log/aptitude log does not need rotating rotating pattern: /var/log/base-config.log weekly (4 rotations) empty log files are rotated, old logs are removed considering log /var/log/base-config.log log does not need rotating rotating pattern: /var/log/base-config.timings weekly (4 rotations) empty log files are rotated, old logs are removed considering log /var/log/base-config.timings log does not need rotating rotating pattern: /var/log/dirmngr.log weekly (4 rotations) empty log files are not rotated, old logs are removed considering log /var/log/dirmngr.log log does not need rotating rotating pattern: /var/log/exim4/mainlog /var/log/exim4/rejectlog /var/log/exim4/paniclog after 1 days (10 rotations) empty log files are not rotated, old logs are removed considering log /var/log/exim4/mainlog log /var/log/exim4/mainlog does not exist -- skipping considering log /var/log/exim4/rejectlog log /var/log/exim4/rejectlog does not exist -- skipping considering log /var/log/exim4/paniclog log /var/log/exim4/paniclog does not exist -- skipping rotating pattern: /var/log/mysql.log /var/log/mysql/mysql.log /var/log/mysql.err /var/log/mysql/mysql.err /var/log/mysql/mysql-slow.log after 1 days (7 rotations) empty log files are rotated, old logs are removed considering log /var/log/mysql.log log needs rotating considering log /var/log/mysql/mysql.log log /var/log/mysql/mysql.log does not exist -- skipping considering log /var/log/mysql.err log needs rotating considering log /var/log/mysql/mysql.err log /var/log/mysql/mysql.err does not exist -- skipping considering log /var/log/mysql/mysql-slow.log log /var/log/mysql/mysql-slow.log does not exist -- skipping rotating log /var/log/mysql.log, log->rotateCount is 7 renaming /var/log/mysql.log.7.gz to /var/log/mysql.log.8.gz (rotatecount 7, logstart 1, i 7), renaming /var/log/mysql.log.6.gz to /var/log/mysql.log.7.gz (rotatecount 7, logstart 1, i 6), renaming /var/log/mysql.log.5.gz to /var/log/mysql.log.6.gz (rotatecount 7, logstart 1, i 5), renaming /var/log/mysql.log.4.gz to /var/log/mysql.log.5.gz (rotatecount 7, logstart 1, i 4), renaming /var/log/mysql.log.3.gz to /var/log/mysql.log.4.gz (rotatecount 7, logstart 1, i 3), renaming /var/log/mysql.log.2.gz to /var/log/mysql.log.3.gz (rotatecount 7, logstart 1, i 2), renaming /var/log/mysql.log.1.gz to /var/log/mysql.log.2.gz (rotatecount 7, logstart 1, i 1), renaming /var/log/mysql.log.0.gz to /var/log/mysql.log.1.gz (rotatecount 7, logstart 1, i 0), renaming /var/log/mysql.log to /var/log/mysql.log.1 creating new log mode = 0640 uid = 106 gid = 4 error: unable to open /var/log/mysql.log.1 for compression rotating log /var/log/mysql.err, log->rotateCount is 7 renaming /var/log/mysql.err.7.gz to /var/log/mysql.err.8.gz (rotatecount 7, logstart 1, i 7), renaming /var/log/mysql.err.6.gz to /var/log/mysql.err.7.gz (rotatecount 7, logstart 1, i 6), renaming /var/log/mysql.err.5.gz to /var/log/mysql.err.6.gz (rotatecount 7, logstart 1, i 5), renaming /var/log/mysql.err.4.gz to /var/log/mysql.err.5.gz (rotatecount 7, logstart 1, i 4), renaming /var/log/mysql.err.3.gz to /var/log/mysql.err.4.gz (rotatecount 7, logstart 1, i 3), renaming /var/log/mysql.err.2.gz to /var/log/mysql.err.3.gz (rotatecount 7, logstart 1, i 2), renaming /var/log/mysql.err.1.gz to /var/log/mysql.err.2.gz (rotatecount 7, logstart 1, i 1), renaming /var/log/mysql.err.0.gz to /var/log/mysql.err.1.gz (rotatecount 7, logstart 1, i 0), renaming /var/log/mysql.err to /var/log/mysql.err.1 creating new log mode = 0640 uid = 106 gid = 4 error: unable to open /var/log/mysql.err.1 for compression running shared postrotate script running script with arg /var/log/mysql.log /var/log/mysql/mysql.log /var/log/mysql.err /var/log/mysql/mysql.err /var/log/mysql/mysql-slow.log : " test -x /usr/bin/mysqladmin || exit 0 # If this fails, check debian.conf! export HOME=/etc/mysql/my.cnf MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf" if [ -z "`$MYADMIN ping 2>/dev/null`" ]; then # Really no mysqld or rather a missing debian-sys-maint user? # If this occurs and is not a error please report a bug. if ps cax | grep -q mysqld; then exit 1 fi else $MYADMIN flush-logs fi errlogs=`ls /var/log/mysql.err* /var/log/mysql/mysql.err* 2>/dev/null` if [ -n "$errlogs" ]; then chown root:adm $errlogs chmod 640 $errlogs fi " rotating pattern: /var/log/ppp-connect-errors weekly (4 rotations) empty log files are not rotated, old logs are removed considering log /var/log/ppp-connect-errors log /var/log/ppp-connect-errors does not exist -- skipping rotating pattern: /var/log/samba/log.smbd weekly (7 rotations) empty log files are not rotated, old logs are removed considering log /var/log/samba/log.smbd log does not need rotating rotating pattern: /var/log/samba/log.nmbd weekly (7 rotations) empty log files are not rotated, old logs are removed considering log /var/log/samba/log.nmbd log does not need rotating rotating pattern: /var/log/scrollkeeper.log weekly (2 rotations) empty log files are rotated, old logs are removed considering log /var/log/scrollkeeper.log log does not need rotating rotating pattern: /var/log/vsftpd.log weekly (4 rotations) empty log files are not rotated, old logs are removed considering log /var/log/vsftpd.log log does not need rotating rotating pattern: /var/log/wtmp monthly (1 rotations) empty log files are rotated, old logs are removed considering log /var/log/wtmp log does not need rotating rotating pattern: /var/log/btmp monthly (1 rotations) empty log files are rotated, old logs are removed considering log /var/log/btmp log does not need rotating
uruchomie go z opcja -f rowniez nic nie pomaga :(
W cronie jest wywolany rowniez (ale to nic nie daje poniewaz i tak nie dziala)
/etc/cron.daily/logrotate
a w nim
/usr/sbin/lograte /etc/logrotate.conf
komp odpalony 24h/d wiec rotacja powinna byc a jej nie ma
ma ktos jakis pomysl?
Offline
a najdziwniejsze jest to ze nie moge podminic plikow z logiem samemu np:
zmieniam nazwe z syslog na syslog.1 i tworze pusty plik syslog (takie same chmod i chown ) ale juz w nowy plik nie chce zapisywac :(
Offline
a najdziwniejsze jest to ze nie moge podminic plikow z logiem samemu np:
zmieniam nazwe z syslog na syslog.1 i tworze pusty plik syslog (takie same chmod i chown ) ale juz w nowy plik nie chce zapisywac :(
a restartujesz po takiej operacji serwer logow ?
Offline
tak
/etc/init.d/syslogd restart chyba wystarczy?
Offline
powinno wystarczyc ... ale moze zamiast tego zatrzymaj syslog'a i odpal go na razie z palca z opcja -d i zobacz co wypisze ...
Offline
Odpalilem z 'palca' wypisal ze tworzy pliki logow (bo je usnalem recznie) (sprawdzilem i utworzyl) pochodzil chwile i wpisuje w logi.. wiec zatrzymalem i odpalilem przez init.d i teraz dziala! Nie wiem co go gryzlo ;/
ciekawe czy logrotate ruszy :/
Offline