[BusyBox 0000627]: new logread option: -n (like tail)
bugs at busybox.net
bugs at busybox.net
Sat Sep 30 21:21:40 UTC 2006
A NOTE has been added to this issue.
======================================================================
http://busybox.net/bugs/view.php?id=627
======================================================================
Reported By: akvadrako
Assigned To: BusyBox
======================================================================
Project: BusyBox
Issue ID: 627
Category: New Features
Reproducibility: always
Severity: feature
Priority: normal
Status: assigned
======================================================================
Date Submitted: 01-06-2006 12:45 PST
Last Modified: 09-30-2006 14:21 PDT
======================================================================
Summary: new logread option: -n (like tail)
Description:
This patch adds an option to logread to only display the latest certain #
of lines. This is very useful since there is no logfile to run tail on
and the entire ring buffer must be copied for tail to work. On my system
(10MB logfile, 128MB memory) this really isn't practical.
This is tested on i386 with linux 2.6.
======================================================================
----------------------------------------------------------------------
landley - 01-22-06 16:36
----------------------------------------------------------------------
What's wrong with logread | tail -n ?
----------------------------------------------------------------------
akvadrako - 01-22-06 17:13
----------------------------------------------------------------------
Well, I clearly expalin that in my description. Tail has no way to display
the last lines of a stream because it has no way to know when the stream
will end. So instead it has to copy the entire input into memory buffer
and then display the last few lines. This takes too much memory.
----------------------------------------------------------------------
vda - 09-30-06 14:21
----------------------------------------------------------------------
Is our tail THAT stupid? tail has to remember only last N lines (when it
reads next line, it can forget oldest line in buffer).
The other thing, I really dislike syslogd. Not the code, the concept.
Keeping log in shmem... isn't it silly? shmem in Linux is just a hidden
tmpfs after all, why not use the filesystem explicitly (with log
rotation)? That way no one will need logread AT ALL.
Issue History
Date Modified Username Field Change
======================================================================
01-06-06 12:45 akvadrako New Issue
01-06-06 12:45 akvadrako Status new => assigned
01-06-06 12:45 akvadrako Assigned To => BusyBox
01-06-06 12:45 akvadrako File Added: busybox-logread-dash-n.patch
01-22-06 16:36 landley Note Added: 0000977
01-22-06 17:13 akvadrako Note Added: 0000978
09-30-06 14:21 vda Note Added: 0001675
======================================================================
More information about the busybox-cvs
mailing list