Posted by: ibmadmin | February 8, 2017

IBM Websphere Datapower – Latency Log parser for Splunk

The following Regular expression Splunk query will help to extract the Datapower Latency log tokens. This query will be helpful to generate the Splunk reports based on the different domains and datapower components like web service proxy, xml filewall and multi protocol gateway etc…

Explanation of Arguments found in the Latency log message
Position Argument
1 request header read
2 request header sent
3 front side transform begun
4 front side transform complete
5 entire request transmitted
6 front side style-sheet ready
7 front side parsing complete
8 response header received
9 response headers sent
10 back side transform begun
11 back side transform complete
12 response transmitted
13 back side style-sheet read
14 back side parsing complete
15 back side connection attempted
16 back side connection completed

Splunk Query with Regular expression field extraction:

index=datapower_index latency <your datapower domain name> <datapower component name> NOT <Exclution String> earliest=”2/7/2017:07:00:00″ latest=”2/8/2017:7:00:00″| rex field=_raw “^(?P<DP_Date_Time>\w+\s+\d+\s+\d+:\d+:\d+) (?P<DP_DeviceName>[^ ]+) (?P<DP_Domain>[^ ]+) \[(?P<DP_UID>.*)\] (?P<DP_ServiceName>[^:]+).*: trans\((?P<DP_TRANSID>.*)\).*Latency:[ ]*(?P<DP_LATENCY_TIME_REQ_HDR_READ>[0-9]*)[ ]*(?P<DP_LATENCY_TIME_REQ_HDR_SENT>[0-9]*)[ ]*(?P<DP_LATENCY_TIME_FSTB>[0-9]*)[ ]*(?P<DP_LATENCY_TIME_FSTC>[0-9]*)[ ]*(?P<DP_LATENCY_TIME_ENTIRE_REQ_TRS>[0-9]*)[ ]*(?P<DP_LATENCY_TIME_FS_SYTLE_READY>[0-9]*)[ ]*(?P<DP_LATENCY_TIME_FS_PARSING_COM>[0-9]*)[ ]*(?P<DP_LATENCY_TIME_RES_HDR_RECVD>[0-9]*)[ ]*(?P<DP_LATENCY_TIME_RES_HDR_SENT>[0-9]*)[ ]*(?P<DP_LATENCY_TIME_BSTB>[0-9]*)[ ]*(?P<DP_LATENCY_TIME_BSTC>[0-9]*)[ ]*(?P<DP_LATENCY_TIME_RES_TRS>[0-9]*)[ ]*(?P<DP_LATENCY_TIME_BS_STYLE_READ>[0-9]*)[ ]*(?P<DP_LATENCY_TIME_BSPC>[0-9]*)[ ]*(?P<DP_LATENCY_TIME_BSCA>[0-9]*)[ ]*(?P<DP_LATENCY_TIME_BSCC>[0-9]*) \[(?P<DP_Backside_URL>.*)\]”|stats count(DP_LATENCY_TIME_RES_TRS) as TotalTrans perc75(DP_LATENCY_TIME_RES_TRS) as 75P, perc80(DP_LATENCY_TIME_RES_TRS) as 80P,perc85(DP_LATENCY_TIME_RES_TRS) as 85P, perc90(DP_LATENCY_TIME_RES_TRS) as 90P, perc95(DP_LATENCY_TIME_RES_TRS) as 95P, perc98(DP_LATENCY_TIME_RES_TRS) as 98P,perc99(DP_LATENCY_TIME_RES_TRS) as 99P,avg(DP_LATENCY_TIME_RES_TRS) as AvgResTime, min(DP_LATENCY_TIME_RES_TRS) as MinResTime,max(DP_LATENCY_TIME_RES_TRS) as maxResTime by DP_ServiceName,DP_Backside_URL|sort DP_ServiceName AvgResTime DESC

index=datapower_index latency <your datapower domain name> <datapower component name> NOT <Exclution String> earliest="2/7/2017:07:00:00" latest="2/8/2017:7:00:00"| rex field=_raw "^(?P<DP_Date_Time>\w+\s+\d+\s+\d+:\d+:\d+) (?P<DP_DeviceName>[^ ]+) (?P<DP_Domain>[^ ]+) \[(?P<DP_UID>.*)\] (?P<DP_ServiceName>[^:]+).*: trans\((?P<DP_TRANSID>.*)\).*Latency:[ ]*(?P<DP_LATENCY_TIME_REQ_HDR_READ>[0-9]*)[ ]*(?P<DP_LATENCY_TIME_REQ_HDR_SENT>[0-9]*)[ ]*(?P<DP_LATENCY_TIME_FSTB>[0-9]*)[ ]*(?P<DP_LATENCY_TIME_FSTC>[0-9]*)[ ]*(?P<DP_LATENCY_TIME_ENTIRE_REQ_TRS>[0-9]*)[ ]*(?P<DP_LATENCY_TIME_FS_SYTLE_READY>[0-9]*)[ ]*(?P<DP_LATENCY_TIME_FS_PARSING_COM>[0-9]*)[ ]*(?P<DP_LATENCY_TIME_RES_HDR_RECVD>[0-9]*)[ ]*(?P<DP_LATENCY_TIME_RES_HDR_SENT>[0-9]*)[ ]*(?P<DP_LATENCY_TIME_BSTB>[0-9]*)[ ]*(?P<DP_LATENCY_TIME_BSTC>[0-9]*)[ ]*(?P<DP_LATENCY_TIME_RES_TRS>[0-9]*)[ ]*(?P<DP_LATENCY_TIME_BS_STYLE_READ>[0-9]*)[ ]*(?P<DP_LATENCY_TIME_BSPC>[0-9]*)[ ]*(?P<DP_LATENCY_TIME_BSCA>[0-9]*)[ ]*(?P<DP_LATENCY_TIME_BSCC>[0-9]*) \[(?P<DP_Backside_URL>.*)\]"|stats count(DP_LATENCY_TIME_RES_TRS) as TotalTrans perc75(DP_LATENCY_TIME_RES_TRS) as 75P, perc80(DP_LATENCY_TIME_RES_TRS) as 80P,perc85(DP_LATENCY_TIME_RES_TRS) as 85P, perc90(DP_LATENCY_TIME_RES_TRS) as 90P, perc95(DP_LATENCY_TIME_RES_TRS) as 95P, perc98(DP_LATENCY_TIME_RES_TRS) as 98P,perc99(DP_LATENCY_TIME_RES_TRS) as 99P,avg(DP_LATENCY_TIME_RES_TRS) as AvgResTime, min(DP_LATENCY_TIME_RES_TRS) as MinResTime,max(DP_LATENCY_TIME_RES_TRS) as maxResTime by DP_ServiceName,DP_Backside_URL|sort DP_ServiceName AvgResTime DESC


Regular Expression alone to check in https://regex101.com website:

^(?P<DP_Date_Time>\w+\s+\d+\s+\d+:\d+:\d+) (?P<DP_DeviceName>[^ ]+) (?P<DP_Domain>[^ ]+) \[(?P<DP_UID>.*)\] (?P<DP_ServiceName>[^:]+).*: trans\((?P<DP_TRANSID>.*)\).*Latency:[ ]*(?P<DP_LATENCY_TIME_REQ_HDR_READ>[0-9]*)[ ]*(?P<DP_LATENCY_TIME_REQ_HDR_SENT>[0-9]*)[ ]*(?P<DP_LATENCY_TIME_FSTB>[0-9]*)[ ]*(?P<DP_LATENCY_TIME_FSTC>[0-9]*)[ ]*(?P<DP_LATENCY_TIME_ENTIRE_REQ_TRS>[0-9]*)[ ]*(?P<DP_LATENCY_TIME_FS_SYTLE_READY>[0-9]*)[ ]*(?P<DP_LATENCY_TIME_FS_PARSING_COM>[0-9]*)[ ]*(?P<DP_LATENCY_TIME_RES_HDR_RECVD>[0-9]*)[ ]*(?P<DP_LATENCY_TIME_RES_HDR_SENT>[0-9]*)[ ]*(?P<DP_LATENCY_TIME_BSTB>[0-9]*)[ ]*(?P<DP_LATENCY_TIME_BSTC>[0-9]*)[ ]*(?P<DP_LATENCY_TIME_RES_TRS>[0-9]*)[ ]*(?P<DP_LATENCY_TIME_BS_STYLE_READ>[0-9]*)[ ]*(?P<DP_LATENCY_TIME_BSPC>[0-9]*)[ ]*(?P<DP_LATENCY_TIME_BSCA>[0-9]*)[ ]*(?P<DP_LATENCY_TIME_BSCC>[0-9]*) \[(?P<DP_Backside_URL>.*)\]


Sample Latency Log:

Feb 07 16:26:15 ibmadmin_dp_device_host_name ibmadmin_Domain1 [0x80e00073][latency][info] mpgw(DataPower_ibmadmin_MPGW): trans(113306135) gtid(219725225): Latency:   0  37   0  36  37  31   6 303 329 303 329 329 322 303  36  37 [https://ibmadmin.wordpress.com/2017/02/08/ibm-websphere-datapower-latency-log-parser-for-splunk/]

The following website will help us to build and test the regular expression (regex):

https://regex101.com/

Ref:

https://www.ibm.com/developerworks/community/blogs/aimsupport/entry/analyzing_datapower_latency_log?lang=en

http://www-01.ibm.com/support/docview.wss?uid=swg21239328

CPU and Memory Utilization Report Generation From glance UNIX Command

 

Follow the below steps to collect the CPU and Memory Utilization for a particular physical server from ‘glance’ UNIX command.

Steps

1. Prepare glance syntax file with the following content. (e.g. vi glance_syntax.txt )

For HP Servers:

print GBL_STATDATE,” “,gbl_stattime, “,”,GBL_CPU_TOTAL_UTIL,”,”,GBL_MEM_UTIL_CUM, “,”,GBL_MEM_ACTIVE_VIRT_UTIL

For Solaris Servers:

print GBL_STATDATE,” “,gbl_stattime, “,”,GBL_CPU_TOTAL_UTIL,”,”,GBL_MEM_UTIL_CUM

2. Run the glance UNIX command in any UNIX terminal with the desired interval (-j option in seconds). We can run the below command as back-ground process. If we run this command as back ground process, then we need to kill the process once we collected enough stats for a particular server. This process won’t stop automatically. We need to kill the process once we are done with the stats collection.

For every 1 minutes:

glance -adviser_only -j 60 -syntax ./glance_syntax.txt >> `hostname`_glance_out.csv &

For every 5 minutes:

glance -adviser_only -j 300 -syntax ./glance_syntax.txt >> `hostname`_glance_out.csv &

3. Open the <host_name>_glance_out.csv file in excel to get the Date and Time (Column 1) , CPU Utilization % (Column 2) and Memory Utilization % (Column 3) like below.

Date Time CPU % Mem % Swap %

Note: Please refer the /opt/perf/paperdocs/gp/C/gp-metrics.txt help document to know about the glance command syntax to collect more metrics details from glance UNIX command.

$ hostname
 ibmadminHost
 $ pwd
 /opt/perf/paperdocs/gp/C
 $ ls -ltr
 total 1488
 -r--r--r-- 1 root sys 102983 Oct 3 2007 gpinst.pdf
 -r--r--r-- 1 root sys 637200 Oct 3 2007 gp-metrics.txt
 $

More example:

print GBL_STATDATE,” “,gbl_stattime, “Your Own String ————> “,GBL_CPU_TOTAL_UTIL, ” SWAP MEMORY ===I -> “,GBL_MEM_ACTIVE_VIRT_UTIL, ” Server System Memory Utilization % ******* -> “,GBL_MEM_SYS_UTIL ,”Total Memory Utilization % #### “,GBL_MEM_UTIL_CUM

Output:

 /home/ibmadmin/glance_monitoring$glance -adviser_only -j 10 -syntax ./glance_syntax.txt
 07/27/2012 13:39:55Your Own String ------------> 11.8 SWAP MEMORY ===I -> 74.5 Server System Memory Utilization % ******* -> 42.7Total Memory Utilization % #### 96.2
 07/27/2012 13:40:05Your Own String ------------> 6.8 SWAP MEMORY ===I -> 74.5 Server System Memory Utilization % ******* -> 42.8Total Memory Utilization % #### 96.3
 07/27/2012 13:40:15Your Own String ------------> 5.2 SWAP MEMORY ===I -> 74.8 Server System Memory Utilization % ******* -> 42.7Total Memory Utilization % #### 96.3
 /home/ibmadmin/glance_monitoring$
 /home/ibmadmin/glance_monitoring$
 /home/ibmadmin/glance_monitoring$cat glance_syntax.txt
 print GBL_STATDATE," ",gbl_stattime, "Your Own String ------------> ",GBL_CPU_TOTAL_UTIL, " SWAP MEMORY ===I -> ",GBL_MEM_ACTIVE_VIRT_UTIL, " Server System Memory Utilization % ******* -> ",GBL_MEM_SYS_UTIL ,"Total Memory Utilization % #### ",GBL_MEM_UTIL_CUM
 /home/ibmadmin/glance_monitoring$

Ref Link: http://www.filibeto.org/unix/hp-ux/lib/kernel/perftun/glance-adviser.pdf

Read More…

How to upgrade/update WMQ Resource Adaptor (RA) in Websphere Application Server Environment

Introduction

Some time, we may need to upgrade IBM Websphere Application Server resources adaptors (like MQ or other specific adaptors) separately from the IBM Websphere Application Server fix pack upgrade activity. In IBM Websphere Application Server 7.0 (most likely WAS6.1 as well) the IBM MQ resource adapters won’t be upgraded automatically to the latest version of MQ resource adaptor which is bundled with IBM Websphere Application Server 7.0.0.X fix pack release.  This might cause some unwanted result in your middleware environment like, memory leak issue in JVMs, mq transaction issue and IBM Websphere Message Queue channel count issue in the MQ servers. These situations force the middleware administrators to upgrade the IBM Websphere Application Server – WMQ adaptor separately as IBM WAS upgrade won’t update the WMQ by default.

Read More…

How To Run PERL Program in Windows And UNIX OS

 

Shebang Line

The PERL programming help system administrators and middleware administrators to simplify their day-today administration work.  Under the UNIX environment, the program execution (i.e. shell or C or PERL program) is determinded by the first line of the program.  This is called “the shebang line” in Shell / Perl culture, or alternately the “sharpbang” or the “hash-bang”. The following are the example to run a program in bash shell or sh shell or PERL programs using  Shebang line.

#!/usr/bin/bash

#!/usr/bin/sh

#!/usr/bin/perl

Read More…

Posted by: ibmadmin | October 21, 2011

Date Time Format in Mirosoft Project 2003

The Microsoft Project is the one of the easiest way to track any middleware projects and task. But when we try to add the task in the Microsoft Project, most of the people see some issue in date time format. Here are the steps to render the correct date time format in the Microsoft Project 2003.

Read More…

Posted by: ibmadmin | October 4, 2011

How to empty the file content

Some time, we may need to delete the file content with out deleting the file. In this case we need to use the following command to empty the SystemOut.log file content.

cat /dev/null > SystemOut.log

The above command nullify the SystemOut.log file content. So after that we will get the new file entries in the SystemOut.log.

Read More…

We might have to handle big messages during our day today transaction like big email attachment going through the IBM Websphere MQ queues. In this case, we need to consider the message size do make the transaction successful. The default maximum message size for a queue in the IBM Websphere MQ is 4MB. This is optimized for most of the transaction. But for some case, we may need to handle email attachment, big size pdf documents and other big hash maps in the transactions. This leads us to use the queue which should handle big size messages, since we need to consider the MAXMSGL i.e. maximum message size attribute for a particular queue.
Read More…

Posted by: ibmadmin | May 15, 2011

Sample Script Links

The following links contains the sample scripts for WMIC and other scripting language

http://msdn.microsoft.com/en-us/library/ms974579.aspx

http://www.robvanderwoude.com/wmiexamples.php

http://ss64.com/index.html

Windows Management Instrumentation Command-line (WMIC) Tool

We have various Windows command to get to know about the system details. But there is one command which will give all the details about the Windows System. The command is

WMIC – Windows Management Instrumentation Command-Line

There are two way to execute the WMIC command. We can run the WMIC command in the interactive mode (i.e. like command prompt) and we can use the command in batch file sequence as statements.

Read More…

How to determine IBM WebSphere Application Server bit version

In IBM WebSphere world, many time we need to decide the java bit version to decide on the process heap size setup. One of the main benefit of java 64bit version is the high memory (heap size) allocation for an individual process. The 64bit version process have it own impact for the slowness of the process as it is handling the large execution instruction. But the computation speed is high compare to 32 bit java process. The details of the 64 bit and 32 bit java (IBM WAS) performance behavior are explained in the IBM Site in the following link.

http://public.dhe.ibm.com/partnerworld/pub/whitepaper/1d71a.pdf

Read More…

Older Posts »

Categories