Posts

Using gdb to find memory leaks in HP Unix

Using gdb to find memory leaks in HP Unix The following gdb commands are used to setup memory leak detection in C++ programs: set heap-check leaks on set heap-check free on set heap-check bounds on set heap-check scramble on To show the leak the following command is used: (gdb) info leaks To view a particular leak from a list of leaks detected use the following: (gdb) info leak  <leak number> ( leak number is the relevant number from the leak) It is very important that program be linked with librt.sl shared library to use heap profiling. The following example is using xscAppAdapter as a C++ program to demonstrate memory leak detection. 1) Set Heap Options >>gdb xscAppAdapter.gdb (gdb) set heap-check leaks on (gdb) set heap-check free on (gdb) set heap-check bounds on (gdb) set heap-check scramble on (gdb) b xscAppAdapter::processMessage 2) Set Breakpoint and Run Application and continue once past the breakpoint to process a message and t...

Linux Kernel Parameter Tuning for Performance Testing

Here are some of the kernel parameters I used on one of the Linux system /etc/sysctl.conf # Kernel sysctl configuration file for Red Hat Linux # # For binary values, 0 is disabled, 1 is enabled.  See sysctl(8) and # sysctl.conf(5) for more details. # Controls IP packet forwarding net.ipv4.ip_forward = 0 # Controls source route verification net.ipv4.conf.default.rp_filter = 1 # Do not accept source routing net.ipv4.conf.default.accept_source_route = 0 # Controls the System Request debugging functionality of the kernel kernel.sysrq = 0 # Controls whether core dumps will append the PID to the core filename # Useful for debugging multi-threaded applications kernel.core_uses_pid = 1 # Controls the use of TCP syncookies net.ipv4.tcp_syncookies = 1 # Controls the maximum size of a message, in bytes kernel.msgmnb = 65536 # Controls the default maxmimum size of a mesage queue kernel.msgmax = 65536 # Controls the maximum shared segment size, in bytes kernel.shmmax = 68719476736 # ...

Importing Database

To make db instance up:- login as oracle user source sett.csh <db> lsnrctl start sqlplus /nolog conn logon as sysdba; password <blank> startup ================================================ Steps to import Import Data dump: create Directory <name> AS '<path>/dumpfile' grant read,write on DIRECTORY <name> TO sa; impdp sa/sa@<Instance> DIRECTORY=<name> dumpfile=file.dmp

Tuning Oracle Database for Performance Testing

Tuning Database for Performance Testing: 1.       USERS tablespace created with a size of 20 GB 2.       INDX tablespace created with 15 GB 3.       TEMP tablespace set to 1 GB CREATE TABLESPACE INDX DATAFILE   '<path>/oracle/oradata/<Instance>/INDX_1.dbf' SIZE 6100M AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED,   <path>/oracle/oradata/<Instance>/INDX_2.dbf' SIZE 6100M AUTOEXTEND ON NEXT 10M MAXSIZE UNLIMITED LOGGING ONLINE PERMANENT EXTENT MANAGEMENT LOCAL UNIFORM SIZE 40K BLOCKSIZE 8K SEGMENT SPACE MANAGEMENT MANUAL FLASHBACK ON; ALTER TABLESPACE USERS ADD DATAFILE '/<path>/oracle/oradata/<Instance>/users02.dbf' SIZE 5120M AUTOEXTEND OFF; ALTER TABLESPACE USERS ADD DATAFILE '<path>/oracle/oradata/<Instance>/users03.dbf' SIZE 5120M AUTOEXTEND OFF; ALTER TABLESPACE USERS ADD DATAFILE '<path>/oracle/oradata/<Instance>/users04.dbf' SIZE 5120M AUTO...

To obtain GC Activity in Logs in Weblogic

Open setDomainEnv.sh and change it by adding the below lines and deleting some more lines as shown below. WLS_HOME="${WL_HOME}/server" export WLS_HOME #**************************** echo SERVER_NAME=$SERVER_NAME GCLOGFILE="bin/JVMGCStats$SERVER_NAME.log" echo *********************** if [ "${SERVER_NAME}" = "AdminServer" ] ; then MEM_ARGS="-verbose:gc -Xms1024m -Xmx1024m -XX:MaxPermSize=128m -XX:SurvivorRatio=8 -XX:+PrintGCDetails -XX:+PrintTenuringDistribution -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGC -Xloggc:$GCLOGFILE -DSESS_CLEAN_STARTUP=0 -DSESS_CLEAN_SLEEP=86400" else MEM_ARGS="-verbose:gc -Xms2048m -Xmx2048m -XX:MaxPermSize=256m -XX:SurvivorRatio=8 -XX:+PrintGCDetails -XX:+PrintTenuringDistribution -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGC -Xloggc:$GCLOGFILE" fi #*************************** if [ "${JAVA_VENDOR}" = "Sun" ] ; then  if [ "${PRODUCTION_MODE}" = "" ] ; t...

Tips on Load Runner Scripting for Smart Client

It is required to have Load Runner 8.1 or later version, since Load Runner version 7 does not record or send out http HEAD request This omission will cause the smart client not able to login to the server. These are the recording steps, applicable for both smart client and JNLP recording: Start Load Runner 8.1 Virtual User Generator. Choose New User Script from pull down menu. Choose Web(HTTP/HTML) from “ New Single Protocol Script ” Window Choose Internet Application from “ Start Recording ” Window Choose HTML-based Scripts from “Recording Options” Choose “ A script describing user_action(e.g. web_link, web_submit_form) ” and “ Record with the current script step ” from “ Advanced HTML ” Window Start the recording An Internet Explorer browser will be brought up. Type in the url for downloading the smart client, like the normal way starting from the browser. After the smart client is downloaded, a create short cut message will be display and the smart client will be starte...

Monitoring Tools

Monitoring Tools E2E processes 1.   Dynatrace 2.   HP Diagnostic 3.   JMX batch monitoring Inflation/Testing 1.Mainly Load Runner 2.Using DB scripts System Statistics 1.   Load Runner 2.   Nmon 3.   Glance 4.   Spider 5.   AWR DB Monitoring 1.   OEM Java 1.   HP Jmeter 2.   Jprobe 3.   Jprofiler C++ Memory leaks/corruptions 1.   Valgrind 2.   Totalview