Posts

Enabling GC Activity Logging Without Restarting the JVM

Enabling Garbage Collection (GC) activity logging normally requires a restart of the JVM hosting the service. Below steps explains how GC logging can be enabled without requiring a JVM restart for a chosen service. Assuming  user1  is the  owner  of the running JVM process, and  10274  is the  PID  (Process ID) of the JVM you are targeting, you can get the GC logging info from it by using: sudo -u user1 /usr/java/default/bin/jinfo -flag +PrintGC 10274 sudo -u user1 /usr/java/default/bin/jinfo -flag +PrintGCTimeStamps 10274 sudo -u user1 /usr/java/default/bin/jinfo -flag +PrintGCDetails 10274 Note: The output is stdout

Shell Script to add SSH automatic Login

Script to add SSH automatic Login #!/usr/bin/ksh -f RUSER=$1 RHOST=$2         if [ -z "${RHOST}" ]         then                 echo "\nUsage: $0 remoteUserName remoteHostName\n"                 exit 22         fi         if [ ! -f ${HOME}/.ssh/id_rsa.pub ]         then                 echo "SSH not configured for user ${LOGNAME} - creating key..."                 ssh-keygen -trsa -N "" -f ~/.ssh/id_rsa                 STATUS=$?                 if [[ ${STATUS} -ne 0 ]]                 then                         echo "SSH configurat...

Shell Script to kill all java processes on different hosts

Shell Script to kill all java processes on different hosts. The scripts assumes auto login using shh is enabled. The steps are explained here #!/bin/bash #################################### # Set These Values to correspond to your environment #################################### BLHOSTS=(linhtr1 linhtr2 linhtr3 linhtr4); SH_CMD=ssh #################################### SCRIPT_HOME=`dirname $0` for host in ${BLHOSTS[@]}; do      echo $SH_CMD $host "ps -ef | grep java|cut -b10-15|xargs kill -9"      $SH_CMD $host "ps -ef | grep java|cut -b10-15|xargs kill -9" done

Unable to create new native threads resolution

In one of our new machines, we are trying to start our servers. For 4 Servers, the system was working properly, but with 8 Servers it was throwing below exception. [gsc][3/20922] Caused by: java.lang.OutOfMemoryError: unable to create new native thread 2012-09-19 20:06:24,217 GSA WARNING [com.gigaspaces.grid.gsa] - [gsc][3/20922]: Reported Error [Restart Regex [.*java.lang.OutOfMemoryError.*] matching [Caused by: java.lang.OutOfMemoryError: unable to create new native thread]], restarting [gsc][1/] /<path>//bin/gs.sh: line 92: 21421 Aborted (core dumped) "$JAVACMD" ${JAVA_OPTIONS} -DagentId=${AGENT_ID} -DgsaServiceID=${GSA_SERVICE_ID} $bootclasspath $script_classpath ${RMI_OPTIONS} $libpath ${LOOKUP_GROUPS_PROP} ${LOOKUP_LOCATORS_PROP} -Dcom.gs.logging.debug=false ${GS_LOGGING_CONFIG_FILE_PROP} $NETWORK $DEBUG $launchTarget $command_line # # There is insufficient memory for the Java Runtime Environment to continue. # Cannot create GC thread. Out of system reso...

ssh Auto Login without prompt for password

Problem:  On 4 of my Linux boxes i want to run some scripts by running them on all of boxes. I Login to one machine and run the script to use all 4 machines to perform the task. We use SSH to run our tasks. Therefore we need an automatic login from host machine to other machines. We don't want to enter any passwords, because you want to call ssh from a within a shell script. Steps to Perform this: We have 4 machines named linhtr01, linhtr02, linhtr03, linhtr04. We have same user and password on all 4 machines. Lets Assume Host machine as linhtr01. 1. Login to Host machine linhtr01. 2. Generate a pair of authentication keys without entering a passphrase   user1@linhtr01:~> ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/home/user1/.ssh/id_rsa): Created directory '/home/user1/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/user1/.ss...

To view more records in parameter file in VuGen

Image
We know that in Vugen parameter file, by default only 100 records are visible in the table as shown below. As we see below there are more records in the dat file, but only first 100 records are shown. To increase the number of visible records, perform the following steps: Go to config folder as C:\Program Files\HP\LoadRunner\config Open VuGen.ini Search for MaxVisibleLines By default it shows MaxVisibleLines=100 Change 100 to desired value like 10000 Save the file. Now reopen the parameter, 10000 rows will be visible.

Extended Log

Recently, I was running some support flows for a CRM application. After recording the scripts, I was about to run load test. For this purpose I refreshed the database. When I replayed the scripts with fresh database dump, close case started failing as shown below: Action.c(344): Notify: Transaction "11. Close Case" started. Action.c(346): Error -26368: "Text=com.uif.common.ExceptionInfo" found for web_global_verification ("CRMGlobal") (count=1)         [MsgId: MERR-26368] Action.c(346): web_custom_request("crm_39") highest severity level was "ERROR", 3811 body bytes, 312 header bytes     [MsgId: MMSG-26388] Action.c(346): Notify: Transaction "11. Close Case" ended with "Fail" status (Duration: 1.1719). As we can see above there is an exception com.uif.common.ExceptionInfo. The above detail was displayed when the logging level is set to standard log. Since an exception has occurred after refreshing...