This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Linux / UNIX and the fly likes Delete the log using cron job Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Delete the log using cron job" Watch "Delete the log using cron job" New topic
Author

Delete the log using cron job

MInu
Ranch Hand

Joined: Oct 09, 2003
Posts: 517
Hai all,

I am using Sybase as my back end for my web application.When i execute some complex quries, the connection will lost or i will not get any responds.I increased the size of the tempdb,then the problem solved.But when the user's start to execute the same query,the same issue will happens.Last I found the reason that the log is writing in every event.So i decided to write a cron job to clear the log frequently.
So please anybody help me to write the cron job to clear the log.

Thanks in advance


God Gave Me Nothing I Wanted<br />He Gave Me Everything I Needed<br /> - Swami Vivekananda
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

This has nothing to do with Java, let alone advanced Java; let's move it to Linux/UNIX.


[Jess in Action][AskingGoodQuestions]
Craig Jackson
Ranch Hand

Joined: Mar 19, 2002
Posts: 405
See below:

Write CRON Job
Peter Rooke
Ranch Hand

Joined: Oct 21, 2004
Posts: 802

Been a while since I used Sybase, but I think you should be able to turn the the logging off. I know there is an option when you create a new database.

Something I quickly dug up: sybase loggin


Regards Pete
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16019
    
  20

There's a facility called logrotate that's explicitly designed to keep logfiles under control. It can keep logfiles in aged generations, starting a new logfile at intervals and/or when the logfile reaches a certain size.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
Don't get me started about those stupid light bulbs.
 
subject: Delete the log using cron job