From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/547 Path: main.gmane.org!not-for-mail From: Henrik Heil Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: svlogd -tt Date: Thu, 29 Jul 2004 15:07:26 +0200 Message-ID: <4108F68E.6080600@zweipol.net> References: <40FD6BB6.5000902@zweipol.net> <20040728230201.GM22412@home.power> <4108CDAB.1060709@zweipol.net> <20040729111258.GA4786@home.power> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1091106460 18337 80.91.224.253 (29 Jul 2004 13:07:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 29 Jul 2004 13:07:40 +0000 (UTC) Original-X-From: supervision-return-785-gcsg-supervision=m.gmane.org@list.skarnet.org Thu Jul 29 15:07:31 2004 Return-path: Original-Received: from antah.skarnet.org ([212.85.147.14]) by deer.gmane.org with smtp (Exim 3.35 #1 (Debian)) id 1BqAd8-0000fE-00 for ; Thu, 29 Jul 2004 15:07:30 +0200 Original-Received: (qmail 25020 invoked by uid 76); 29 Jul 2004 13:07:51 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Archive: Original-Received: (qmail 25014 invoked from network); 29 Jul 2004 13:07:51 -0000 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040616 Thunderbird/0.7 Mnenhy/0.6.0.101 X-Accept-Language: en-us, en Original-To: supervision@list.skarnet.org In-Reply-To: <20040729111258.GA4786@home.power> X-Enigmail-Version: 0.84.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Xref: main.gmane.org gmane.comp.sysutils.supervision.general:547 X-Report-Spam: http://spam.gmane.org/gmane.comp.sysutils.supervision.general:547 >>I know that i can use the mtime to select the logfiles. >>Thanks for the examples anyway. I still think that this is kind of a >>workaround. >>With the mtime approach you could argue that there is no need for a >>timestamp in the filenames at all. Even without mtime you could do a >>script that looks in all the files to select ranges. >>In my opinion a log processor program would the preferable solution and >>fit well in the runit-suite. > > Hmm... how about this idea for log processor program: > 1) svlogd execute processor which just fork in background and return log file > without changes back to svlogd > 2) svlogd remove old TAI-logfile and create new TAI-logfile > 3) processor (forked in background) notice log rotation is done (how?) and then: > 1) execute 'ln newTAIlogfile newLOCALTIMElogfile' to create hard linked file > 2) search for some oldLOCALTIMElogfile with only one hardlink to it (because > oldTAIlogfile which was hardlinked to it was just removed by svlogd) and > remove it too > 3) exit > > Maybe it's better to do this work in cron-script instead of log processor. Sorry for my ambiguous writing -- i meant the "svlogp" program that Gerrit mentioned and described like this: > I've been thinking about a "svlogp" program (svlog processor, or pager) > for some time, which should be able to select log message by pattern or > time, to merge logs from multiple log directories, and maybe to > transform timestamps and more. With svlogp the format of filenames and timestamps wouldn't matter anymore. You could for example [my interpretation] specify one or more logdir(s), your favorite timeformat, from-date and to-date (in that timeformat) on the command line and get the merged logmessages for that range on stdout, lines prefixed with a timestamp in the given format. Best regards, Henrik -- Henrik Heil, zweipol Coy & Heil GbR http://www.zweipol.net/