Freesco, NND, CDN, EOS
http://forum.freesco.pl/

problem z syslogd
http://forum.freesco.pl/viewtopic.php?f=22&t=16997
Strona 1 z 1

Autor:  Luc3k [ wtorek, 24 czerwca 2008, 21:10 ]
Tytuł:  problem z syslogd

Od pewnego czasu zauważyłem, że logi tworzą mi się w jednym pliku. Nie jak to miało miejsce wcześniej np. messages.1,2,3
Gdzie jest haczyk?
Tak u mnie wygląda logrotate.conf:
: [/] [] ()
# see "man logrotate" for details
# rotate log files weekly
daily

# keep 7 days worth of backlogs
rotate 14

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

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

# Logs are moved into directory for rotation
# olddir /var/log/archive

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


/var/log/wtmp {
    monthly
    create 0664 root root
    rotate 1
}


Od momentu kiedy zmieniłem rotate 7 na rotate 14 tak właśnie się logi zapisują.

Autor:  qrak [ środa, 25 czerwca 2008, 08:23 ]
Tytuł: 

Pokaż wynik polecenia
: [/] [] ()
/usr/sbin/logrotate -d /etc/logrotate.conf

Autor:  Luc3k [ czwartek, 26 czerwca 2008, 12:40 ]
Tytuł: 

Sporo tego:
: [/] [] ()
[root@Alpha etc]# /usr/sbin/logrotate -d /etc/logrotate.conf
reading config file /etc/logrotate.conf
olddir is now /var/log/archive
including /etc/logrotate.d
reading config file crond
reading config info for /var/log/crond
reading config file cups
reading config info for /var/log/cups/*log
reading config file httpd
reading config info for /var/log/httpd/*log
reading config file samba
reading config info for /var/log/samba/*.log
reading config file syslog
reading config info for /var/log/messages /var/log/auth /var/log/mail /var/log/errors /var/log/kernel
reading config info for /var/log/wtmp

Handling 6 logs

rotating pattern: /var/log/crond  after 1 days (14 rotations)
olddir is /var/log/archive, empty log files are rotated, old logs are removed
considering log /var/log/crond
  log does not need rotating

rotating pattern: /var/log/cups/*log  after 1 days (14 rotations)
olddir is /var/log/archive, empty log files are not rotated, old logs are removed
considering log /var/log/cups/*log
  log /var/log/cups/*log does not exist -- skipping

rotating pattern: /var/log/httpd/*log  after 1 days (14 rotations)
olddir is /var/log/archive, empty log files are rotated, old logs are removed
considering log /var/log/httpd/access_log
  log does not need rotating
considering log /var/log/httpd/error_log
  log does not need rotating
considering log /var/log/httpd/ssl_request_log
  log does not need rotating

rotating pattern: /var/log/samba/*.log  after 1 days (14 rotations)
olddir is /var/log/archive, empty log files are not rotated, old logs are removed
considering log /var/log/samba/*.log
  log /var/log/samba/*.log does not exist -- skipping
not running shared postrotate script, since no logs were rotated

rotating pattern: /var/log/messages /var/log/auth /var/log/mail /var/log/errors /var/log/kernel  after 1 days (14 rotations)
olddir is /var/log/archive, empty log files are rotated, old logs are removed
considering log /var/log/messages
  log does not need rotating
considering log /var/log/auth
  log does not need rotating
considering log /var/log/mail
  log does not need rotating
considering log /var/log/errors
  log does not need rotating
considering log /var/log/kernel
  log does not need rotating
not running shared postrotate script, since no logs were rotated

rotating pattern: /var/log/wtmp  monthly (1 rotations)
olddir is /var/log/archive, empty log files are rotated, old logs are removed
considering log /var/log/wtmp
  log does not need rotating


Autor:  qrak [ czwartek, 26 czerwca 2008, 14:27 ]
Tytuł: 

Wszystko wygląda ok.
Logi z poprzednich 14 dni znajdują się w /var/log/archive

Autor:  Luc3k [ czwartek, 26 czerwca 2008, 17:51 ]
Tytuł: 

Ściągnąłem configi z innego serwera, przerestartowałem klog-a i syslog-a i wygląda, że na razie jest wszystko w porządku. Faktycznie zaczął robić logi w archiwe.

Podobny, a właściwie identyczny problem mam na jeszcze innym serwerze. Ten dla odmiany po poleceniu:
: [/] [] ()
/usr/sbin/logrotate -d /etc/logrotate.conf

wypluwa coś takiego:
: [/] [] ()
[root@Lan14 log]# /usr/sbin/logrotate -d /etc/logrotate.conf
reading config file /etc/logrotate.conf
including /etc/logrotate.d
reading config file crond
reading config info for /var/log/crond
reading config file cups
reading config info for /var/log/cups/*log
reading config file cups.pacsave
error: cups.pacsave:1 duplicate log entry for /var/log/cups/*log


Autor:  qrak [ czwartek, 26 czerwca 2008, 19:51 ]
Tytuł: 

usuń plik cups.pacsave z katalogu /etc/logrotate.d (inne pliki .pacsave też, jeśli tam są)

Autor:  Luc3k [ czwartek, 26 czerwca 2008, 21:41 ]
Tytuł: 

Po usunięciu restartować klog-a i syslog-a?

Autor:  qrak [ czwartek, 26 czerwca 2008, 23:45 ]
Tytuł: 

Nie jest to konieczne

Autor:  Luc3k [ niedziela, 29 czerwca 2008, 10:54 ]
Tytuł: 

Hmm, teraz w ogóle logi się nie tworzą :-)

Autor:  qrak [ niedziela, 29 czerwca 2008, 10:58 ]
Tytuł: 

to jeszcze raz pokaż wynik polecenia
: [/] [] ()
/usr/sbin/logrotate -d /etc/logrotate.conf

Autor:  Luc3k [ niedziela, 29 czerwca 2008, 11:44 ]
Tytuł: 

: [/] [] ()
[root@Lan14 log]# /usr/sbin/logrotate -d /etc/logrotate.conf
reading config file /etc/logrotate.conf
including /etc/logrotate.d
reading config file crond
reading config info for /var/log/crond
reading config file cups
reading config info for /var/log/cups/*log
reading config file exim
reading config info for /var/log/exim/*log
reading config file httpd
reading config info for /var/log/httpd/*log
reading config file samba
error: error accessing /var/log/samba: No such file or directory
error: samba:1 glob failed for /var/log/samba/*.log


Tutaj mamy chochlika. Nie było takiej ścieżki /var/log/samba/
Stworzyłem taki katalog i po jego utworzeniu chyba jest wszystko w normie:
: [/] [] ()
[root@Lan14 log]# /usr/sbin/logrotate -d /etc/logrotate.conf
reading config file /etc/logrotate.conf
including /etc/logrotate.d
reading config file crond
reading config info for /var/log/crond
reading config file cups
reading config info for /var/log/cups/*log
reading config file exim
reading config info for /var/log/exim/*log
reading config file httpd
reading config info for /var/log/httpd/*log
reading config file samba
reading config info for /var/log/samba/*.log
reading config file syslog
reading config info for /var/log/messages /var/log/auth /var/log/mail /var/log/errors /var/log/kernel
reading config info for /var/log/wtmp

Handling 7 logs

rotating pattern: /var/log/crond  after 1 days (14 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/crond
  log /var/log/crond does not exist -- skipping

rotating pattern: /var/log/cups/*log  after 1 days (14 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/cups/*log
  log /var/log/cups/*log does not exist -- skipping

rotating pattern: /var/log/exim/*log  after 1 days (14 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/exim/mainlog
  log needs rotating
considering log /var/log/exim/paniclog
  log needs rotating
considering log /var/log/exim/rejectlog
  log needs rotating
rotating log /var/log/exim/mainlog
renaming /var/log/exim/mainlog.15 to /var/log/exim/mainlog.15 (rotatecount 14, logstart 1, i 15),
renaming /var/log/exim/mainlog.14 to /var/log/exim/mainlog.15 (rotatecount 14, logstart 1, i 14),
renaming /var/log/exim/mainlog.13 to /var/log/exim/mainlog.14 (rotatecount 14, logstart 1, i 13),
renaming /var/log/exim/mainlog.12 to /var/log/exim/mainlog.13 (rotatecount 14, logstart 1, i 12),
renaming /var/log/exim/mainlog.11 to /var/log/exim/mainlog.12 (rotatecount 14, logstart 1, i 11),
renaming /var/log/exim/mainlog.10 to /var/log/exim/mainlog.11 (rotatecount 14, logstart 1, i 10),
renaming /var/log/exim/mainlog.9 to /var/log/exim/mainlog.10 (rotatecount 14, logstart 1, i 9),
renaming /var/log/exim/mainlog.8 to /var/log/exim/mainlog.9 (rotatecount 14, logstart 1, i 8),
renaming /var/log/exim/mainlog.7 to /var/log/exim/mainlog.8 (rotatecount 14, logstart 1, i 7),
renaming /var/log/exim/mainlog.6 to /var/log/exim/mainlog.7 (rotatecount 14, logstart 1, i 6),
renaming /var/log/exim/mainlog.5 to /var/log/exim/mainlog.6 (rotatecount 14, logstart 1, i 5),
renaming /var/log/exim/mainlog.4 to /var/log/exim/mainlog.5 (rotatecount 14, logstart 1, i 4),
renaming /var/log/exim/mainlog.3 to /var/log/exim/mainlog.4 (rotatecount 14, logstart 1, i 3),
renaming /var/log/exim/mainlog.2 to /var/log/exim/mainlog.3 (rotatecount 14, logstart 1, i 2),
renaming /var/log/exim/mainlog.1 to /var/log/exim/mainlog.2 (rotatecount 14, logstart 1, i 1),
renaming /var/log/exim/mainlog.0 to /var/log/exim/mainlog.1 (rotatecount 14, logstart 1, i 0),
renaming /var/log/exim/mainlog to /var/log/exim/mainlog.1
creating new log mode = 0640 uid = 79 gid = 79
removing old log /var/log/exim/mainlog.15
rotating log /var/log/exim/paniclog
renaming /var/log/exim/paniclog.15 to /var/log/exim/paniclog.15 (rotatecount 14, logstart 1, i 15),
renaming /var/log/exim/paniclog.14 to /var/log/exim/paniclog.15 (rotatecount 14, logstart 1, i 14),
renaming /var/log/exim/paniclog.13 to /var/log/exim/paniclog.14 (rotatecount 14, logstart 1, i 13),
renaming /var/log/exim/paniclog.12 to /var/log/exim/paniclog.13 (rotatecount 14, logstart 1, i 12),
renaming /var/log/exim/paniclog.11 to /var/log/exim/paniclog.12 (rotatecount 14, logstart 1, i 11),
renaming /var/log/exim/paniclog.10 to /var/log/exim/paniclog.11 (rotatecount 14, logstart 1, i 10),
renaming /var/log/exim/paniclog.9 to /var/log/exim/paniclog.10 (rotatecount 14, logstart 1, i 9),
renaming /var/log/exim/paniclog.8 to /var/log/exim/paniclog.9 (rotatecount 14, logstart 1, i 8),
renaming /var/log/exim/paniclog.7 to /var/log/exim/paniclog.8 (rotatecount 14, logstart 1, i 7),
renaming /var/log/exim/paniclog.6 to /var/log/exim/paniclog.7 (rotatecount 14, logstart 1, i 6),
renaming /var/log/exim/paniclog.5 to /var/log/exim/paniclog.6 (rotatecount 14, logstart 1, i 5),
renaming /var/log/exim/paniclog.4 to /var/log/exim/paniclog.5 (rotatecount 14, logstart 1, i 4),
renaming /var/log/exim/paniclog.3 to /var/log/exim/paniclog.4 (rotatecount 14, logstart 1, i 3),
renaming /var/log/exim/paniclog.2 to /var/log/exim/paniclog.3 (rotatecount 14, logstart 1, i 2),
renaming /var/log/exim/paniclog.1 to /var/log/exim/paniclog.2 (rotatecount 14, logstart 1, i 1),
renaming /var/log/exim/paniclog.0 to /var/log/exim/paniclog.1 (rotatecount 14, logstart 1, i 0),
renaming /var/log/exim/paniclog to /var/log/exim/paniclog.1
creating new log mode = 0640 uid = 79 gid = 79
removing old log /var/log/exim/paniclog.15
rotating log /var/log/exim/rejectlog
renaming /var/log/exim/rejectlog.15 to /var/log/exim/rejectlog.15 (rotatecount 14, logstart 1, i 15),
renaming /var/log/exim/rejectlog.14 to /var/log/exim/rejectlog.15 (rotatecount 14, logstart 1, i 14),
renaming /var/log/exim/rejectlog.13 to /var/log/exim/rejectlog.14 (rotatecount 14, logstart 1, i 13),
renaming /var/log/exim/rejectlog.12 to /var/log/exim/rejectlog.13 (rotatecount 14, logstart 1, i 12),
renaming /var/log/exim/rejectlog.11 to /var/log/exim/rejectlog.12 (rotatecount 14, logstart 1, i 11),
renaming /var/log/exim/rejectlog.10 to /var/log/exim/rejectlog.11 (rotatecount 14, logstart 1, i 10),
renaming /var/log/exim/rejectlog.9 to /var/log/exim/rejectlog.10 (rotatecount 14, logstart 1, i 9),
renaming /var/log/exim/rejectlog.8 to /var/log/exim/rejectlog.9 (rotatecount 14, logstart 1, i 8),
renaming /var/log/exim/rejectlog.7 to /var/log/exim/rejectlog.8 (rotatecount 14, logstart 1, i 7),
renaming /var/log/exim/rejectlog.6 to /var/log/exim/rejectlog.7 (rotatecount 14, logstart 1, i 6),
renaming /var/log/exim/rejectlog.5 to /var/log/exim/rejectlog.6 (rotatecount 14, logstart 1, i 5),
renaming /var/log/exim/rejectlog.4 to /var/log/exim/rejectlog.5 (rotatecount 14, logstart 1, i 4),
renaming /var/log/exim/rejectlog.3 to /var/log/exim/rejectlog.4 (rotatecount 14, logstart 1, i 3),
renaming /var/log/exim/rejectlog.2 to /var/log/exim/rejectlog.3 (rotatecount 14, logstart 1, i 2),
renaming /var/log/exim/rejectlog.1 to /var/log/exim/rejectlog.2 (rotatecount 14, logstart 1, i 1),
renaming /var/log/exim/rejectlog.0 to /var/log/exim/rejectlog.1 (rotatecount 14, logstart 1, i 0),
renaming /var/log/exim/rejectlog to /var/log/exim/rejectlog.1
creating new log mode = 0640 uid = 79 gid = 79
removing old log /var/log/exim/rejectlog.15

rotating pattern: /var/log/httpd/*log  after 1 days (14 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/httpd/*log
stat of /var/log/httpd/*log failed: No such file or directory

rotating pattern: /var/log/samba/*.log  after 1 days (14 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/samba/*.log
  log /var/log/samba/*.log does not exist -- skipping
not running shared postrotate script, since no logs were rotated

rotating pattern: /var/log/messages /var/log/auth /var/log/mail /var/log/errors /var/log/kernel  after 1 days (14 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/messages
stat of /var/log/messages failed: No such file or directory
considering log /var/log/auth
stat of /var/log/auth failed: No such file or directory
considering log /var/log/mail
stat of /var/log/mail failed: No such file or directory
considering log /var/log/errors
stat of /var/log/errors failed: No such file or directory
considering log /var/log/kernel
stat of /var/log/kernel failed: No such file or directory
not running shared postrotate script, since no logs were rotated

rotating pattern: /var/log/wtmp  monthly (1 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/wtmp
  log needs rotating
rotating log /var/log/wtmp
renaming /var/log/wtmp.2 to /var/log/wtmp.2 (rotatecount 1, logstart 1, i 2),
renaming /var/log/wtmp.1 to /var/log/wtmp.2 (rotatecount 1, logstart 1, i 1),
renaming /var/log/wtmp.0 to /var/log/wtmp.1 (rotatecount 1, logstart 1, i 0),
renaming /var/log/wtmp to /var/log/wtmp.1
creating new log mode = 0664 uid = 0 gid = 0
removing old log /var/log/wtmp.2


Poczekam z dzień dwa i zobaczymy co się będzie działo. Wstępnie dziękuję za pomoc.

Strona 1 z 1 Strefa czasowa UTC+2godz.
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/