Skip to content
View in the app

A better way to browse. Learn more.

Froxlor Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Logrotation

Featured Replies

Hy,

 

ich hab da mal nen kleines script gefunden ...

funktioniert ganz gut und ist ne sch?ne alternative zum normalen logrotate ;)

glaub ist ausm syscp forum gewesen habs aber schon l?nger:

 

Das muss in ne crondatei rein (und angepasst werden):

5 0 * * * root /usr/bin/php5 -q /etc/logs/apache_logs.php

 

Bei den beiden dateien muss auch noch der pfad ge?ndert werden.

apache_logs.php

compress_all.php

(ich hatte diese beiden Dateien im ordner /etc/logs/)

 

Edit: achso man sollte das ganze auch so einstellen, das es _nach_ der Traffic berechnung ausgef?hrt wird ;)

 

Was ich so sch?n an diesen kleinem Script finde, ist das es die logs in einen neuen Ordner (mit aktuellem Datum verschiebt und die logs dann einzeln packt). So bleibt das ganze sehr ?bersichtlich.

 

Es w?hre vill. ganz interessant, wenn es hier im Hauptforum ggf. auch ne sektion geben w?rde f?r z.b. Userscripte, Templates/Designs, usw.

Edited by Restless

Das geht sogar noch einfacher, wenn ihr logrotate installiert habt braucht ihr doch nur eine logrotate config f?r die webserverlogs und den customer-log ordner erstellen:

 

Bei mir sieht das so aus (unter Gentoo):

 

/etc/logrotate.d/apache2

/var/log/apache2/*log {
 missingok
 notifempty
 sharedscripts
 postrotate
 /etc/init.d/apache2 reload > /dev/null 2>&1 || true
 endscript
}

 

/etc/logrotate.d/froxlor

/var/customers/log/*.log {
 missingok
 notifempty
 sharedscripts
 postrotate
 /etc/init.d/apache2 reload > /dev/null 2>&1 || true
 endscript
}

 

Diese Scripts kann man auch noch mit weiteres optionen versehen, wie oft - in welchem format - komprimierung, etc.

 

Es w?hre vill. ganz interessant, wenn es hier im Hauptforum ggf. auch ne sektion geben w?rde f?r z.b. Userscripte, Templates/Designs, usw.

 

Werd ich mit den anderen mal besprechen, finde ich auch sinnvoll.

  • Author

joa ... wollt es ja auch nur mal anbringen ;)

weil ich finds recht nett

Ist auch vollkommen ok und gerne gesehen :)

 

Zum Thema "Userscripte, Templates/Designs" steht in unserem wiki die rubrik "contrib" zur Verf?gung.

Einloggen mit Forenaccount, alle Wiki-seiten unter http://wiki.froxlor.org/contrib sind von allen Users bearbeit- und anlegbar

  • 3 weeks later...

Ich hab das mal ins Wiki gepackt. Wenn jemand lust hat, einfach mal reviewn und mir auf die Finger klopfen :)

  • 4 months later...

Hallo

 

Logrotate ist installiert, ich habe auch datei froxlor unter /etc/logrotate.d/ erstellt

/var/customers/logs/*.log {
 missingok
 notifempty
 sharedscripts
 postrotate
   /etc/init.d/apache2 reload > /dev/null 2>&1 || true
 endscript
}

Ich m?chte das alte Logs unter /var/customers/logs nach 2 Wochen oder sp?testens nach 1 Monat automatisch gel?scht werden.

Ist das m?glich ? Wenn ja, was muss ich da noch eingeben? weekly ?

 

Gru?

Ich m?chte das alte Logs unter /var/customers/logs nach 2 Wochen oder sp?testens nach 1 Monat automatisch gel?scht werden.

Ist das m?glich ? Wenn ja, was muss ich da noch eingeben? weekly ?

 

/var/customers/logs/*.log {
 weekly
 rotate 4
 compress
 missingok
 notifempty
 sharedscripts
 postrotate
   /etc/init.d/apache2 reload > /dev/null 2>&1 || true
 endscript
}

 

w?chentliche rotation der logs, 4 st?ck werden aufbewahrt (gz-archiv), ?ltere gel?scht, bzw. ?berschrieben

Danke. genau das wollte ich. :)

  • 2 months later...

Hi & sorry dass ich das alte Thema nochmal aufw?rme:

 

Kann ich die logrotation ohne Probleme mit froxlor einsetzen?

Muss ich in der froxlor-Konfig irgendwas ?ndern?

Warum ist das nicht standardm??ig dabei? W?rde doch haufen Speicherplatz sparen!

 

Danke schonmal,

morphium

Kann ich die logrotation ohne Probleme mit froxlor einsetzen?

 

Ja, darum ging es ja in diesem Thema unter anderem

 

Muss ich in der froxlor-Konfig irgendwas ?ndern?

 

Nein, logrotation ist ein eigenes Programm und hat daher eigene Konfigurationen

 

Warum ist das nicht standardm??ig dabei? W?rde doch haufen Speicherplatz sparen!

 

Diese Entscheidung lassen wir den Admins.

Danke f?r die schnelle Antwort!

 

Nein, logrotation ist ein eigenes Programm und hat daher eigene Konfigurationen

 

Aber ich muss schon auf die Zeit achten, oder? Sonst geht evtl. meine Traffic-Statistik und/oder webalizer/awstats kaputt, richtig?

 

Danke!

morphium

Richtig, wenn du 2x t?glich rotierst hast du am ende nur 1/3 des Tages in den Stats

  • 9 months later...

I have tried to apply you patch on my test machine, but the patch seems to be broken. Would you please update your patch to 0.9.23-rc1? Was it your intent to use absolute paths within the patch (/var/www/froxlor0922_logrotate/)?

I think i will wait for the 0.9.23 release...

 

P.S. Warum rede ich eigentlich englisch im deutschen forum? *g*

Patch f?r 0.9.23-rc1 h?ngt nun am bug...

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.