GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Crontabs give me wood (https://gfy.com/showthread.php?t=186747)

Juicy D. Links 10-16-2003 10:44 AM

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?

JFPdude 10-16-2003 10:46 AM

Quote:

Originally posted by juicylinks
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?

Hit me up I have a solution for you.

It involves running the stats and clearing the logs everytime the stats run.

bringer 10-16-2003 10:46 AM

just stay up and do it every night manually

JSA Matt 10-16-2003 10:47 AM

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

cyberpod 10-16-2003 10:48 AM

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?

JFPdude 10-16-2003 10:57 AM

Hows that for gratitude now he wants me to send him 2 jars of hair gel and a canoli to fix his stats :1orglaugh

ztik 10-16-2003 11:02 AM

Quote:

Originally posted by JSA Matt
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

Ive been using that script for almost 2 years, pretty damn good :)

EZRhino 10-16-2003 11:03 AM

Hit me up on ICQ and I'll send you a sample of my cron tabs :thumbsup

JFPdude 10-16-2003 11:05 AM

Quote:

Originally posted by EZRhino
Hit me up on ICQ and I'll send you a sample of my cron tabs :thumbsup
psst he's all fixed it was a joke about the hair gel and canoli's

Juicy D. Links 10-16-2003 11:11 AM

Quote:

Originally posted by JFPdude


psst he's all fixed it was a joke about the hair gel and canoli's

JFP is the man :thumbsup

fletcher 10-16-2003 11:38 AM

Use "logrotate" to do it. You have to send Apache an HUP signal after you remove it to make it create a new logfile.

EZRhino 10-16-2003 11:39 AM

:thumbsup

vending_machine 10-16-2003 11:54 AM

Quote:

Originally posted by fletcher
Use "logrotate" to do it. You have to send Apache an HUP signal after you remove it to make it create a new logfile.
Or...

To save your logs in a compressed format:
Code:

gzip -c logfile > logfile.gz && cat /dev/null > logfile

the above code for Linux I believe is:
gzip -c logfile > logfile.gz && echo -n "" > logfile

The thing is that if you remove or rename your logfile, Apache will no longer be able to write log information as it has lost the pointer to the file. The way to get around it is to zero it out as in the example above.. That way you wont have to restart the webserver. :)


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