View previous topic :: View next topic |
Author |
Message |
Scen Retired Dev


Joined: 29 Jul 2003 Posts: 2470 Location: Padova, Italy
|
Posted: Wed Jul 16, 2008 10:07 am Post subject: Logrotate: escludere file da rotazione? [RISOLTO] |
|
|
Ciao a tutti, mi serve un aiutino.
Ho installato app-admin/logrotate per tenere sotto controllo la dimensione dei file di log. La configurazione predefinita mi va anche bene, però vorrei che /var/log/emerge.log venisse escluso COMPLETAMENTE dalla rotazione.
Ho provato a guardare la pagina man e a fare una ricerchina con Zio Google, ma non riesco a trovare informazioni utili a riguardo.
Qualcuno ha avuto la mia stessa necessità (ovvero escludere uno o più file specifici dalla rotazione) ? Se sì, mi può dare qualche dritta?
Grazie
[EDIT]
Con un "trucchetto" ho risolto parzialmente il problema
/etc/logrotate.d/emerge:
Code: |
/var/log/emerge.log {
monthly
nocompress
size 1G
}
|
Code: |
# logrotate -d -v /etc/logrotate.d/emerge
reading config file /etc/logrotate.d/emerge
reading config info for /var/log/emerge.log
Handling 1 logs
rotating pattern: /var/log/emerge.log 1073741824 bytes (no old logs will be kept)
empty log files are rotated, old logs are removed
considering log /var/log/emerge.log
log does not need rotating
|
Praticamente logrotate non toccherà tale file fino a che non supererà la dimensione di 1 Gigabyte (e ce ne vorrà... )
Se qualcuno ha in mente soluzioni più eleganti si faccia avanti  _________________ I was born in a deep forest/I wish I could live here all my life/I am made from stones and roots/My home, these woods and roads
All my life I loved this sound/Of the woods all around/Eagles flies where the winds blows free
Journey is my destiny
Last edited by Scen on Fri Jul 18, 2008 6:49 am; edited 1 time in total |
|
Back to top |
|
 |
nikko96 Apprentice


Joined: 22 Jul 2005 Posts: 229 Location: Pulcinella's Country
|
Posted: Thu Jul 17, 2008 7:47 pm Post subject: Re: Logrotate: escludere file da rotazione? [RISOLTO PARZIAL |
|
|
Scen wrote: | Ciao a tutti, mi serve un aiutino.
Ho installato app-admin/logrotate per tenere sotto controllo la dimensione dei file di log. La configurazione predefinita mi va anche bene, però vorrei che /var/log/emerge.log venisse escluso COMPLETAMENTE dalla rotazione.
Ho provato a guardare la pagina man e a fare una ricerchina con Zio Google, ma non riesco a trovare informazioni utili a riguardo.
Qualcuno ha avuto la mia stessa necessità (ovvero escludere uno o più file specifici dalla rotazione) ? Se sì, mi può dare qualche dritta?
Grazie
[EDIT]
Con un "trucchetto" ho risolto parzialmente il problema
/etc/logrotate.d/emerge:
Code: |
/var/log/emerge.log {
monthly
nocompress
size 1G
}
|
Code: |
# logrotate -d -v /etc/logrotate.d/emerge
reading config file /etc/logrotate.d/emerge
reading config info for /var/log/emerge.log
Handling 1 logs
rotating pattern: /var/log/emerge.log 1073741824 bytes (no old logs will be kept)
empty log files are rotated, old logs are removed
considering log /var/log/emerge.log
log does not need rotating
|
Praticamente logrotate non toccherà tale file fino a che non supererà la dimensione di 1 Gigabyte (e ce ne vorrà... )
Se qualcuno ha in mente soluzioni più eleganti si faccia avanti  |
Un'altra soluzione,ancora più drastica è quella di togliere il file emerge o commentare tutte le sue righe.
ciao _________________ My system: cpu Intel core 2 duo e6750,mb asus p5n-e sli,scheda grafica nvidia GeForce 9600 GT,kernel 2.6.31-gentoo-r6 |
|
Back to top |
|
 |
Scen Retired Dev


Joined: 29 Jul 2003 Posts: 2470 Location: Padova, Italy
|
Posted: Fri Jul 18, 2008 6:49 am Post subject: |
|
|
Ecco svelata tutta la mia ignoranza in materia
Io pensavo che ci fosse tipo una regola "generale" che mi prendeva in considerazione TUTTI i log contenuti in /var/log/, sovrascritta poi dalle regole specifiche.
Bene, ti ringrazio infinitamente, hai chiarito ogni mio dubbio  _________________ I was born in a deep forest/I wish I could live here all my life/I am made from stones and roots/My home, these woods and roads
All my life I loved this sound/Of the woods all around/Eagles flies where the winds blows free
Journey is my destiny |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|