> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of 
> WORLEY, Dale R (Dale)
> Sent: Monday, June 21, 2010 10:35 PM
> To: [email protected]
> Subject: [sipX-dev] New design for sipx-log-cut
> 
> The program sipx-log-cut is used to extract a segment from a 
> log file based on a start and end time.  It is called by 
> sipx-snapshot for assembling snapshots.  But the current 
> program doesn't work optimally, because it only processes one 
> file, and so sipx-snapshot must call it seperately for each 
> file in a logrotate set (e.g., sipXproxy.log, 
> sipXproxy.log.1, etc.), and for efficiency's sake, each 
> invocation of sipx-log-cut needs to feed back to 
> sipx-snapshot whether or not earlier or later files in the 
> set need to be examined.  The whole situation is a mess and 
> is not working at all well.  (See XX-6732 and XX-8423.)
> 
> I am revising sipx-log-cut so that it performs the extraction 
> from an entire logrotate set at one time.  This avoids 
> complex communication with sipx-snapshot, sipx-snapshot just 
> gives it the base of the filename set and the start and end 
> timestamps.  The current definition of its functionality is 
> given in the help message:
> 
> 
> Usage:  $EXECUTABLE_NAME 
>           {-i|--input} <input log file base>
>           {-s|--start} <start timestamp>
>           [{-e|--end} <end timestamp>]
>           [-t|--stdout]
>           [-h|--help]
> 

+1

I think the initial design of both sipx-snapshot and sipx-log-cut only 
supported a start and end date in the "current" log (which is why the date 
range stuff only works with --current).  Somewhere along the line we added the 
ability to dig through old files, but it probably wasn't added in the right 
place (i.e. should have been done in sipx-log-cut, as you suggest).

Note that the name of rotated files depends on the system's /etc/logrotate.conf 
file, and is different on different flavours of Linux.  (E.g. Fedora uses a 
date extension, CentOS numbers the files).  The sort algorithm must take this 
into account, because the sort order must be different depending on the naming 
convention.

Carolyn
_______________________________________________
sipx-dev mailing list [email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-dev
Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev
sipXecs IP PBX -- http://www.sipfoundry.org/

Reply via email to