Friday, November 15, 2013

Netapp Ontap IPSEC

Storage IP:172.172.1.1

options ip.ipsec.enable on
#Allow 10.10.10.10
ipsec policy add -s 10.10.10.10  -t 172.172.1. -p esp -e 3des -a md5 -d in -l permit
#Deny subnet 10.10.10 
ipsec policy add -s 10.10.10.0 -t 172.172.1.1 -p esp -e 3des -a md5 -d in -l restrict

Monday, September 23, 2013

Drop Uniq Key on Racktables DB

mysql> show databases;

+----------------------------+
| Database                   |
+----------------------------+
| information_schema |
| mysql                          |
| racktables_db           |
+----------------------------+
5 rows in set (0.00 sec)
use racktables_db;
mysql> describe Object;
+--------------------+-----------------------+------+-------+---------+---------------------+
| Field                 | Type                     | Null | Key    | Default | Extra                |
+--------------------+-----------------------+------+-------+---------+---------------------+
| id                       | int(10) unsigned | NO   | PRI   | NULL | auto_increment |
| name                | char(255)             | YES |          | NULL |                            |
| label                  | char(255)            | YES |          | NULL |                             |
| objtype_id        | int(10) unsigned | NO    | MUL | 1        |                            |
| asset_no          | char(64)              | YES  | UNI   | NULL |                            |
| has_problems | enum('yes','no')   | NO   |           | no      |                            |
| comment          | text                       | YES |           | NULL |                           |
+--------------------+-----------------------+------+--------+---------+--------------------+
7 rows in set (0.00 sec)

mysql> show create table Object;
+--------+----------------------------------------------------------------------------------------------------+
| Table  | Create Table                                                                                                       |
+--------+----------------------------------------------------------------------------------------------------+
| Object | CREATE TABLE `Object` (
`id` int(10) unsigned NOT NULL auto_increment,
`name` char(255) default NULL,
`label` char(255) default NULL,
`objtype_id` int(10) unsigned NOT NULL default '1',
`asset_no` char(64) default NULL,
`has_problems` enum('yes','no') NOT NULL default 'no',
`comment` text,
PRIMARY KEY (`id`),
UNIQUE KEY `asset_no` (`asset_no`),
KEY `id-tid` (`id`,`objtype_id`),
KEY `type_id` (`objtype_id`,`id`)
) ENGINE=InnoDB AUTO_INCREMENT=157 DEFAULT CHARSET=utf8 |
+--------+----------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

mysql> alter table Object drop index asset_no;
Query OK, 101 rows affected (0.05 sec)
Records: 101 Duplicates: 0 Warnings: 0

Wednesday, March 20, 2013

Extract DB2 Audit Content Command:
(Sample)
db2audit extract delasc to . from files ~/sqllib/security/auditdata/db2audit.instance.log.0.20130320085414

DB2 Memo

Structure low - > high

Physical Page * 4 ( or * 8) = Extent * 1
Multi Extent = Table * 1

!! 1 Extent only contain 1 Table data !!


normal table with Single dimensional Clustering only can be sort by 1 column. ( command: organie by (column1) )
Multidimensional Clustering Table can be sort by more thane 1 column. ( command: organie by (column1,column2,..,columnX) )
Multidimensional Clustering Index will automatic create when Table create.

Wednesday, January 30, 2013

How to add IBM DB2 App Driver in SQuirreL

How to add IBM DB2 App Driver in SQuirreL IBM DB2 App Driver Add to Extra Class Path db2jcc.jar db2jcc_license_cu.jar Fix COM.ibm.db2.jdbc.app.DB2Driver -> com.ibm.db2.jcc.DB2Driver

Tuesday, May 24, 2011

[DB2] Scripts for Reorg DB , Can't use it on production DB

db2 list tables for schema tpasadm |grep TPASADM | awk '{print $1}' | while read tblname
do
db2 connect to tpas
db2 reorgchk current statistics on table TPASADM.$tblname |grep "Index:" | awk '{print $2}' |while read idxname
do
db2 connect to tpas > /dev/null
printf "Reorg Table $tblname Index $idxname \n"
db2 reorg table TPASADM.$tblname index $idxname inplace allow write access > /dev/null
db2 terminate > /dev/null
done
done

Wednesday, January 12, 2011

Step of DB2 reorg

Table name:SIVIEW.FRLOTNOTE
Index name:siview.IRCAST_LOT

1.runstat
db2 runstats on table SIVIEW.FRLOTNOTE and index all allow write access
2.reorgchk
db2 reorgchk current statistics on table all(or SIVIEW.FRLOTNOTE)
3.reorg
db2 "reorg table SIVIEW.FRCAST_LOT index siview.IRCAST_LOT inplace allow write access"
4.reorg status check
db2pd -d tpas -reorgs |grep FRCAST_LOT
5.reorgchk again(check)
db2 reorgchk current statistics on table all
6.done

Monday, October 04, 2010

[Job]Collect Every Server Messages File Data In List

#!/bin/bash
#########################################################
# #
# Collect Server Messages File V2.10 #
# #
# Range: 1 to 3 Days #
# Location: /var/log/messages #
# by Hata 2010/10/04 #
#########################################################

### Check c_hosts File ######################################################################################

if [ ! -f c_hosts ]; then
clear
printf "\n\n\n\t\t\tc_hosts is no exist !\n\n\n "
exit 1
fi

##### Define Environment #####################################################################################

work_area="/nishome/hata/check_messages/"
hostname=`hostname`
grep_date=`date --date=-1days|awk '{print $2,$3}'`
grep_date_2=`date --date=-1days|awk '{print $2"-"$3}'`
grep_1days=`date --date=-1days|awk '{print $3}'`
grep_2days=`date --date=-2days|awk '{print $3}'`
grep_3days=`date --date=-3days|awk '{print $3}'`
grep_1days_month=`date --date=-1days|awk '{print $2}'`
grep_2days_month=`date --date=-2days|awk '{print $2}'`
grep_3days_month=`date --date=-3days|awk '{print $2}'`

#printf " $grep_1days_month $grep_2days_month $grep_3days_month $grep_1days $grep_2days $grep_3days\n"

act_hosts=`cat c_hosts |grep -v "#" |grep linux | awk '{print $1}'`
act_aix_hosts=`cat c_hosts |grep -v "#" |grep aix |awk '{print $1}'`
date8=`date +%Y%m%d`
clear

##### If last_day Directory is exist, Stop this program.
if [ -d last_day ]; then
rm -rf last_day
fi

##### If GZip file is exist, Stop this program.
#if [ -f $grep_date_2.tar.gz ]; then
# clear
# printf "\n\n\t $File \e[1;33;5m $grep_date_2.tar.gz \e[0m Already Exist.\n\n\n"
# exit 1
#fi
mkdir last_day
cd last_day

### Function of Collect Message File #########################################################################

function collect_message(){

if [ $grep_2days_month != $grep_1days_month ]; then
for i in $act_hosts
do
grep_date1="$grep_1days_month $grep_1days"
grep_date2="$grep_2days_month $grep_2days"
ssh $i cat /var/log/messages |grep "$grep_date1" |grep -v sysusage $$ ssh $i cat /var/log/messages |grep "$grep_date2" |grep -v sysusage >> $i.mesg
if [ -s $i.mesg ]; then
printf "Host : $i is Done.\n " >> $work_area/collect.log 2>&1
else
printf "Host : $i have no data.\n " >> $work_area/collect.log 2>&1
fi
done
else
for i in $act_hosts
do
grep_date1="$grep_1days_month [$grep_3days-$grep_1days]"
printf " $i $grep_date1 $grep_date2\n"
ssh $i cat /var/log/messages |grep "$grep_date1" |grep -v sysusage >> $i.mesg
if [ -s $i.mesg ]; then
printf "Host : $i is Done.\n " >> $work_area/collect.log 2>&1
else
printf "Host : $i have no data.\n " >> $work_area/collect.log 2>&1
fi
done
fi

if [ $grep_3days_month != $grep_1days_month ]; then
grep_date1="$grep_1days_month $grep_1days"
elif [ $grep_2days_month != $grep_1days_month ]; then
grep_date1="$grep_1days_month $grep_1days"
grep_date2="$grep_2days_month [$grep_3days-$grep_2days]"
ssh $i cat /var/log/messages |grep "$grep_date1" |grep -v sysusage $$ ssh $i cat /var/log/messages |grep "$grep_date2" |grep -v sysusage >> $i.mesg
# ssh $i cat /var/log/messages |grep "$grep_date" |grep -v sysusage >> $i.mesg
if [ -s $i.mesg ]; then
printf "Host : $i is Done.\n " >> $work_area/collect.log 2>&1
else
printf "Host : $i have no data.\n " >> $work_area/collect.log 2>&1
fi
else
grep_date1="$grep_1days_month [$grep_2days-$grep_1days]"
grep_date2="$grep_2days_month $grep_3days"
ssh $i cat /var/log/messages |grep "$grep_date1" |grep -v sysusage $$ ssh $i cat /var/log/messages |grep "$grep_date2" |grep -v sysusage >> $i.mesg
if [ -s $i.mesg ]; then
printf "Host : $i is Done.\n " >> $work_area/collect.log 2>&1
else
printf "Host : $i have no data.\n " >> $work_area/collect.log 2>&1
fi
fi

}

### Function of Packing Message File to TAR.GZ File ##########################################################

function packing_data(){
cd ..
tar zcvf $grep_date_2.tar.gz last_day > /dev/null
rm -rf $work_area/last_day
chown hata $grep_date_2.tar.gz
clear
printf "\n\n\t Job is Done.\n\n"
filesize=`ls -la |grep $grep_date_2 |awk '{print$5}'`
printf " File $grep_date_2.tar.gz size is $filesize\n\n."
}


### Function of AIX

function aix_collect(){
for i in $act_aix_hosts
do ssh $i errpt -a > AIX.$i.mesg
printf "Host : $i is Done.\n " >> $work_area/collect.log 1>&2
done
}

### Function for Check /usr/local/sysusage/etc/sysusage.cfg
function chk_sys(){
for i in $act_hosts
do ssh $i test -f /usr/local/sysusage/etc/sysusage.cfg
done
}

### Main Function ##############################################################################################

printf " \n\n\n\n\n"
printf "\t\t#############################################################################\n"
printf "\t\t# #\n"
printf "\t\t# Please Input How Many Days You Want Collect.( 1 to 3 days) #\n"
printf "\t\t# #\n"
printf "\t\t#############################################################################\n"
printf " \n"
printf "\t\t aix_collect : Renew AIXINFO\n"
printf "\t\t sys : Check Mail TO On sysusage.cfg\n\n\n"
read -p " Input Your Choice : " choice
case $choice in

"1")
printf "\n\n\n\t\t\t Collect Date $grep_1days Data\n"
grep_date=`date +%b" "%d --date=-1days`
collect_message 1
packing_data
exit 0
;;
"2")
printf "\n\n\n\t\t\t Collect Date $grep_2days_month-$grep_2days to $grep_1days_month-$grep_1days Data\n"
# grep_date="Sep [$grep_2days-$grep_1days]"
grep_date_2="$grep_2days_month-$grep_2days-$grep_1days_month-$grep_1days"
collect_message 2
packing_data
exit 0
;;
"3")
printf "\n\n\n\t\t\t Collect Date $grep_3days_month-$grep_3days to $grep_1days_month-$grep_1days Data\n"
# grep_date="Sep [$grep_3days-$grep_1days]"
grep_date_2="$grep_3days_month-$grep_3days-$grep_1days_month-$grep_1days"
collect_message 3
packing_data
exit 0
;;
"q")
clear
exit 0
;;
"*")
echo "Usage $0 { 1|2|3 }"
;;
esac

#printf "\n\n\n\t\t Collect $grep_date Message Data .......\n\n"

Sunday, October 03, 2010

Collect Profile Shell

Can Collect Most Data from AIX.


#!/bin/ksh
##################################################
#
# Collect System Informat II Version 1.0
#
# Author:Hata Jian
#
# Date:2007/12/27
#
##################################################
clear
#reln=`uname -r` #release number
ver=`uname -v`

pmday=`date +"%Y%m"`
h=`hostname`
sn=`prtconf | grep Number: | awk ' { print $4 } '`
mt=`prtconf |grep System |grep Model | awk '{print $3}`
mkdir $h-$sn-$pmday

# Program Start

if [ -f "$PWD/.comms" ]; then
COMM="$PWD/.comms"
else
echo "Error: Missing Command file."
exit 1
COMM="./comms"
fi

cd $h-$sn-$pmday
cat $COMM |grep -v "#"| while read COMM1 COMM2 COMM3;
do
which $COMM1 >> /dev/NULL
if [ `echo $?` = 0 ];then
eval $COMM3 >> $h-${mt#IBM,}-$sn-$COMM2-$pmday.txt
print "$COMM2...............is done."
else
if [ -f $COMM1 = "" ];then
exit 1
fi
fi
done;
clear

# Tar /etc File
tar cvf ./$h-$sn-$pmday/$h-etc.tar /etc > /dev/NULL 2>&1
cd ..
# Tar All File

i=`hostname`
pmday=`date +"%Y%m"`
sn=`prtconf | grep Number: | awk ' { print $4 } '`
mt=`prtconf |grep System |grep Model | awk '{print $3}`
#echo $i ${mt#IBM,} $sn $pmday
tar cvf $i-${mt#IBM,}-$sn-$pmday.tar $i-$sn-$pmday > /dev/NULL 2>&1
gzip $i-${mt#IBM,}-$sn-$pmday.tar
rm -rf $i-$sn-$pmday
clear
print " Collect Data is Finish."


[file .comms]
#Command########filename################Collect Data Command####################
df df-k df -k

Thursday, July 30, 2009

[AIX] KDB Command

CMD ALIAS ALIAS FUNCTION ARG


*** end-user ***

h ? help help [topic]
set setup display/update kdb toggles [toggle]
varset alias define a user variable var value
varlist list user variables
varrm unalias remove user variable var
his hi hist print history [?][count]
! shell escape command

*** leaving ***

e q g exit [dump]

*** changing context ***

sw switch switch to thread [th {slot/eaddr} | {u/k}]
cpu switch to cpu [cpu number | any]
runcpu run command on all CPUs cmd
context ctx switch to KDB context [cpu number]

*** calculator/converter ***

hcal cal calc/conv a hexa expr [-s] hexa expression
dcal calc/conv a decimal expr decimal expression
conv base conversion [-bdxo | -a base] [-s] num

*** common basic display ***

f stack where stack frame trace [+x/-x][th {slot/eaddr}]
status processor status
stat system status/messages
symptom display symptom string [-e][?]
pr print print a formatted structure at an address

*** memory/register display and decode ***

d dump display byte data symb/eaddr [count]
dw display word data symb/eaddr [count]
dd display double word data symb/eaddr [count]
dp display byte data phys. addr [count]
dpw display word data phys. addr [count]
dpd display double word data phys. addr [count]
dc dis display code symb/eaddr [count]
dpc display code phys. addr [count]
di decode decode the given instr hex-instr
dr display registers [gp|sr|sp|fp|name]

*** memory search and extract ***

find find pattern [-s] symb/eaddr patt. [mask ...
findp find pattern [-s] phys. addr patt. [mask ...
ext extract field [-p] symb/eaddr delta [size ...
extp extract field [-p] phys. addr delta [size ...

*** memory modification ***

m modify sequential bytes symb/eaddr
mw modify sequential word symb/eaddr
md modify sequential dword symb/eaddr
mr modify registers [gp|sr|sp|fp|name]

*** namelists/symbols ***

nm translate symbol to eaddr symb
ts translate eaddr to symbol eaddr
ns no symbol mode (toggle)
which wf Locate kernel symbols [?] | name | number

*** PCI cfg space & I/O Debugging ***

businfo Display struct businfo [[-?|a][-b [Bid]][eaddr]]

*** display miscellaneous kernel data structures ***

var Display var
drvars drv DRvars
ipl iplcb Display ipl proc info [*/cpu index]
dev devsw Display devsw table [symb/address/major]
intr Display int handler [slot/symb/eaddr]
uio Display the uio struct eaddr

*** display VMM information ***

ames VMM address map entries [?]
apt VMM APT entries [?]
ffbitmap ffbm Free-frame bitmap [?]
frameset frs Frame sets [frs_id]
free Count free frames
freelist Display free list frs_id
ipc IPC information [?]
rtipc RT IPC information [?]
rtipcd RT IPCD information [?]
lka lockanch tblk VMM lock anchor/tblock [slot/symb/eaddr]
lkh lockhash VMM lock hash [slot/symb/eaddr]
lkw lockword VMM lock word [slot/symb/eaddr]
lrulistobj lrulo LRU list object [memp_id | addr]
lrulist lrul LRU list [addr]
lrustate lrus LRU State [memp_id]
mempool memp Memory pools [memp_id]
pdt VMM paging device tab [*][]
pfhdata VMM control variables
pft VMM PFT entries [?]
pst VMM page sizes
psgc VMM Paging Space GC
scanstate scan VMM scan state info [addr]
swhat VMM SWHAT entries [?]
pvt pvlist VMM PVT/PVLIST entries [?]
pta VMM PTA segment [?]
pte VMM PTE entries [?]
rmap VMM RMAP [*][]
rvsid VMM reserved vsid info
scb VMM segment control blocks [?]
segst64 VMM SEGSTATE [-p pid][-e esid][[-s flag] [fno|shm]]
sr64 VMM SEG REG [-g [size]] [-p pid] [esid] [size]
ksp KSP Region information
ste VMM STAB [?][-p pid]
vmbufst Dump buf structs [eaddr]
vmaddr VMM Addresses
vmdmap VMM disk map [slot/symb/eaddr]
vmint VMM vmintervals info
vmker VMM kernel segment data
vmlocks vmlock vl VMM spin locks
vmlog VMM error log
vmpool VMM resource pools
vmstat VMM statistics
vmthrpgio THRPGIO Commands [?]
vmwait VMM wait status
vrld VMM reload xlate table
vsidd sidd VSID dump {vsid:offset} [count]
vsidm sidm VSID alter {vsid:offset}
xmemd VMM XMem xmaddr
zproc VMM zeroing kproc
drlist drl DRlist [addr/symbol]

*** address translation ***

tr translate to real address symb/eaddr
tv display MMU translation symb/eaddr
slb display SLB entry [-r] [entry]
mslb modify SLB entry [-r] [entry]
dbat display dbats [index]
ibat display ibats [index]
mdbat modify dbats [index]
mibat modify ibats [index]

*** loader ***

lke list loaded extensions [?][-l][-n name][-s][slot|symb/eaddr]
lle list loader entries [?]
stbl list loaded symbol tables [slot|symb/eaddr]
rmst remove symbol table slot|symb/eaddr
exp list export tables [symb]

*** display context information ***

pnda Display pnd area [*][-a][cpunb/symb/eaddr]
ppda Display ppd area [*/cpunb/symb/eaddr]
pvpa Display pvp area [*/cpunb/symb/eaddr]
ha ha_event Display ha_event [*/slot/symb/eaddr]
mst Display mst area [th-slot] [[-a] symb/eaddr]
lastbackt Display lastbackt cpu number
p proc Display proc table [*/slot/symb/eaddr]
th thread Display thread table [*/slot/symb/eaddr/-w ?]
ttid th_tid Display thread tid [tid]
tpid th_pid Display thread pid [pid]
ptid pr_tid Display process tid [tid]
ppid pr_pid Display process pid [pid]
rq runq Display run queues [bucket/symb/eaddr]
rqi rqa Display RQ Info
sq sleepq Display sleep queues [bucket/symb/eaddr]
lq lockq Display lock queues [bucket/symb/eaddr]
u user Display u_area [-?][th-slot/symb/eaddr]
meml memlock Memory lock information [[-l|-e] eaddr][?]
cr crid Display crid table [*/slot/symb/eaddr]
chkfile Display chkfile structure eaddr
cred Display credentials structure eaddr
svmon Process based paging space and mem usage [-?]

*** display storage subsystem information ***

scsibuf Display scsi_buf [-l] symb/eaddr

*** display memory allocator information ***

hp heap Display kernel heap [symb/eaddr]
xm xmalloc Display heap debug [-?]
kmbucket bucket Display kmembuckets [?] | [-s] | [[symb/eaddr][-l]] | [[-c cpu][-i index][-l]] | [-k address]
kmstats Display kmemstats [symb/eaddr]
mpdata Display mpdata debug [?]
ldata Display ldata eaddr

*** display general filesystem information ***

buf buffer Display buffer [slot/symb/eaddr]
hb hbuffer Display buffehash [bucket/symb/eaddr]
fb fbuffer Display freelist [bucket/symb/eaddr]
gno gnode Display gnode symb/eaddr
gfs Display gfs symb/eaddr
file Display file symb/eaddr]
ino inode Display inode [slot/symb/eaddr]
hino hinode Display inodehash [bucket/symb/eaddr]
fino icache Display icache list [slot/symb/eaddr]
dnlc ncache Display name cache [slot/symb/eaddr]
hdnlc hncache Display hash ncache [bucket/symb/eaddr]
vnc vcache Display vnode cache [slot/symb/eaddr]
hvnc hvcache Display hash vcache [bucket/symb/eaddr]
vno vnode Display vnode symb/eaddr
vfs mount Display vfs [slot/symb/eaddr]
specno specnode Display specnode symb/eaddr
devno devnode Display devnode [slot/symb/eaddr]
fifono fifonode Display fifonode [slot/symb/eaddr]
hno hnode Display hnodehash [bucket/symb/eaddr]
jno jfsnode Display jfsnode [-?|symb|eaddr]
kvn kvnode Display kdm vnode [symb/eaddr]
kfs kfset Display kdm fset [symb/eaddr]
ksess ksession Display kdm session [symb/eaddr]
kev kevent Display kdm event [symb/eaddr]
kdll Display kdm dll [symb/eaddr]

*** display j2-specific filesystem information ***

j2 jfs2 Display j2 buffer data [kdb cmd]
i2 inode2 Display j2 inode [eaddr]
tree Display j2 tree [eaddr]
dt dtree Display j2 dtree [eaddr]
xt xtree Display j2 xtree [eaddr]
pgbuf Display j2 pagerBuffer [eaddr]
pgobj Display j2 pagerObject [eaddr]
j2logbuf Display j2 LogBuffer [eaddr]
j2logx Display j2 Logx structure [eaddr]
j2log Display j2 Log structure [eaddr]
txblock txblk Display j2 txBlock [eaddr]
txblocki txblki Display index of txBlock [index]
txlock txlck Display j2 txLock [eaddr]
bmblock bmblk bmb Display j2 metadata block [?]symb/eaddr index type
j2no jfs2node Display jfs2node [-?|eaddr]
pile Display pile [eaddr]
slab Display slab [eaddr]

*** time ***

trb timer Display system timer request blocks

*** RAS: trace, dump, and error log ***

rasb Display ras_block_t [-f] [-p|-r] [eaddr]
raslist rasl Display component hierarchy [-r] [path]
trace Display trace buffer [?|-?]
mtrace mtrc Display memory trace [?|-?]
cdt Display cdt [?]
errpt Display error log entries
check Run consistency checkers [?|-?]
ctctrl Display component trace data and buffers [?]

*** locks ***

lk Display lock_t lock [symb/eaddr]
slk spl Display simple lock [-q] [symb/eaddr]
clk cpl Display complex lock [-q] [symb/eaddr]
dlk distl Display dist lock [-q] [symb/eaddr]
dla deadlock search [ [-p [cpu] ]/tid ]

*** network ***

ifnet Display interface [slot/symb/eaddr]
tcb Display TCBs [slot/symb/eaddr] | [-s]|[-b bucket_index]
udb Display UDBs [slot/symb/eaddr] | [-s] | [-b bucket_index]
sock Display socket [[-d][tcp/udp][symb/eaddr]] | [-s[tcp/udp]] | [-f] | [[-d]-p]
tcpcb Display TCP CB [symb/eaddr] | [-s]
mbuf Display mbuf [-p | [-a][-n][-d]] [symb/eaddr]
netm Display Netmalloc Police [[-c display_count][-i starting_index][-a mbuf_addr][-t type[,type]*][-s size[,size]*]] | [-e[outstand_address]]
sockinfo si Display socket information [addr type [-d]]
ndd Display ndd [?] | [symb/eaddr] | [-s] | [-n ndd_name]
nsdbg Display ns_alloc/free events and set filter [-i index] [-c count] [-n ndd_name[,nddname]*]]
netstat shows network status
route Display Route route_addr
rtentry Display rtentry structure rtentry_addr
rxnode Display radix_node struct rx_node_addr
tcpdbg Display tcp_debug structures [-i index] [-c count] | [address] | [-s]

*** wlm ***

cla class Display wlm class
rules rule Display wlm rules
bdev wlm_bdev Display wlm bio devices [?][*/symb/eaddr]
bqueue wlm_bq Display wlm bio queues symb/eaddr

*** numa ***

numaaddr NUMA addresses
sdl NUMA system detail level [*|]
rad NUMA rsrce affinity domain [symb/eaddr]
rrset NUMA real resource set [symb/eaddr]
rset NUMA resource set [symb/eaddr]
atinfos ati NUMA attach info table [symb/eaddr]
attentry ate NUMA attachment entry [symb/eaddr]

*** call outside kdb ***

pse pse print call [parameters]
pty pty print call

*** LPAR ***


*** advanced accounting ***

parcb Display project assignment rule control blocks
par Display project assignment rules
proj Display project definitions

*** VFS Consistency Manager: VCM ***

vcm vcmdb vcmkdb VFS Consistency Manager (VCM) Menu

*** Storage Keys ***

kkey kkeymap kk Display kernel key mapping(s) [kkey]
hkey hkeymap hk Display hardware key mapping hkey
kks kkeyset Display kernel keyset eaddr
hks hkeyset Display hardware keyset eaddr

*** kernext commands ***

streams sths SH PSE Stream Heads data summary symb/addr
ldterm ldt ld LDTERM ldtty data symb|addr
termiox tiox Termiox data symb|addr
termios tios Termios data symb|addr
winsize wz Winsize data symb|addr
tty TTY Data [-e] [-o] [-v] [name | [maj [min]]]
apanchor active/passive struct anchor addr
apframeq active/passive struct frame_queue [-l] addr
apctrlq active/passive struct controller_queue [-l] addr
appartq active/passive struct partition_queue [-l] addr
apdevq active/passivestruct device_queue [-l] addr
appathq active/passive struct path_queue [-l] addr
apdyndbg active/passive dynamic debug [-s] flag
mptinfo scsi_info data
mptcscsi cscsi_info data [name|addr]
mptdev devinfo data [-l|-t] addr
mpttarg target info data [-l] addr
mptadap adapter data [name|addr]
mptmap adapter mapping info [-l] addr
mptintfc interface info [-l] addr
mptcmd cmd_elem data [-l|p] addr
eide IDE controller basic info.
eidecfg IDE controller config info.
eidedev IDE device info.
eidecmd ATA cmd info. addr
fcparray arrayinfo data [-o] [-c] [diskname|addr]
fcpdac dar data [darname|addr]
fcpdar dar data [darname|addr]
fcpdk dk_cmd data [-l] [-v] addr
iscsisw iscsisw scsi_info data [name|addr]
iswinfo iscsii iscsi_info data
iswdinfo iscsid dev_info data [-l|-t] addr
iswtinfo iscsit target_info data [-l] addr
iswcmd iscsic cmd_elem data [-l] addr
iswspcmd iscsispc spc_cmd_elem data [-l] addr
pbuf Display physical buf [*] symb/eaddr
volgrp Display volume group symb/eaddr
pvol Display physical vol symb/eaddr
lvol Display logical vol symb/eaddr
clntdb c4db clnt4db NFSv4 client KDB [?]
rnode rno NFS client rnode symb/eaddr
srvobj NFS client server object symb/eaddr
fsid NFS client FSID symb/eaddr
f_loc floc NFS client f_loc symb/eaddr
clntio clio NFS client IO symb/eaddr
nfs4cs cs4 NFSv4 server call state symb/eaddr
nfs4pfs pfs4 NFSv4 server pfs node symb/eaddr
nfs4exi exi4 NFSv4 server export info symb/eaddr
nfs4res res4 NFSv4 op result symb/eaddr
nfs4cres cres4 NFSv4 server reply symb/eaddr
nfs4arg arg4 NFSv4 op argument symb/eaddr
smdb sm4 sm4db NFSv4 State Manager KDB [?]
nrsdb nrs NFS Name Registry Services KDB [?]
svcxprt KRPC server xprt [symb/eaddr]
cupboard KRPC server cupboard symb/eaddr
sockcup KRPC server sockcup symb/eaddr
sockpint KRPC server sockpint symb/eaddr
rtcm KRPC client rtcm symb/eaddr
cku KRPC client cku_private symb/eaddr
client KRPC client transport handle symb/eaddr
xdr KRPC xdr symb/eaddr
klmdb NFS client locking info [?]
klm_find kfind find NFS client lock info [?]
klm_dump kdump Dump out NFS waiting lock info [?]
pcibus pci PCI Bus debug options [?] [..]
lspci List all PCI Buses [-v] [?]
pcieeh eeh PCI EEH debug options [?]
qfscsi scsi_info data [name|addr]
qfcp qfsc qfsc_info data
qdinfo qfscsid dev_info data [-l|-t] addr
qtinfo qfscsit target_info data [-l|-p] addr
qlfcs adapinfo data [adapname|addr]
qlfcsglo qlfc_global data
qlfcsctl qctl qlfcsctl data [ctl addr]
qlfcscmd qcmd qlfcscmd data [cmd addr]
qlfcsmio qmiocb -s qlfcmio [-s] addr [mb iocb addr]
qlfcsio6 qiocb6 -s qlfcsio6 [-s] addr [iocb6 addr]
qlfcsq qlfcsq [addr]
qlfscsi scsi_info data [name|addr]
qlfcp qlfsc qlfsc_info data
qldinfo qlfscsid dev_info data [-l|-t] addr
qlcmdelem qlcdel cmd_elem data [-l|-t] addr
qltinfo qlfscsit target_info data [-l|-p] addr
sisraid IOA data [adapname|addr]
sscsi adapinfo data [adapname|addr]

Saturday, July 18, 2009

Make bootable CD/DVD

mkcd -S -m $MKSYSB_IMAGE (CD-ROM)

mkcd -S L -m $MKSYSB_IMAGE (DVD-ROM)

Wednesday, June 10, 2009

[AIX] Get Disk Used and Free Percentage

#!/bin/sh
lspv |grep active|awk '{print $1}' | while read DISK
do
i=`lspv $DISK | grep FREE |grep PPs| awk '{print $3}'`
j=`lspv $DISK | grep USED |grep PPs| awk '{print $3}'`
k=`lspv $DISK | grep TOTAL | grep PPs|awk '{print $3}'`
x=`echo "scale=2;($i/$k)*100" |bc`
y=`echo "scale=2;($j/$k)*100" |bc`
echo "$DISK Free Percentage = $x %"
echo "$DISK Used Percentage = $y %"
done

Tuesday, May 26, 2009

[AIX] Remove ^M in Text File

1. vi text file
2. use vi command " :1,$ s/^M//g"
^M=Ctrl+v+m
3. done

[AIX] How to edit or clear /var/adm/wtmp

Clear:
cp /dev/null /var/adm/wtmp

Edit:
/usr/sbin/acct/fwtmp < /var/adm/wtmp > dummy.file
/usr/sbin/acct/fwtmp -ic <> /var/adm/wtmp

Monday, May 25, 2009

[AIX] Remove mksysb mirror information

1. build image.data, use mkszfile command.
2. vi image.data, make LPs = PP and COPIES=1 in each LV.
3. mksysb and include fixed image.data.
done

Sunday, May 24, 2009

[AIX] Watch and Extract .bff File

To see whats in the lpp/bff (backup / restore format)

restore -qTvf lpp_name.bff

To extract files from it

restore -qxvdf lpp_name.bff ./path/to/file/to/restore

http://www.ibm.com/developerworks/forums/thread.jspa?messageID=13996224

TPC for Disk Install error at JVMST062

1. Open "Control Panel"
2. Double-click on "System" icon in "Control Panel"
3. Click "Advanced" tab in "System Properties" panel
4. Click "Environment Variables" button
5. Click "New" button in "User variables for UserID" in "Environment Variables" panel
6. Input "IBM_JAVA_OPTIONS" in "Variable Name" input field, and "-Xmx512M" in "Variable Value"
7. Click "OK" button, and close all panels
8. Try again