Hallo liebe Forengemeinde,
jetzt nach über 2 Tagen ist es nun an der Zeit mir Hilfe zu holen weil ich mir mit dem einen und anderen Problem nicht selbst zu helfen weiß.
Es gibt ja die Cron Ordner im /etc Verzeichnis „cron.daily, cron.hourly, cron.monthly, cron.weekly“.
Dann gibt es die Globale crontab bei mir im /etc. In dieser steht nicht mehr drin als wie nachfolgend gezeigt:
Es existieren keine Benutzer eigene crontabs, noch nicht. Doch jeden Tag genau um 12 Uhr Mittags, laufen alle Skripte im Ordner „Cron-Daily“ durch und ich wüsste gerne wo genau der default Wert „12 Uhr“ festgelegt wurde.
Ein weiteres Problem, der eigentliche Grund warum ich hier schreibe ist das leidige Thema Logrotate. Es arbeitet, es Rotiert und hat den Anschein das es funktionieren würde. Und doch habe ich ein Problem mit Logrotate und oder mit Apache.
Nach dem Logrotate funktioniert das Logging nicht mehr richtig. Während für den ersten Vhost weiterhin aufgezeichnet wird, verstummen die Logdateien für die restlichen Vhost’s Dateien. Erst wenn ich manuell ein Apache reload starte, wird in den Log Dateien wieder reingeschrieben. Ich weiß mir da nicht mehr weiter, vermute aber das die Abarbeitung so wie Sie mir Suse vorgegeben hat, nicht anwendbar für mehrere Vhost sind.
Vielleicht kann mir hier jemand helfen....ich danke schon mal im vorraus.
Nachfolgend nun die Ausgabe aus "logrotate -d /etc/logrotate.conf" und die Vhost aus dem Verzeichnis "logrotate.d"
Liebe Grüße
peavey
jetzt nach über 2 Tagen ist es nun an der Zeit mir Hilfe zu holen weil ich mir mit dem einen und anderen Problem nicht selbst zu helfen weiß.
Es gibt ja die Cron Ordner im /etc Verzeichnis „cron.daily, cron.hourly, cron.monthly, cron.weekly“.
Dann gibt es die Globale crontab bei mir im /etc. In dieser steht nicht mehr drin als wie nachfolgend gezeigt:
Code:
SHELL=/bin/sh
PATH=/usr/bin:/usr/sbin:/sbin:/bin:/usr/lib/news/bin
MAILTO=root
#
# check scripts in cron.hourly, cron.daily, cron.weekly, and cron.monthly
#
-*/44 * * * * root test -x /usr/lib/cron/run-crons && /usr/lib/cron/run-crons >/dev/null 2>&1
Es existieren keine Benutzer eigene crontabs, noch nicht. Doch jeden Tag genau um 12 Uhr Mittags, laufen alle Skripte im Ordner „Cron-Daily“ durch und ich wüsste gerne wo genau der default Wert „12 Uhr“ festgelegt wurde.
Ein weiteres Problem, der eigentliche Grund warum ich hier schreibe ist das leidige Thema Logrotate. Es arbeitet, es Rotiert und hat den Anschein das es funktionieren würde. Und doch habe ich ein Problem mit Logrotate und oder mit Apache.
Nach dem Logrotate funktioniert das Logging nicht mehr richtig. Während für den ersten Vhost weiterhin aufgezeichnet wird, verstummen die Logdateien für die restlichen Vhost’s Dateien. Erst wenn ich manuell ein Apache reload starte, wird in den Log Dateien wieder reingeschrieben. Ich weiß mir da nicht mehr weiter, vermute aber das die Abarbeitung so wie Sie mir Suse vorgegeben hat, nicht anwendbar für mehrere Vhost sind.
Vielleicht kann mir hier jemand helfen....ich danke schon mal im vorraus.
Nachfolgend nun die Ausgabe aus "logrotate -d /etc/logrotate.conf" und die Vhost aus dem Verzeichnis "logrotate.d"
Code:
logrotate -d
ww2td:~ # logrotate -d /etc/logrotate.conf
reading config file /etc/logrotate.conf
including /etc/logrotate.d
reading config file apache2
reading config info for /var/log/apache2/access_log
reading config info for /var/log/apache2/error_log
reading config info for /var/log/apache2/suexec.log
reading config info for /var/log/apache2/ssl_request_log
reading config info for /var/log/apache2/ssl_engine_log
reading config file fetchmail
reading config info for /var/log/fetchmail
reading config file myapache2
reading config info for /srv/www/htdocs/vhost1/logs/access_log
reading config info for /srv/www/htdocs/vhost1/logs/error_log
reading config info for /srv/www/htdocs/vhost2/logs/access_log
reading config info for /srv/www/htdocs/vhost2/logs/error_log
reading config info for /srv/www/htdocs/vhost3/logs/access_log
reading config info for /srv/www/htdocs/vhost3/logs/error_log
reading config file mysql
reading config info for /var/lib/mysql/mysqld.log
reading config file net-snmp
reading config info for /var/log/net-snmpd.log
reading config file ntp
reading config info for /var/log/ntp
reading config file rsync
reading config info for /var/log/rsyncd.log
reading config file samba
reading config info for /var/log/samba/log.nmbd
reading config info for /var/log/samba/log.smbd
reading config file syslog
reading config info for /var/log/warn /var/log/messages /var/log/allmessages /var/log/localmessages /var/log/firewall /var/log/acpid /var/log/NetworkManager
reading config info for /var/log/mail /var/log/mail.info /var/log/mail.warn /var/log/mail.err
reading config info for /var/log/news/news.crit /var/log/news/news.err /var/log/news/news.notice
reading config file wtmp
reading config info for /var/log/wtmp
reading config file xdm
reading config info for /var/log/xdm.errors
reading config file xinetd
reading config info for /var/log/xinetd.log
reading config file zypper.lr
reading config info for /var/log/zypper.log
reading config file zypp-history.lr
reading config info for /var/log/zypp/history
reading config file zypp-refresh.lr
reading config info for /var/log/zypp-refresh.log
compress_prog is now /usr/bin/bzip2
compress_ext was changed to .bz2
uncompress_prog is now /usr/bin/bunzip2
Handling 27 logs
rotating pattern: /var/log/apache2/access_log 4194304 bytes (99 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/apache2/access_log
log does not need rotating
not running postrotate script, since no logs were rotated
rotating pattern: /var/log/apache2/error_log after 1 days (99 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/apache2/error_log
log does not need rotating
not running postrotate script, since no logs were rotated
rotating pattern: /var/log/apache2/suexec.log 1048576 bytes (99 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/apache2/suexec.log
log /var/log/apache2/suexec.log does not exist -- skipping
not running postrotate script, since no logs were rotated
rotating pattern: /var/log/apache2/ssl_request_log 4194304 bytes (99 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/apache2/ssl_request_log
log /var/log/apache2/ssl_request_log does not exist -- skipping
not running postrotate script, since no logs were rotated
rotating pattern: /var/log/apache2/ssl_engine_log 1048576 bytes (99 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/apache2/ssl_engine_log
log /var/log/apache2/ssl_engine_log does not exist -- skipping
not running postrotate script, since no logs were rotated
rotating pattern: /var/log/fetchmail 1048576 bytes (99 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/fetchmail
log does not need rotating
rotating pattern: /srv/www/htdocs/vhost1/logs/access_log after 1 days (99 rotations)
empty log files are rotated, old logs are removed
considering log /srv/www/htdocs/vhost1/logs/access_log
log does not need rotating
not running postrotate script, since no logs were rotated
rotating pattern: /srv/www/htdocs/vhost1/logs/error_log after 1 days (99 rotations)
empty log files are rotated, old logs are removed
considering log /srv/www/htdocs/vhost1/logs/error_log
log does not need rotating
not running postrotate script, since no logs were rotated
rotating pattern: /srv/www/htdocs/vhost2/logs/access_log after 1 days (99 rotations)
empty log files are rotated, old logs are removed
considering log /srv/www/htdocs/vhost2/logs/access_log
log does not need rotating
not running postrotate script, since no logs were rotated
rotating pattern: /srv/www/htdocs/vhost2/logs/error_log after 1 days (99 rotations)
empty log files are rotated, old logs are removed
considering log /srv/www/doc/wr071ed2/logs/error_log
log does not need rotating
not running postrotate script, since no logs were rotated
rotating pattern: /srv/www/htdocs/vhost3/logs/access_log after 1 days (99 rotations)
empty log files are rotated, old logs are removed
considering log /srv/www/htdocs/vhost3/logs/access_log
log does not need rotating
not running postrotate script, since no logs were rotated
rotating pattern: /srv/www/htdocs/vhost3/logs/error_log after 1 days (99 rotations)
empty log files are rotated, old logs are removed
considering log /srv/www/htdocs/vhost3/logs/error_log
log does not need rotating
not running postrotate script, since no logs were rotated
rotating pattern: /var/lib/mysql/mysqld.log after 1 days (3 rotations)
empty log files are not rotated, old logs are removed
considering log /var/lib/mysql/mysqld.log
log does not need rotating
not running postrotate script, since no logs were rotated
rotating pattern: /var/log/net-snmpd.log 1048576 bytes (99 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/net-snmpd.log
log /var/log/net-snmpd.log does not exist -- skipping
not running postrotate script, since no logs were rotated
rotating pattern: /var/log/ntp 2097152 bytes (99 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/ntp
log does not need rotating
not running postrotate script, since no logs were rotated
rotating pattern: /var/log/rsyncd.log 1048576 bytes (99 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/rsyncd.log
log /var/log/rsyncd.log does not exist -- skipping
rotating pattern: /var/log/samba/log.nmbd 1048576 bytes (99 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/samba/log.nmbd
log /var/log/samba/log.nmbd does not exist -- skipping
rotating pattern: /var/log/samba/log.smbd 1048576 bytes (99 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/samba/log.smbd
log /var/log/samba/log.smbd does not exist -- skipping
rotating pattern: /var/log/warn /var/log/messages /var/log/allmessages /var/log/localmessages /var/log/firewall /var/log/acpid /var/log/NetworkManager 4194304 bytes (99 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/warn
log does not need rotating
considering log /var/log/messages
log does not need rotating
considering log /var/log/allmessages
log /var/log/allmessages does not exist -- skipping
considering log /var/log/localmessages
log does not need rotating
considering log /var/log/firewall
log does not need rotating
considering log /var/log/acpid
log does not need rotating
considering log /var/log/NetworkManager
log does not need rotating
not running postrotate script, since no logs were rotated
rotating pattern: /var/log/mail /var/log/mail.info /var/log/mail.warn /var/log/mail.err 4194304 bytes (99 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/mail
log does not need rotating
considering log /var/log/mail.info
log does not need rotating
considering log /var/log/mail.warn
log does not need rotating
considering log /var/log/mail.err
log does not need rotating
not running postrotate script, since no logs were rotated
rotating pattern: /var/log/news/news.crit /var/log/news/news.err /var/log/news/news.notice 4194304 bytes (99 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/news/news.crit
log does not need rotating
considering log /var/log/news/news.err
log does not need rotating
considering log /var/log/news/news.notice
log does not need rotating
not running postrotate script, since no logs were rotated
rotating pattern: /var/log/wtmp 409600 bytes (99 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/wtmp
log does not need rotating
rotating pattern: /var/log/xdm.errors 4194304 bytes (99 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/xdm.errors
log /var/log/xdm.errors does not exist -- skipping
rotating pattern: /var/log/xinetd.log 2097152 bytes (99 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/xinetd.log
log /var/log/xinetd.log does not exist -- skipping
not running postrotate script, since no logs were rotated
rotating pattern: /var/log/zypper.log 10485760 bytes (99 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/zypper.log
log does not need rotating
rotating pattern: /var/log/zypp/history 10485760 bytes (99 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/zypp/history
log does not need rotating
rotating pattern: /var/log/zypp-refresh.log 10485760 bytes (99 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/zypp-refresh.log
log /var/log/zypp-refresh.log does not exist -- skipping
Code:
logrotate Vhost 1-3
/srv/www/htdocs/vhost1/logs/access_log {
compress
daily
dateext
maxage 365
rotate 99
missingok
create 644 root root
postrotate
/etc/init.d/apache2 reload
endscript
}
/srv/www/htdocs/vhost1/logs/error_log {
compress
daily
dateext
maxage 365
rotate 99
missingok
create 644 root root
postrotate
/etc/init.d/apache2 reload
endscript
}
/srv/www/htdocs/vhost2/logs/access_log {
compress
daily
dateext
maxage 365
rotate 99
missingok
create 644 root root
postrotate
/etc/init.d/apache2 reload
endscript
}
/srv/www/htdocs/vhost2/logs/error_log {
compress
daily
dateext
maxage 365
rotate 99
missingok
create 644 root root
postrotate
/etc/init.d/apache2 reload
endscript
}
/srv/www/htdocs/vhost3/logs/access_log {
compress
daily
dateext
maxage 365
rotate 99
missingok
create 644 root root
postrotate
/etc/init.d/apache2 reload
endscript
}
/srv/www/htdocs/vhost3/logs/error_log {
compress
daily
dateext
maxage 365
rotate 99
missingok
create 644 root root
postrotate
/etc/init.d/apache2 reload
endscript
}
Liebe Grüße
peavey