[LDAPGTF] Petite question technique
Emmanuel Lecharny
elecharny at apache.org
Mer 16 Sep 10:55:46 CEST 2009
Clément OUDOT wrote:
> Le 15 septembre 2009 23:26, Emmanuel Lecharny <elecharny at apache.org> a écrit :
>
>> Clément OUDOT wrote:
>>
>>>> Tu peux aussi ajouter un "-" devant le chemin du fichier pour que les
>>>> logs
>>>> soient asynchrones - ca donne un gain de perfs si le serveur logge
>>>> beaucoup.
>>>>
>>>> J'espère que ca t'aide.
>>>>
>>>>
>>>>
>>> Salut,
>>>
>>> pour le logrotate, j'ai eu des surprises, aussi je fais un restart de
>>> syslog pour tourner les logs OpenLDAP :
>>>
>>> http://tools.ltb-project.org/repositories/entry/ltb/openldap-rpm/trunk/SOURCES/openldap.logrotate
>>>
>>> Et pour info, les RPMs fournis dans LTB-project gère automatiquement
>>> les logs OpenLDAP dans syslog et le logrotate ;)
>>>
>>>
>> Merci à tous les deux.
>>
>> Question Clément :
>>
>> if test -n "`ps acx|grep slapd`"; then
>> /sbin/service slapd restart
>>
>>
>> c'est pas un peu brutal ?
>>
>> Je confirme sinon que j'ai un problème avec logrotate : en fait la rotation
>> ne marche tout simplement pas tant que OpenLDAP tient le fichier. (Merci the
>> FileSystem full ;). En tout cas, si je ne passe pas par syslog.
>>
>
>
> J'ai l'impression qu'il faut relancer forcément OpenLDAP,
:/ Ca pue... Même si c'est rapide à redémarrer, c'est franchement pas
top. Je vais essayer de voir ça avec Howard ce week-end.
> même en
> passant par syslog, pour pouvoir démarrer sur un nouveau fichier de
> log. Je suis preneur d'optimisation sur mon fichier de logroate (c'est
> libre :) )
>
Voilà mon logRotate :
/var/log/openldap/ldap.log {
rotate 7
daily
dateext
compress
notifempty
create 640 openldap openldap
missingok
}
Je me demande si l'utilisation de la commande* copytruncate* au lieu de
create ne résoudrait pas le problème :
*copytruncate*
Truncate the original log file in place after creating a copy,
instead of moving the old log file and optionally creating a new
one, It can be used when some program can not be told to close
its logfile and thus might continue writing (appending) to the
previous log file forever. Note that there is a very small time
slice between copying the file and truncating it, so some log-
ging data might be lost. When this option is used, the *create*
option will have no effect, as the old log file stays in place.
Il resterait juste à positionner les mon droits dans un postrotate...
thoughts ?
**
> Clément.
> _______________________________________________
> LDAPGTF mailing list
> LDAPGTF at lists.ldapgtf.org
> http://ldapgtf.org/mailman/listinfo/ldapgtf
>
>
--
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org
More information about the LDAPGTF
mailing list