From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/544 Path: main.gmane.org!not-for-mail From: Alex Efros Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: svlogd -tt Date: Thu, 29 Jul 2004 02:02:01 +0300 Organization: asdfGroup Inc., http://www.asdfGroup.com/ Message-ID: <20040728230201.GM22412@home.power> References: <40FD6BB6.5000902@zweipol.net> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1091055734 21594 80.91.224.253 (28 Jul 2004 23:02:14 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 28 Jul 2004 23:02:14 +0000 (UTC) Original-X-From: supervision-return-782-gcsg-supervision=m.gmane.org@list.skarnet.org Thu Jul 29 01:02:05 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 1BpxQz-0001N8-00 for ; Thu, 29 Jul 2004 01:02:05 +0200 Original-Received: (qmail 20353 invoked by uid 76); 28 Jul 2004 23:02:26 -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 20347 invoked from network); 28 Jul 2004 23:02:26 -0000 Original-To: supervision@list.skarnet.org Mail-Followup-To: supervision@list.skarnet.org Content-Disposition: inline In-Reply-To: <40FD6BB6.5000902@zweipol.net> User-Agent: Mutt/1.5.6i Xref: main.gmane.org gmane.comp.sysutils.supervision.general:544 X-Report-Spam: http://spam.gmane.org/gmane.comp.sysutils.supervision.general:544 Hi! You all discuss very complex things... patches... :) probably I misunderstand this issue, but I think we already have everything we need in file timestamp, and there is no need to convert logfile names from TAI. If you want to select logfile name based on localtime just list directory: home /var/log/qmail/qmail-send # ls -o total 17494 -rw-r--r-- 1 qmaill 411 Feb 21 17:57 @4000000040378031026453dc.u -rw-r--r-- 1 qmaill 173932 Feb 23 11:02 @400000004039c4611fadac2c.u -rw-r--r-- 1 qmaill 1024279 Mar 2 10:32 @400000004044a95f0f120e1c.u ...skip.... -rw-r--r-- 1 qmaill 542 Jul 8 18:39 @4000000040ed6b2734067d34.u -rw-r--r-- 1 qmaill 741472 Jul 23 00:45 @40000000410039f317fab1dc.u -rwxr--r-- 1 qmaill 2499038 Jul 26 21:07 @400000004105486f30840564.s -rw-r--r-- 1 root 12 Feb 20 18:00 config -rw-r--r-- 1 qmaill 683653 Jul 29 01:45 current -rw------- 1 qmaill 0 Feb 16 03:04 lock -rw-r--r-- 1 qmaill 0 Feb 16 03:04 state home /var/log/qmail/qmail-send # and then copy/paste needed logfile name using mouse. On Tue, Jul 20, 2004 at 09:00:06PM +0200, Henrik Heil wrote: > i read the thread about the svlogd -t switches some weeks ago and though > i am using -tt (UTC) happily i am missing the feature to have the > rotated logfiles with UTC-names instead of @TAI-names. > > Is there a drawback to make this an option? > The order of the logfiles would be preserved, selecting logfiles with > wildcards would be easy. If you want to select group of logfiles based on localtime you can do a number of tricks, for example: home /var/log/qmail/qmail-send # find -name '@*' -mtime -7 -daystart -exec ls -o {} \; -rw-r--r-- 1 qmaill 741472 Jul 23 00:45 ./@40000000410039f317fab1dc.u -rwxr--r-- 1 qmaill 2499038 Jul 26 21:07 ./@400000004105486f30840564.s home /var/log/qmail/qmail-send # you can use any sort of command instead of 'ls -o' for apply to all logfiles for a last week (-mtime -7). If you really-really need to have localtime 'wildcards' you do something like this: home /var/log/qmail/qmail-send # ls -o | grep 'Jun 15 19:' -rw-r--r-- 1 qmaill 19540 Jun 15 19:27 @4000000040cf23f91d3bf0ac.u -rw-r--r-- 1 qmaill 4334 Jun 15 19:45 @4000000040cf2a0f19b638d4.u -rw-r--r-- 1 qmaill 57 Jun 15 19:55 @4000000040cf2ad33559015c.u home /var/log/qmail/qmail-send # ls -o | grep 'Jun 15 19:' | cut -b 48- @4000000040cf23f91d3bf0ac.u @4000000040cf2a0f19b638d4.u @4000000040cf2ad33559015c.u home /var/log/qmail/qmail-send # Is there tricks help? -- WBR, Alex.