how to truncate the logs without kill memcached
schen at visiblepath.com
Tue Oct 23 04:28:07 UTC 2007
that's absolutely right. i'll definitely remember it now...
i still have plenty of disk space for it to grow for at least another
week before i have to kill it. (by then i'll have appservers point to
another memcached.) the question now is: will a 1-10G sized log file
have serious impact on the performance of the memcached?
From: Les Mikesell [mailto:lesmikesell at gmail.com]
Sent: Monday, October 22, 2007 2:52 PM
To: Sheldon Chen
Cc: memcached at lists.danga.com
Subject: Re: how to truncate the logs without kill memcached
Sheldon Chen wrote:
> I have used memcached -d -m 1024 -vv 2>memcached.log to start the
> memcached and found that the log file memcached.log grows too fast.
> Is there a way to remove the logs without killing the memcached first?
It is common on unix-like sytems to open/redirect log files in append
mode (>>) which makes every write have an atomic seek-to-end-of-file.
This lets you truncate the file (>filename in bash or bourne shell)at
any time and the next write will start back at the beginning of the
lesmikesell at gmail.com
More information about the memcached