[YBA] No cyclical file in Linux?

[YBA] No cyclical file in Linux?

Jonathan Ben Avraham yba at tkos.co.il
Tue Mar 2 00:04:37 IST 2010


Hi Omer,
I'm looking for a file that contains the contents of the last N write 
operations to the file where the total size of the last N operations is 
less than or equal to some limit K.

A cyclical buffer that has a file API and is flushed to disk (FLASH) 
automatically at some interval or at every write would do this. Even a 
cyclical buffer in RAM with a file API would be fine.

I want to output syslog to this file.

Many thanks,

  - yba



On Mon, 1 Mar 2010, Omer Zak wrote:

> Date: Mon, 01 Mar 2010 18:41:57 +0200
> From: Omer Zak <w1 at zak.co.il>
> To: linux-il <linux-il at cs.huji.ac.il>
> Subject: Re: [YBA] No cyclical file in Linux?
> 
> My guess is that for the common use cases of cyclical files, there are
> good userland solutions, presumably based upon use of mmap(), fseek()
> and/or ftell().
>
> Can you, Jonathan, give more details about what do you expect from the
> ideal cyclical file?
>                                                   --- Omer
>
>
> On Mon, 2010-03-01 at 16:51 +0200, Jonathan Ben Avraham wrote:
>> Hi Linux-IL subscribers,
>> I don't see any cyclical file in Linux. I see plenty of solutions based on
>> logrotate, etc. but no simple cyclical file. Is there such a thing that I
>> can implement in a JFFS?
>> TIA,
>
>

-- 
  EE 77 7F 30 4A 64 2E C5  83 5F E7 49 A6 82 29 BA    ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
      - yba at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -



More information about the Linux-il mailing list