August 2015
M T W T F S S
 12
3456789
10111213141516
17181920212223
24252627282930
31  

Categories

August 2015
M T W T F S S
 12
3456789
10111213141516
17181920212223
24252627282930
31  

Finding the process that locked a port in AIX

Finding the process that locked a port in AIX ******************************************************************** Run the following command to check if port is in use

# netstat -an | grep <port number>

If above returns the connection, then run the following command to get the address of the port number

# netstat -Aan | grep <port number>

Once you […]

weblogic script

#!/bin/sh if [ -z “$1” ]; then echo “You must supply either start or stop command while calling this script! correct usage: weblogic_start_stop.sh start|stop” exit fi bold=`tput bold` normal=`tput sgr0` case “$1” in ‘start’) echo “Starting Management Node & Weblogic Server 10.3.6” echo “Starting NodeManager” nohup $WLS_HOME/server/bin/startNodeManager.sh > /dev/null 2>&1 & sleep 10 output=`ps […]

gsk7cmd

SSL Commands using GSK

====================== export PATH=/opt/IBMJava/bin:/usr/local/ibm/gsk7/bin:$PATH export CLASSPATH=/usr/local/ibm/gsk7/classes/cfwk.zip:/usr/local/ibm /gsk7/classes/gsk7cls.jar:$CLASSPATH

Any GSK cmd can be executed using: ================================== java com.ibm.gsk.ikeyman.ikeycmd command

Creating a new key DB with password: ==================================== gsk7cmd -keydb -create -db <filename> -pw <password> -type <cms | jks | jceks | pks12> -expire <days> -stash

Creating a new key DB without the password: […]

Decrypt IBM stash files

Decrypt IBM stash files If you are working on Websphere set of products for a while then I am sure you have been in situations where you don’t remember the password of your ssl key database file. In such a situation this perl script will help you and I am sure you will thank […]

Show information for solaris 10

#!/usr/bin/env ksh export LANG=C export PATH=${PATH}:/sbin:/usr/sbin:/usr/bin ################################################### ## Analysis for SUN by Lee Kwang Hyun ## ( Last Update. 2009.11.13 / Only Solaris 10) ################################################### DD=`date “+%y%m%d%H%M”` TMPVAR=”temp” TEMPVR=”temp” TMPTXT=/tmp/anal4sun.${DD} ROOTFS=”/dev/rdsk/c0t0d0″ ROOTDV=”c0t0d0″ TPMC=`cat /river/SYSINFO/tpmc.txt` #####################( MAIN ) main(){ OPTION=”$1″ ### hostname echo “HOST\t: $(hostname) (`hostid`)” ### model (product) prtdiag | grep “^System Configuration” | awk […]

Clear contents of a file in UNIX

Clear contents of a file in UNIX

$cat /dev/null > file

or

$true > file

AIX : Machine Type & Serial Number

AIX : Machine Type & Serial Number

uname -m for the serial number

uname -M for the machine type and model

Viewing file systems that 90% and more using awk & sed

This works with AIX

df -g | egrep -v “Filesystem|proc|tmp” | sed ‘s/\%//’ | awk ‘$4 >= 90 {print $4 “%\t” $7}’

df -k | sed 1d | awk ‘$4>90 {print}’

This works with Solaris and Linux

df -k | egrep -v “proc|fd|cdrom|mnttab|run|tmp|Filesystem” | sed ‘s/\%//’ | awk ‘$5 >= 90 {print $5 “%\t” $6}’

Configure ipfilter on Solaris10 as a host based firewall

1- Start by check ipfilter status if it’s running you can go ahead and configure rules

-bash-3.00$ svcs -a|grep -i ipfil online 10:29:37 svc:/network/ipfilter:default

if it’s disabled enable it

#svcadm enable ipfilter

2- Display rules

#bash-3.00ipfstat -io block out all pass out quick on lo0 all pass out quick on eri0 proto tcp/udp from […]

Clear DNS cache solaris

Clear DNS cache You can clear DNS cache in Solaris by doing the following

#/etc/init.d/nscd stop #/etc/init.d/nscd start