Blue Reef Technical Support Blue Reef Virtual Server Reseller ProgramInstallation instructions, manuals, how-tos, and more!About Blue Reef Consulting, Inc.

About Blue Reef Virtual ServersEcommerce Solutions for your Virtual ServerSearch the Blue Reef Virtual Server web site
Return to Blue Reef Virtual Servers Home Page
Order virtual servers, software, computers, and more!
Return to Blue Reef Main Home Page
Specials
Site Map
Support Solutions to help you do business with your Virtual Server.



Blue Reef Virtual Servers
Virtual Server Support
Virtual Server Addons
Servers Stats and Log Reporting
Statistics Overview
Setting Log Formats
Rotating Log Files
Clearing Log Files with vnukelog
Clear Log Files Regularly with Cron
Analog Log File Analyzer
Getstats Log File Analyzer
http-analyzehttp-analyze
Webalizer
WebTrends Log File Analyzer
Request help using our Problem Tracking System
Order a Blue Reef Virtual Server now!


Clearing Logs Regularly with Cron

Your Virtual Server's logs are appended to every time someone visits your site. Over time these logs can grow to be very large and can consume all your available disk space if not managed correctly.

You can easily define a simple cron table entry in your cronjobs file to nuke your log files. The instructions included below guide you through this process step by step.

  1. Create a cronjobs file
    You can do this on your local computer in a text editor like TextPad or you can create the file directly on your Virtual Server using your favorite UNIX text editor (pico, vi, etc). Your file should contain the following entries:

    MAILTO="USER@YOUR-DOMAIN.NAME"
    0 1 1 1-12/3 *   /usr/local/bin/vnukelog


    This will run the vnukelog command (which clears all of your log files) at 1 AM on the first day of the first month of every quarter, or January, April, July, and October (1-12/3). The log file contents will be emailed to the address set in the MAILTO field. Obviously, you will need to substitute a valid e-mail address in the place of "USER@YOUR-DOMAIN.NAME".

    If you have created your cronjobs file on your local computer, FTP the file up to your Virtual Server and store it in your home directory under the name "cronjobs" (you can actually use any name you would like).

    See the Crontab Page for more information making a cronjobs file.

  2. Register your cronjobs file with the system
    After you have created your cronjobs file (and have uploaded it to your Virtual Server if applicable), you need to Telnet or SSH to your server and register the file with the cron system daemon. To do this, simply type:

        % crontab cronjobs

    Or if you created a file name other than "cronjobs", substitute the name you used for the place of "cronjobs" above.

That's all there is to it! You can list your registered cron table entries by typing:
    % crontab -l
or remove all of your registered cron table entries by typing:

    % crontab -r
.
SEE ALSO:

vnukelog

Using Telnet/SSH

Server Configuration


Server Add-ons

Configuring Server Logs

Rotating Server Logs

BOOKS TO HELP YOU:

Web Site Stats: Tracking Hits and Analyzing Web Traffic
Web Site Stats: Tracking Hits and Analyzing Web Traffic

$25.46

The Web Traffic Bible: Master Strategies for Creating a Traffic JAM on Your Website
The Web Traffic Bible: Master Strategies for Creating a Traffic JAM on Your Website

$24.99

Amazon.com logo
Search for :
Enter keywords...