Tuesday, 20 January 2015

Performance monitoring using JBoss access logs

Pre-reqisites

Extract the software to c:\program files\log parser studio

Monitoring steps

Open Log Parser Studio from the installation directory (c:\program files\log parser studio\lps.exe)

Create a new query

  • Click on the New Query icon to open a new tab


 Select the access logs


  • Click on the choose log folder icon 
  • Click the select files button
  • Select one or more access log files
  • Select Open
  • Select OK

Define the log file format


  • On the bar between the results pane and the query pane, click on the  icon next to the text Log Type:NOTSET and select TSVLOG from the list
  • On the bar between the results pane and the query pane, click on the  icon next to the text Log Type:NOTSET and select
  • Set the headerRow value to False
  • Set the iSeparator value to space


Query the log files


  • In the query pane enter:

/*
    Calculate the following for each time:
    Date summarised:
       breakdown by day should be: substr(field7, 1, 11)
       breakdown by hour should be: substr(field7, 1, 14)
    Total time for all requests
    Total number of requests
    Average time of requests
*/
SELECT substr(field7, 1, 11) AS [date],
       round(sum(field3)) AS [time],
       count(field3) AS [count],
       avg(field3) AS [avg]
/*
    '[LOGFILEPATH]' represents all the files selected
    in the UI
*/
FROM '[LOGFILEPATH]'
/*
    Select only lines that have a timestamp and do not contain
    the text mr_pushlet
*/
where field7 <> '+0000]'
       AND field10 NOT LIKE '%mr_pushlet%'
/*
   group by the datetime field
   breakdown by day should be: group by substr(field7, 1, 11)
   breakdown by hour should be: group by substr(field7, 1, 14)
*/
group by substr(field7, 1, 11)
  •  Execute the query by clicking the  icon

Export the results


  • Click on the  icon
  • Select the folder and enter the filename

Create graphs


  • Select the  icon
  • Choose the graph type from the drop down list


  • Click and drag over a section of the graph to zoom in



  • Save the chart by selecting Save Image from the file menu

No comments:

Post a Comment