![]() |
Crontabs give me wood
Yo listen up
My logs, server logs not my dick they get massssssive So can i make a crontab to wipeout the logs dir evryday at midnight (rm -r logs)and then have it redo the logs dir (mk dir) the minute after? |
Quote:
It involves running the stats and clearing the logs everytime the stats run. |
just stay up and do it every night manually
|
Install AWStats and purge them after every update :)
My logs would build up to about 20-30gigs until I setup AWStats http://awstats.sourceforge.net/ You can setup a cron to clear them but what's the point if you don't analyze them. Just turn them off |
that would depend on if you use the logs to generate stats...
If you do, just run the stats program more often like twice a day instead of once and the logs are only hlaf the size.. assuming yoiu delete the logs after processing... if you don't use them, just turn them off... there are many solutions for logging... can you be more specific about what you do with them? |
Hows that for gratitude now he wants me to send him 2 jars of hair gel and a canoli to fix his stats :1orglaugh
|
Quote:
|
Hit me up on ICQ and I'll send you a sample of my cron tabs :thumbsup
|
Quote:
|
Quote:
|
Use "logrotate" to do it. You have to send Apache an HUP signal after you remove it to make it create a new logfile.
|
:thumbsup
|
Quote:
To save your logs in a compressed format: Code:
gzip -c logfile > logfile.gz && cat /dev/null > logfile |
All times are GMT -7. The time now is 05:41 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123