Posts

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...

THINK TIME – Part 1

Image
According to VuGen Document think time is "The time that a user waits between performing successive actions is known as the think time."   Think time is the time spent by a user perusing a Web page, including viewing the page and determining the next action. Think time does not include the time that is required for a page to load.   Why think time is important? Answer will be Think time makes our scripts more realistic. But why does think time matter? If I have a simple script that logs into an application, performs some actions like check account balance, Transfer amount ..etc and then logs out, why do I care if it pauses in-between page requests? Actually, Think time matters because it holds the current user's session for a realistic period of time. This means the memory footprint of that user exists for longer (compared to not using or ignoring think time) and as a consequence we can be more confident that our scripts/test is providing a useful representation ...

What is HTTP?

What is HTTP? HTTP is the protocol that web clients (like a browser) and a server use to talk to one another. Knowledge of HTTP is essential for understanding how web performance test scripts or in general web work. When we are looking at performance logs, knowledge of HTTP understanding will help us to verify that a HTTP request was successful and that there were no errors generated during a test run. 3 Main Elements a HTTP message is made up of: All HTTP messages are generally made up of three main parts: Request – a client makes a request using either a GET or a POST method ·          GET method – is a request for info located at a specified location on the server. “GET” is basically for just getting (retrieving) data. ·          POST method – allows data to be sent to the server within a client’s request (an html form would be one example). “POST” may involve anything, like storing...