tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicholas Bernstein <n...@docmagic.com>
Subject Re: log comming big after....
Date Fri, 27 Feb 2004 01:55:28 GMT
On Thursday 26 February 2004 5:43 pm, FRANCOIS Dufour wrote:
> hi to all
> my video chatt aplication have to serve image from user end to other user
> end the log file is simply growing every second is there a way to keep only
> like the 20 last request in log?
>
> thank in advance
>
>

to be run from cron: 

#!/bin/bash
logfile="/var/log/somelog"
logsize=`ls -s $logfile | awk '{ print $1 }'`
date=`date -I`

if [[ ! $logsize > 200000 ]] ; then 
	tar czf mylog.${date}.tar.gz $logfile
	rm -rf $logfile && touch $logfile	
fi

>
>
> francoisdufour@hotmail.com
> administrateur http://entre-nous.qc.tc
>
> _________________________________________________________________
> MSN Search, le moteur de recherche qui pense comme vous !
> http://fr.ca.search.msn.com/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org

-- 
+---------------------------------------------------------------+
| Nicholas Bernstein		| nick@docmagic.com 		|
| UNIX Systems Administrator	| http://www.docmagic.com 	|
| Document Systems Inc.		| 			 	|
+---------------------------------------------------------------+


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message