Here are two approaches:
        1) Make sure that every record in the log file includes a
timestamp.  Parse all lines, locate the first timestamp that is
>= (CT - 1 hour), using everything after that line.

        2) Rename the log file every hour so that you start 24 separate
logs each day, and you know that each log contains information only from a
specific hour of the day.

The first approch is more flexible, the second may be easier.

Dave



On Fri, 16 Nov 2001, Najamuddin, Junaid wrote:

> Hi,
>
> How can I pull data from a log file for last hour or so
> I wrote a script but i am unable develop a logic for last one hour
> My script is reading the data fine line by line or last 10 or 20 lines
> But it is not what I want
> I want whatever is current time minus one hour or so
>
> If some one can help me please
>
> thanks
> junaid
>


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to