WebSphere Application Server & Liberty

WebSphere Application Server & Liberty

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  copy logs between the time range....

    Posted Thu June 19, 2014 05:01 PM

    Hi,

    I have a systemout.log file and I would liketo see the logs only  between two time stamps [6/19/14 11:26:50:696 EDT] & [6/19/14 12:59:23:719 EDT] .or between two days.

    Below is my log format:

    [6/19/14 11:26:50:696 EDT]
    [6/19/14 12:11:28:880 EDT] .
    [6/19/14 12:17:55:003 EDT] org.apache.commons.httpclient.HttpMethodDirector executeWithRetry Retrying request
    [6/19/14 12:18:11:061 EDT] 
    [6/19/14 12:18:13:076 EDT] 
    [6/19/14 12:32:55:905 EDT] 
    [6/19/14 12:47:03:083 EDT] 
    [6/19/14 12:50:45:305 EDT] 
    [6/19/14 12:50:50:652 EDT] 
    [6/19/14 12:51:05:166 EDT] 
    [6/19/14 12:54:13:692 EDT] 0
    [6/19/14 12:59:11:217 EDT] 
    [6/19/14 12:59:23:719 EDT] 
    [6/19/14 13:02:49:464 EDT] 
    [6/19/14 13:10:26:561 EDT] 
    [6/19/14 13:10:26:565 EDT] 0
    [6/19/14 13:10:40:663 EDT] 0
    [6/19/14 13:11:24:488 EDT] 



  • 2.  copy logs between the time range....

    Posted Fri June 20, 2014 07:43 AM
    Hi raju,

      If you are on WAS 8.X and you have HPEL logs enabled you can use logviewer if not you need to do an script to get your information
     
      High Performance Extensible Logging (HPEL)
      www-01.ibm.com/support/knowledgecenter/S...
     
      take a view to
     
        APPSERVER_HOME\bin\logviewer.bat/sh -help
        
      -startDate

             Specifies the earliest date or date and time for which log entries should be extracted. You may specify either just a date or a date and time.  If only a date is specified, it is equivalent to specifying the time as 00:00:00:000 in your time zone. Dates should be entered in the M/d/yy format. Dates and times should be in the M/d/yy H:m:s:S z format, where H is the hour in 24 hour format, m is the minutes, s is the seconds, and S is the milliseconds, and the z is the time zone. When including the time with this  option, quotes must be used  as there are spaces in the date time format.

             Examples:
             -startDate 1/30/09
             -startDate "1/30/09 4:0:0:100 CET"

    -stopDate

             Specifies the latest date or date and time for which log entries should be extracted. You may specify either just a date or a date and time.  If only a date is specified, it is equivalent to specifying the time as 23:59:59:999 in your time zone.  Dates should be entered in the M/d/yy format. Dates and times should be in the M/d/yy H:m:s:S z format, where H is the hour in 24 hour format, m is the minutes, s is the seconds, and S is the milliseconds, and the z is the time zone. When including the time with this option, quotes must be used as there are spaces in the date time format.

             Examples:
             -stopDate 5/28/09
             -stopDate "5/28/09 14:32:9:100 CEST"
            
        logViewer.bat -startDate "4/27/10 1:30:0:0 CEST" -stopDate "4/27/10 1:35:0:0 CEST"
        
        Hope this helps. Tell us if you need more support.

    Regards


  • 3.  copy logs between the time range....

    Posted Fri June 20, 2014 05:49 PM
    We use 7.0. Also Can we use the commands like grep/ awk/sed to get the logs between the time range..


  • 4.  copy logs between the time range....

    Posted Mon June 23, 2014 05:24 AM
    Raju,
      
       Sure as I say if you are not in V8.X then you need to do an script to get your information.

      for *nix systems:  grep/ awk/sed

      for win: findstr / Log parser (www.microsoft.com/en-us/download/details...).....

    regards