[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: logging writes to disk (keeping disk from spinning down)



Stefan Monnier wrote at 2009-03-04_10:36 -0700:
> Micha Feigin wrote at 2009-03-03_06:01 -0700:
> > You can abuse laptop mode and do
> > echo 1 > /proc/sys/vm/block_dump
> > and then look in the syslog I think.
> 
> It's no abuse at all: it's the just The Right Way to do it.
> BEWARE, tho: make sure your syslog doesn't get written to disk,
> otherwise you'll get a storm of writes causing other writes ad-nauseum.
> 
> Personally I do it this way:
> 1 - turn off your usual syslog daemon (e.g. /etc/init.s/rsyslogd stop)
> 2 - turn on a RAM-only syslog daemon, e.g.:
> 
>      busybox syslogd -C16
>      busybox klogd
> 
> then use "busybox logread" or "busybox logread -f" to look at
> the syslog.

Thanks Stefan, Micha for your comments; this looks like it may do what I want.

I think I can even do this without disabling rsyslogd, by figuring out what log 
level and facility the block_dump output is and sending that to /tmp (on 
tmpfs) with some size constraints of some sort.

Attachment: signature.asc
Description: Digital signature


Reply to: