Thursday, May 22, 2008
initial context - OOM
Tuesday, April 29, 2008
How to find HP system version
provides version of HP unix
getconf KERNEL_BITS
to find out 32 / 64 bit processor
Saturday, April 12, 2008
Relook logic
Wednesday, February 27, 2008
Weblogic server status check - UNIX command
Here is the step to check Admin server status
. setEnv.sh
$JAVA_HOME/bin/java weblogic.Admin -url $admin_server PING 1 >/dev/null 2>&1
admin_server_status=$?
Step to check Managed server status
ms_server_status=`$JAVA_HOME/bin/java weblogic.Admin -url $admin_server GETSTATE $app_name grep -c RUNNING `
Tuesday, February 12, 2008
write small script to simplify deployment/bounce
Making it as a simple script has several advanatges,
1. we dont need to remember each and individual commands and dont need to remember authentication details
2. all typo can be avoided
3. In the long run this can save lot of time
4. anyone can easily manage
example of scripting managed weblogic server:
startDemoApp1.sh
umask 002
WLS_USER=admin
WLS_PW=admin123
export WLS_USER
export WLS_PW
nohup ./startManagedWebLogic.sh demoapp1 t3://localhost:7200 $* > demoapp1.out 2>&1 &
stopDemoApp1.sh
./stopWebLogic.sh admin admin123 demoapp1 t3://localhost:7200
Thursday, February 7, 2008
UML Tools
It has got great reporting option to create both rtf and html versions. For the kind of price it is pretty good tool.
Tuesday, January 22, 2008
Script to check OpenDB
I am mostly working on automating all the steps of deployment and testing. Most of the time we face open DB issue. Somewhere in the server, there can be code issue which leads to holding database connection. This happens mainly with the old release codes. This needs to be constantly monitored across the system. The better approach would be poling DB to check no of database connection which is idle for more than specified time (say 1 hour). This is simple in case of Oracle, because this information can be derived from v$session table.
It has to be implemented with some scripting language (like PERL), but decided to use ant because this has been used before. Here is the sample target used,
<target name="db1" if="oracle1.url" >
<!-- Connect to database to find idle connections -->
<echo message="......................... ${db1.name} .........................."/>
<sql
driver="${oracle1.driver}"
url="${oracle1.url}"
userid="${oracle1.user}"
password="${oracle1.password}"
print="yes"
showheaders="false"
showtrailers="false"
onerror="continue"
output="${session.log}"
keepformat="yes"
>
<classpath refid="common.classpath"/><![CDATA[
select rpad(username,15 ,' ')
rpad(MACHINE, 30,' ')
rpad(process,15, ' ')
lpad(last_call_et,15, ' ') ' '
rpad(osuser, 15,' ')
from V$session where
last_call_et > ${oracle1.min.idle.time}
and last_call_et < ${oracle1.max.idle.time}
and username = UPPER('${oracle1.user}')
and (
machine in ( ${oracle1.machine.name} ) OR
osuser in ( ${oracle1.os.user} )
);
]]>
</sql>
</target>
All the parameter can be configured and email the result file session.log
Now this can be set as crontab and run every one hour.