12/20/10

Xms!=Xmx

Setting the initial Java heap minimum equal to the Java heap maximum is not recommended. Doing so can delay the start of garbage collection until the heap is full. Therefore, the first time the Garbage Collector runs is a very expensive operation.
The heap is also likely to be very fragmented by the time heap compaction is required. This is also a very expensive operation.

http://www-01.ibm.com/support/docview.wss?uid=swg21160795&acss=was121610

11/12/10

password recovery from stash file

----------------unstash.pl begin ------------------------
use strict;

die "Usage: $0 <stash file>\n" if $#ARGV != 0;

my $file=$ARGV[0];
open(F,$file) || die "Can't open $file: $!";

my $stash;
read F,$stash,1024;

my @unstash=map { $_^0xf5 } unpack("C*",$stash);

foreach my $c (@unstash) {
    last if $c eq 0;
    printf "%c",$c;
}
printf "\n";
---------------------unstash.pl end-----------------

perl unstash.pl key.sth
where key.sth is the stash file

9/25/10

recycle logs

To recycle JVM Logs [a.k.a SystemOut.log and SystemErr.log] -
We have separate log slice for SystemOut and SystemErr. Whenever I bounce the server, I try to clear the logs, take a backup of the logs in a folder with time and date stamp for reference. I may hold such historical backup of the logs for say two months.
Here is a batch script to create a folder with todays date and time stamp, move the files into that folder.

@echo off
@REM This script is to recycle the jvm logs

@REM To recycle
@REM 1. set the log home
set jvm_log_home="<YOUR_LOG_HOME>"
set log_bak_home="<YOUR_LOG_BACKUP_HOME"
@REM 2. Set Date variable
set today=%date:~4,2%-%date:~7,2%%date:~10,4%%time:~0,2%%time:~3,2%%time:~6,2%%
@REM 3. create a folder with date stamp
mkdir %log_bak_home%\%today%
@REM 3. move the logs to that folder
move %jvm_log_home%\*.* %log_bak_home%\%today%


Whenever I bounce the server, I try to cleanup the cache too. Here is the script to clean up the cache.
Here is the batch script to clean the cache -

@echo off
@REM This script is to recycle the temp/cache on the local server
@REM To cleanup the cache
@REM 1. goto profile home temp
set profile_temp_home="<YOUR_PROFILEHOME_TEMP_NODE"
echo "profile path=%profile_temp_home%"
@REM 2. goto servername
set server_name="<YOUR_SERVER_NAME"
@REM 3. delete all under servername
echo "here i am %profile_temp_home%"
FOR /D %%i IN (%profile_temp_home%\%server_name%\*) DO (
@REM echo %%i
rmdir /S /Q "%%i"
)

8/31/10

MQ Notes ... continued

Use the control commands with a command file
__ Prepare a WebSphere MQ command file with the same commands you entered
interactively in Step 2. Call the file "E1_ST03.txt".
DIS QMGR
DIS Q(SYSTEM*)
DEF QL(QL.A) DESCR('QL.A Text')
DIS QL(QL.A)
ALTER QL(QL.A) MAXDEPTH(1000)
DIS QL(QL.A)
DEF QL(QL.B) DESCR('QL.B Text')
DEF QL(QL.B) REPLACE +
MAXDEPTH(2000)
DIS QL(QL.B)

__ Process the command file and direct the results to the file "report". Have a look at
the file containing the results.
• runmqsc < E1_ST03.txt > report

5724-H72 (C) Copyright IBM Corp. 1994, 2005. ALL RIGHTS RESERVED.
Starting MQSC for queue manager MQ.QM1.


1 : DIS QMGR
AMQ8408: Display Queue Manager details.
QMNAME(MQ.QM1) ACCTCONO(DISABLED)
ACCTINT(1800) ACCTMQI(OFF)
ACCTQ(OFF) ACTIVREC(MSG)
ALTDATE(2010-08-18) ALTTIME(12.21.00)
AUTHOREV(DISABLED) CCSID(1208)
CHAD(DISABLED) CHADEV(DISABLED)
CHADEXIT( ) CHLEV(DISABLED)
CLWLDATA( ) CLWLEXIT( )
CLWLLEN(100) CLWLMRUC(999999999)
CLWLUSEQ(LOCAL) CMDLEVEL(600)
COMMANDQ(SYSTEM.ADMIN.COMMAND.QUEUE) CRDATE(2010-08-18)
CRTIME(12.21.00) DEADQ( )
DEFXMITQ( ) DESCR( )
DISTL(YES) INHIBTEV(DISABLED)
IPADDRV(IPV4) LOCALEV(DISABLED)
LOGGEREV(DISABLED) MAXHANDS(256)
MAXMSGL(4194304) MAXPRTY(9)
MAXUMSGS(10000) MONACLS(QMGR)
MONCHL(OFF) MONQ(OFF)
PERFMEV(DISABLED) PLATFORM(UNIX)
QMID(MQ.QM1_2010-08-18_12.21.00) REMOTEEV(DISABLED)
REPOS( ) REPOSNL( )
ROUTEREC(MSG) SCHINIT(QMGR)
SCMDSERV(QMGR) SSLCRLNL( )
SSLCRYP( ) SSLEV(DISABLED)
SSLFIPS(NO)
SSLKEYR(/var/mqm/qmgrs/MQ!QM1/ssl/key)
SSLRKEYC(0) STATACLS(QMGR)
STATCHL(OFF) STATINT(1800)
STATMQI(OFF) STATQ(OFF)
STRSTPEV(ENABLED) SYNCPT
TRIGINT(999999999)
2 : DIS Q(SYSTEM*)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.ADMIN.ACCOUNTING.QUEUE) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.ADMIN.ACTIVITY.QUEUE) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.ADMIN.CHANNEL.EVENT) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.ADMIN.COMMAND.QUEUE) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.ADMIN.LOGGER.EVENT) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.ADMIN.PERFM.EVENT) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.ADMIN.QMGR.EVENT) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.ADMIN.STATISTICS.QUEUE) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.ADMIN.TRACE.ROUTE.QUEUE) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.AUTH.DATA.QUEUE) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.CHANNEL.INITQ) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.CHANNEL.SYNCQ) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.CICS.INITIATION.QUEUE) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.CLUSTER.COMMAND.QUEUE) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.CLUSTER.REPOSITORY.QUEUE)
TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.CLUSTER.TRANSMIT.QUEUE) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.DEAD.LETTER.QUEUE) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.DEFAULT.ALIAS.QUEUE) TYPE(QALIAS)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.DEFAULT.INITIATION.QUEUE)
TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.DEFAULT.LOCAL.QUEUE) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.DEFAULT.MODEL.QUEUE) TYPE(QMODEL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.DEFAULT.REMOTE.QUEUE) TYPE(QREMOTE)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.MQEXPLORER.REPLY.MODEL) TYPE(QMODEL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.MQSC.REPLY.QUEUE) TYPE(QMODEL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.PENDING.DATA.QUEUE) TYPE(QLOCAL)
3 : DEF QL(QL.A) DESCR('QL.A Text')
AMQ8150: WebSphere MQ object already exists.
4 : DIS QL(QL.A)
AMQ8409: Display Queue details.
QUEUE(QL.A) TYPE(QLOCAL)
ACCTQ(QMGR) ALTDATE(2010-08-18)
ALTTIME(13.55.59) BOQNAME( )
BOTHRESH(0) CLUSNL( )
CLUSTER( ) CLWLPRTY(0)
CLWLRANK(0) CLWLUSEQ(QMGR)
CRDATE(2010-08-18) CRTIME(13.50.05)
CURDEPTH(0) DEFBIND(OPEN)
DEFPRTY(0) DEFPSIST(NO)
DEFSOPT(SHARED) DEFTYPE(PREDEFINED)
DESCR(QL.A QUEUE A BLAH) DISTL(NO)
GET(ENABLED) HARDENBO
INITQ( ) IPPROCS(0)
MAXDEPTH(1000) MAXMSGL(4194304)
MONQ(QMGR) MSGDLVSQ(PRIORITY)
NOTRIGGER NPMCLASS(NORMAL)
OPPROCS(0) PROCESS( )
PUT(ENABLED) QDEPTHHI(80)
QDEPTHLO(20) QDPHIEV(DISABLED)
QDPLOEV(DISABLED) QDPMAXEV(ENABLED)
QSVCIEV(NONE) QSVCINT(999999999)
RETINTVL(999999999) SCOPE(QMGR)
SHARE STATQ(QMGR)
TRIGDATA( ) TRIGDPTH(1)
TRIGMPRI(0) TRIGTYPE(FIRST)
USAGE(NORMAL)
5 : ALTER QL(QL.A) MAXDEPTH(1000)
AMQ8008: WebSphere MQ queue changed.
6 : DIS QL(QL.A)
AMQ8409: Display Queue details.
QUEUE(QL.A) TYPE(QLOCAL)
ACCTQ(QMGR) ALTDATE(2010-08-19)
ALTTIME(11.39.46) BOQNAME( )
BOTHRESH(0) CLUSNL( )
CLUSTER( ) CLWLPRTY(0)
CLWLRANK(0) CLWLUSEQ(QMGR)
CRDATE(2010-08-18) CRTIME(13.50.05)
CURDEPTH(0) DEFBIND(OPEN)
DEFPRTY(0) DEFPSIST(NO)
DEFSOPT(SHARED) DEFTYPE(PREDEFINED)
DESCR(QL.A QUEUE A BLAH) DISTL(NO)
GET(ENABLED) HARDENBO
INITQ( ) IPPROCS(0)
MAXDEPTH(1000) MAXMSGL(4194304)
MONQ(QMGR) MSGDLVSQ(PRIORITY)
NOTRIGGER NPMCLASS(NORMAL)
OPPROCS(0) PROCESS( )
PUT(ENABLED) QDEPTHHI(80)
QDEPTHLO(20) QDPHIEV(DISABLED)
QDPLOEV(DISABLED) QDPMAXEV(ENABLED)
QSVCIEV(NONE) QSVCINT(999999999)
RETINTVL(999999999) SCOPE(QMGR)
SHARE STATQ(QMGR)
TRIGDATA( ) TRIGDPTH(1)
TRIGMPRI(0) TRIGTYPE(FIRST)
USAGE(NORMAL)
7 : DEF QL(QL.B) DESCR('QL.B Text')
AMQ8150: WebSphere MQ object already exists.
8 : DEF QL(QL.B) REPLACE +
: MAXDEPTH(2000)
AMQ8006: WebSphere MQ queue created.
9 : DIS QL(QL.B)
AMQ8409: Display Queue details.
QUEUE(QL.B) TYPE(QLOCAL)
ACCTQ(QMGR) ALTDATE(2010-08-19)
ALTTIME(11.39.46) BOQNAME( )
BOTHRESH(0) CLUSNL( )
CLUSTER( ) CLWLPRTY(0)
CLWLRANK(0) CLWLUSEQ(QMGR)
CRDATE(2010-08-18) CRTIME(13.50.16)
CURDEPTH(0) DEFBIND(OPEN)
DEFPRTY(0) DEFPSIST(NO)
DEFSOPT(SHARED) DEFTYPE(PREDEFINED)
DESCR( ) DISTL(NO)
GET(ENABLED) HARDENBO
INITQ( ) IPPROCS(0)
MAXDEPTH(2000) MAXMSGL(4194304)
MONQ(QMGR) MSGDLVSQ(PRIORITY)
NOTRIGGER NPMCLASS(NORMAL)
OPPROCS(0) PROCESS( )
PUT(ENABLED) QDEPTHHI(80)
QDEPTHLO(20) QDPHIEV(DISABLED)
QDPLOEV(DISABLED) QDPMAXEV(ENABLED)
QSVCIEV(NONE) QSVCINT(999999999)
RETINTVL(999999999) SCOPE(QMGR)
SHARE STATQ(QMGR)
TRIGDATA( ) TRIGDPTH(1)
TRIGMPRI(0) TRIGTYPE(FIRST)
USAGE(NORMAL)
9 MQSC commands read.
No commands have a syntax error.
2 valid MQSC commands could not be processed.


Use the sample programs
__ Put messages on the local queue QL.A.
• amqsput QL.A
(The queue manager name is optional, because it is the default queue manager)
amqsput is a sample program. This can be found in mqm/samp/bin
[mqm@localhost ~]$ /opt/mqm/samp/bin/amqsput QL.A
Sample AMQSPUT0 start
target queue is QL.A
bhaskar
ramaraju
so what
know what
yes a lot

__ Browse the messages of the queue. Direct the output to a file and look at the results.
• amqsbcg QL.A > out
(The queue manager name is optional, because it is the default queue manager)


AMQSBCG0 - starts here
**********************

MQOPEN - 'QL.A'


MQGET of message number 1
****Message descriptor****

StrucId : 'MD ' Version : 2
Report : 0 MsgType : 8
Expiry : -1 Feedback : 0
Encoding : 546 CodedCharSetId : 1208
Format : 'MQSTR '
Priority : 0 Persistence : 0
MsgId : X'414D51204D512E514D312020202020207D736D4C02090020'
CorrelId : X'000000000000000000000000000000000000000000000000'
BackoutCount : 0
ReplyToQ : ' '
ReplyToQMgr : 'MQ.QM1 '
** Identity Context
UserIdentifier : 'mqm '
AccountingToken :
X'0335303200000000000000000000000000000000000000000000000000000006'
ApplIdentityData : ' '
** Origin Context
PutApplType : '6'
PutApplName : 'amqsput '
PutDate : '20100819' PutTime : '18442779'
ApplOriginData : ' '

GroupId : X'000000000000000000000000000000000000000000000000'
MsgSeqNumber : '1'
Offset : '0'
MsgFlags : '0'
OriginalLength : '-1'

**** Message ****

length - 7 bytes

00000000: 6268 6173 6B61 72 'bhaskar '


MQGET of message number 2
****Message descriptor****

StrucId : 'MD ' Version : 2
Report : 0 MsgType : 8
Expiry : -1 Feedback : 0
Encoding : 546 CodedCharSetId : 1208
Format : 'MQSTR '
Priority : 0 Persistence : 0
MsgId : X'414D51204D512E514D312020202020207D736D4C03090020'
CorrelId : X'000000000000000000000000000000000000000000000000'
BackoutCount : 0
ReplyToQ : ' '
ReplyToQMgr : 'MQ.QM1 '
** Identity Context
UserIdentifier : 'mqm '
AccountingToken :
X'0335303200000000000000000000000000000000000000000000000000000006'
ApplIdentityData : ' '
** Origin Context
PutApplType : '6'
PutApplName : 'amqsput '
PutDate : '20100819' PutTime : '18443040'
ApplOriginData : ' '

GroupId : X'000000000000000000000000000000000000000000000000'
MsgSeqNumber : '1'
Offset : '0'
MsgFlags : '0'
OriginalLength : '-1'

**** Message ****

length - 8 bytes

00000000: 7261 6D61 7261 6A75 'ramaraju '


MQGET of message number 3
****Message descriptor****

StrucId : 'MD ' Version : 2
Report : 0 MsgType : 8
Expiry : -1 Feedback : 0
Encoding : 546 CodedCharSetId : 1208
Format : 'MQSTR '
Priority : 0 Persistence : 0
MsgId : X'414D51204D512E514D312020202020207D736D4C04090020'
CorrelId : X'000000000000000000000000000000000000000000000000'
BackoutCount : 0
ReplyToQ : ' '
ReplyToQMgr : 'MQ.QM1 '
** Identity Context
UserIdentifier : 'mqm '
AccountingToken :
X'0335303200000000000000000000000000000000000000000000000000000006'
ApplIdentityData : ' '
** Origin Context
PutApplType : '6'
PutApplName : 'amqsput '
PutDate : '20100819' PutTime : '18443598'
ApplOriginData : ' '

GroupId : X'000000000000000000000000000000000000000000000000'
MsgSeqNumber : '1'
Offset : '0'
MsgFlags : '0'
OriginalLength : '-1'

**** Message ****

length - 7 bytes

00000000: 736F 2077 6861 74 'so what '


MQGET of message number 4
****Message descriptor****

StrucId : 'MD ' Version : 2
Report : 0 MsgType : 8
Expiry : -1 Feedback : 0
Encoding : 546 CodedCharSetId : 1208
Format : 'MQSTR '
Priority : 0 Persistence : 0
MsgId : X'414D51204D512E514D312020202020207D736D4C05090020'
CorrelId : X'000000000000000000000000000000000000000000000000'
BackoutCount : 0
ReplyToQ : ' '
ReplyToQMgr : 'MQ.QM1 '
** Identity Context
UserIdentifier : 'mqm '
AccountingToken :
X'0335303200000000000000000000000000000000000000000000000000000006'
ApplIdentityData : ' '
** Origin Context
PutApplType : '6'
PutApplName : 'amqsput '
PutDate : '20100819' PutTime : '18444307'
ApplOriginData : ' '

GroupId : X'000000000000000000000000000000000000000000000000'
MsgSeqNumber : '1'
Offset : '0'
MsgFlags : '0'
OriginalLength : '-1'

**** Message ****

length - 9 bytes

00000000: 6B6E 6F77 2077 6861 74 'know what '


MQGET of message number 5
****Message descriptor****

StrucId : 'MD ' Version : 2
Report : 0 MsgType : 8
Expiry : -1 Feedback : 0
Encoding : 546 CodedCharSetId : 1208
Format : 'MQSTR '
Priority : 0 Persistence : 0
MsgId : X'414D51204D512E514D312020202020207D736D4C06090020'
CorrelId : X'000000000000000000000000000000000000000000000000'
BackoutCount : 0
ReplyToQ : ' '
ReplyToQMgr : 'MQ.QM1 '
** Identity Context
UserIdentifier : 'mqm '
AccountingToken :
X'0335303200000000000000000000000000000000000000000000000000000006'
ApplIdentityData : ' '
** Origin Context
PutApplType : '6'
PutApplName : 'amqsput '
PutDate : '20100819' PutTime : '18444667'
ApplOriginData : ' '

GroupId : X'000000000000000000000000000000000000000000000000'
MsgSeqNumber : '1'
Offset : '0'
MsgFlags : '0'
OriginalLength : '-1'

**** Message ****

length - 9 bytes

00000000: 7965 7320 6120 6C6F 74 'yes a lot '



No more messages
MQCLOSE
MQDISC

__ Get the messages from the queue to make the queue empty.
• amqsget QL.A
(The queue manager name is optional, because it is the default queue manager)
Sample AMQSGET0 start
message <bhaskar>
message <ramaraju>
message <so what>
message <know what>
message <yes a lot>
no more messages
Sample AMQSGET0 end

This cleans the queue.


Work with alias queues
__ Create an alias queue QA.A which resolves to your local queue QL.A.
• DEF QA(QA.A) TARGQ(QL.A)
__ Inhibit put requests on the alias queue.
• ALTER QA(QA.A) PUT(DISABLED)
__ Change QL.B to inhibit put requests on your local queue QL.B.
• ALTER QL(QL.B) PUT(DISABLED)
__ Create an alias queue QA.B which resolves to your local queue QL.B.
• DEF QA(QA.B) TARGQ(QL.B)
DEF QA(QA.A) TARGQ(QL.A)
1 : DEF QA(QA.A) TARGQ(QL.A)
AMQ8006: WebSphere MQ queue created.
ALTER QA(QA.A) PUT(DISABLED)
2 : ALTER QA(QA.A) PUT(DISABLED)
AMQ8008: WebSphere MQ queue changed.
ALTER QL(QL.B) PUT(DISABLED)
3 : ALTER QL(QL.B) PUT(DISABLED)
AMQ8008: WebSphere MQ queue changed.
DEF QA(QA.B) TARQG(QL.B)
4 : DEF QA(QA.B) TARQG(QL.B)
AMQ8405: Syntax error detected at or near end of command segment below:-
DEF QA(QA.B) T

AMQ8427: Valid syntax for the MQSC command:

DEFINE QALIAS(q_name)
[ CLUSNL(namelist_name) ] [ CLUSTER(cluster_name) ]
[ DEFBIND( NOTFIXED | OPEN ) ] [ DEFPRTY(integer) ]
[ DEFPSIST( YES | NO ) ] [ DESCR(string) ]
[ GET( ENABLED | DISABLED ) ] [ LIKE(qalias_name) ]
[ REPLACE | NOREPLACE ] [ PUT( ENABLED | DISABLED ) ]
[ SCOPE( QMGR | CELL ) ] [ TARGQ(string) ]
[ CLWLRANK(integer) ] [ CLWLPRTY(integer) ]

DEF QA(QA.B) TARGQ(QL.B)
5 : DEF QA(QA.B) TARGQ(QL.B)
AMQ8006: WebSphere MQ queue created.
END
6 : END
5 MQSC commands read.

__ Try to put messages on both alias and local queues using the sample program.
• amqsput QL.A
• amqsput QA.A
• amqsput QL.B
• amqsput QA.B

[mqm@localhost ~]$ /opt/mqm/samp/bin/amqsput QL.A
Sample AMQSPUT0 start
target queue is QL.A
bhaskar is the name of the this person
u know if u dont know you better know

[mqm@localhost ~]$ /opt/mqm/samp/bin/amqsput QA.A
Sample AMQSPUT0 start
target queue is QA.A
do you really want to test the alias queues
MQPUT ended with reason code 2051
Sample AMQSPUT0 end
[mqm@localhost ~]$

[mqm@localhost ~]$ /opt/mqm/samp/bin/amqsput QL.B
Sample AMQSPUT0 start
target queue is QL.B
I am testing ql.b
MQPUT ended with reason code 2051
Sample AMQSPUT0 end

[mqm@localhost ~]$ /opt/mqm/samp/bin/amqsput QA.B
Sample AMQSPUT0 start
target queue is QA.B
This is the time to test QA.B
MQPUT ended with reason code 2051
Sample AMQSPUT0 end


The thing here is
We have an alias queue per local queue. QA.A is alias for QL.A and QA.B is the alias for QL.B.
ALTER QA(QA.A) PUT(DISABLED)
This disabled PUT on QA.A
Alias has muted PUT.

ALTER QL(QL.B) PUT(DISABLED)
This muted the PUT on local queue itself.


Working with queues
__ 1. Put some messages on your queues QL.A and QL.B.

On QL.B, put is disabled above. So, reset it to enable
ALTER QL(QL.B) PUT (ENABLE)
1 : ALTER QL(QL.B) PUT (ENABLE)
AMQ8405: Syntax error detected at or near end of command segment below:-
ALTER QL(QL.B) PUT (E

AMQ8427: Valid syntax for the MQSC command:

ALTER QLOCAL(q_name)
[ FORCE ] [ BOQNAME(string) ]
[ BOTHRESH(integer) ] [ CLUSNL(namelist_name) ]
[ CLUSTER(cluster_name) ] [ DEFBIND( NOTFIXED | OPEN ) ]
[ DEFPRTY(integer) ] [ DEFPSIST( YES | NO ) ]
[ DESCR(string) ] [ DEFSOPT( EXCL | SHARED ) ]
[ DISTL( YES | NO ) ] [ GET( ENABLED | DISABLED ) ]
[ INITQ(string) ] [ MAXDEPTH(integer) ]
[ MAXMSGL(integer) ] [ MSGDLVSQ( PRIORITY | FIFO ) ]
[ HARDENBO | NOHARDENBO ] [ SHARE | NOSHARE ]
[ TRIGGER | NOTRIGGER ] [ PROCESS(string) ]
[ PUT( ENABLED | DISABLED ) ] [ QDEPTHHI(integer) ]
[ QDEPTHLO(integer) ] [ QDPHIEV( ENABLED | DISABLED ) ]
[ QDPLOEV( ENABLED | DISABLED ) ] [ QDPMAXEV( ENABLED | DISABLED ) ]
[ QSVCIEV( NONE | HIGH | OK ) ] [ QSVCINT(integer) ]
[ RETINTVL(integer) ] [ SCOPE( QMGR | CELL ) ]
[ TRIGDATA(string) ] [ TRIGDPTH(integer) ]
[ TRIGMPRI(integer) ]
[ TRIGTYPE( FIRST | EVERY | DEPTH | NONE ) ]
[ USAGE( NORMAL | XMITQ ) ] [ NPMCLASS( NORMAL | HIGH ) ]
[ STATQ( QMGR | ON | OFF ) ] [ ACCTQ( QMGR | ON | OFF ) ]
[ MONQ( QMGR | OFF | LOW | MEDIUM | HIGH ) ]
[ CLWLRANK(integer) ] [ CLWLPRTY(integer) ]
[ CLWLUSEQ( LOCAL | ANY | QMGR ) ]
ALTER QL(QL.B) PUT (ENABLED)
2 : ALTER QL(QL.B) PUT (ENABLED)
AMQ8008: WebSphere MQ queue changed.
END

[mqm@localhost ~]$ /opt/mqm/samp/bin/amqsput QL.B
Sample AMQSPUT0 start
target queue is QL.B
blah blah QL.B blah blah
its working now enable and enabled...awesome difference


__ 2. Show the CURDEPTH of all the queues you have created.
• DISPLAY Q(Q*) CURDEPTH
DISPLAY Q(Q*) CURDEPTH
1 : DISPLAY Q(Q*) CURDEPTH
AMQ8409: Display Queue details.
QUEUE(QA.A) TYPE(QALIAS)
AMQ8409: Display Queue details.
QUEUE(QA.B) TYPE(QALIAS)
AMQ8409: Display Queue details.
QUEUE(QL.A) TYPE(QLOCAL)
CURDEPTH(6)
AMQ8409: Display Queue details.
QUEUE(QL.B) TYPE(QLOCAL)
CURDEPTH(2)

__ 3. Define an new local queue QL.X with the attributes of QA.A
• DEFINE QLOCAL(QL.X) LIKE(QA.A)
DEFINE QLOCAL(QL.X) LIKE (QA.A)
2 : DEFINE QLOCAL(QL.X) LIKE (QA.A)
AMQ8138: The WebSphere MQ queue has an incorrect type.

That says, one cannot create a queue like an alias


__ 4. Error? Now use the attributes of QL.A.
• DEFINE QLOCAL(QL.X) LIKE(QL.A)

DEFINE QL(QL.X) LIKE (QL.A)
3 : DEFINE QL(QL.X) LIKE (QL.A)
AMQ8006: WebSphere MQ queue created.


__ 5. Put some messages on QL.X.
• amqsput QL.X
[mqm@localhost ~]$ /opt/mqm/samp/bin/amqsput QL.X
Sample AMQSPUT0 start
target queue is QL.X
Here is my new queue buddy QL.X
Let me test this guy out


__ 6. Change the description of QL.A.
• ALTER QL(QL.A) DESCR('QL.A Text new')
ALTER QL(QL.A) DESCR('QL.A Text new')
4 : ALTER QL(QL.A) DESCR('QL.A Text new')
AMQ8008: WebSphere MQ queue changed.


__ 7. Display the DESCR attribute of all your queues.
• DISPLAY Q(Q*) DESCR


__ 8. Any change?
QL.X has QL.A's description
QL.A has new description

__ 9. Clear queue QL.A
• CLEAR QL(QL.A)
CLEAR QL(QL.A)
6 : CLEAR QL(QL.A)
DISPLAY Q(QL.A) CURDEPTH
7 : DISPLAY Q(QL.A) CURDEPTH
AMQ8409: Display Queue details.
QUEUE(QL.A) TYPE(QLOCAL)
CURDEPTH(0)

AMQ8022: WebSphere MQ queue cleared.
__ 10. Clear queue QA.A
• CLEAR QA(QA.A)

CLEAR QA(QA.A)
11 : CLEAR QA(QA.A)
AMQ8405: Syntax error detected at or near end of command segment below:-
CLEAR QA

AMQ8426: Valid MQSC commands are:

CLEAR QLOCAL

__ 11. Successfully? Give the reason why.

Means that you cannot clear an alias queue. Makes sense, alias queue is just a pointer to a queue, it does not hold any info in it.

__ 12. Delete QL.X
• DELETE QL(QL.X)

DELETE QL(QL.X)
12 : DELETE QL(QL.X)
AMQ8143: WebSphere MQ queue not empty.


Lets see the depth of the QL.X

DISPLAY Q(QL.X) CURDEPTH
13 : DISPLAY Q(QL.X) CURDEPTH
AMQ8409: Display Queue details.
QUEUE(QL.X) TYPE(QLOCAL)
CURDEPTH(2)

So one cannot delete an non empty queue

__ 13. Successfully deleted? If not, modify the command
• DELETE QL(QL.X) purge

DELETE QL(QL.X) purge
14 : DELETE QL(QL.X) purge
AMQ8007: WebSphere MQ queue deleted.

My MQ Notes

8/19/10

My MQ Notes

Installed MQM on RHEL 5.
first created uid:mqm, gid:mqm
Downloaded WMQ linux gz file.
Copied to /tmp/mqinst
tar -zxvf gz file

su

./mqlicense.sh -accept

Then kick start to install

rpm -ivh MQSeriesServer, runtimes yata yata yata



1. create a default q manager
call it MQ.QM1
[mqm@localhost ~]$ crtmqm MQ.QM1
There are 90 days left in the trial period for this copy of WebSphere MQ.
WebSphere MQ queue manager created.
Creating or replacing default objects for MQ.QM1.
Default objects statistics : 40 created. 0 replaced. 0 failed.
Completing setup.
Setup completed.


2. Start Q Manager

[mqm@localhost ~]$ strmqm MQ.QM1
There are 90 days left in the trial period for this copy of WebSphere MQ.
WebSphere MQ queue manager 'MQ.QM1' starting.
5 log records accessed on queue manager 'MQ.QM1' during the log replay phase.
Log replay for queue manager 'MQ.QM1' complete.
Transaction manager state recovered for queue manager 'MQ.QM1'.
WebSphere MQ queue manager 'MQ.QM1' started.

Note :
[mqm@localhost ~]$ ps -ef | grep mqm
root 6040 6024 0 12:12 pts/1 00:00:00 su - mqm
mqm 6043 6040 0 12:12 pts/1 00:00:00 -bash
mqm 6418 1 0 12:22 ? 00:00:00 amqzxma0 -m MQ.QM1
mqm 6422 6418 0 12:22 ? 00:00:00 /opt/mqm/bin/amqzfuma -m MQ.QM1
mqm 6424 6418 0 12:22 ? 00:00:00 amqzmuc0 -m MQ.QM1
mqm 6429 6418 0 12:22 ? 00:00:00 amqzmur0 -m MQ.QM1
mqm 6432 6418 0 12:22 ? 00:00:00 /opt/mqm/bin/amqrrmfa -m MQ.QM1 -t2332800 -s2592000 -p2592000 -g5184000 -c3600
mqm 6434 6418 0 12:22 ? 00:00:00 /opt/mqm/bin/amqzdmaa -m MQ.QM1
mqm 6436 6418 0 12:22 ? 00:00:00 /opt/mqm/bin/amqzmgr0 -m MQ.QM1
mqm 6449 6418 0 12:22 ? 00:00:00 amqzlaa0 -mMQ.QM1 -fip0
mqm 6450 6436 0 12:22 ? 00:00:00 /opt/mqm/bin/runmqchi -m MQ.QM1 -r
mqm 6452 6436 0 12:22 ? 00:00:00 /opt/mqm/bin/amqpcsea MQ.QM1
mqm 6482 6043 0 12:22 pts/1 00:00:00 ps -ef
mqm 6483 6043 0 12:22 pts/1 00:00:00 grep mqm


What are these amqzlaa0 -mMQ.QM1 -fip0
runmqxhi
amqzmqr0
amqzfuma
------------------------
3. Once QM starts, create local queues using script.
Use the control commands interactively
Use the control command runmqsc to perform the following tasks. Enter all the
WebSphere MQ commands interactively and display the results at the terminal.

[mqm@localhost errors]$ runmqsc
5724-H72 (C) Copyright IBM Corp. 1994, 2005. ALL RIGHTS RESERVED.
AMQ8146: WebSphere MQ queue manager not available.

No MQSC commands read.
No commands have a syntax error.
All valid MQSC commands were processed.
[mqm@localhost errors]$

As MQ.QM1 is not set as the default queue manager, runmqsc is returning back stating, hey, WebSphere MQ queue manager not available.

To further dig into this, verified logs at -
i./var/mqm/errors/AMQERR01.LOG
ii. /var/mqm/qmgrs/MQ!QM1/errors/AMQERR01.LOG
In the above i. being the mq error log and ii. being the queue manager error log.

There is this MQ configuration file called mqs.ini, default location is /var/mqm
My mqs.ini is like this -
-----------------------------
AllQueueManagers:
#********************************************************************#
#* The path to the qmgrs directory, below which queue manager data *#
#* is stored *#
#********************************************************************#
DefaultPrefix=/var/mqm

ClientExitPath:
ExitsDefaultPath=/var/mqm/exits
ExitsDefaultPath64=/var/mqm/exits64

LogDefaults:
LogPrimaryFiles=3
LogSecondaryFiles=2
LogFilePages=1024
LogType=CIRCULAR
LogBufferPages=0
LogDefaultPath=/var/mqm/log


QueueManager:
Name=MQ.QM1
Prefix=/var/mqm
Directory=MQ!QM1
-----------------------------

In the content, there is no listing of default queue manager....
looked in IBM MQ InfoCenter and a sample file looked like this -
-----------------------------
AllQueueManagers:
#***********************************************************************#
#* The path to the qmgrs directory, below which queue manager data *#
#* is stored *#
#***********************************************************************#
DefaultPrefix=/var/mqm

LogDefaults:
LogPrimaryFiles=3
LogSecondaryFiles=2
LogFilePages=1024
LogType=CIRCULAR
LogBufferPages=0
LogDefaultPath=/var/mqm/log

QueueManager:
Name=saturn.queue.manager
Prefix=/var/mqm
Directory=saturn!queue!manager

QueueManager:
Name=pluto.queue.manager
Prefix=/var/mqm
Directory=pluto!queue!manager

DefaultQueueManager:
Name=saturn.queue.manager

ApiExitTemplate:
Name=OurPayrollQueueAuditor
Sequence=2
Function=EntryPoint
Module=/usr/ABC/auditor
Data=123

ApiExitCommon:
Name=MQPoliceman
Sequence=1
Function=EntryPoint
Module=/usr/MQPolice/tmqp
Data=CheckEverything
-----------------------------

So let me edit my file with appropriate default queue settings -
Just added these two lines at the end of the file -
DefaultQueueManager:
Name=MQ.QM1

Now the changes comes into action only after restarting the queue manager.
How to restart the queue manager?
Search in MQ info center - says, ps -ef | grep QNAME lists all the available processes, pick the queue manager process and kill -9.
Wow...
Let me see what I got here -
[mqm@localhost mqm]$ ps -ef | grep mqm | grep -i qm1
mqm 6418 1 0 12:22 ? 00:00:00 amqzxma0 -m MQ.QM1
mqm 6422 6418 0 12:22 ? 00:00:00 /opt/mqm/bin/amqzfuma -m MQ.QM1
mqm 6424 6418 0 12:22 ? 00:00:00 amqzmuc0 -m MQ.QM1
mqm 6429 6418 0 12:22 ? 00:00:00 amqzmur0 -m MQ.QM1
mqm 6432 6418 0 12:22 ? 00:00:00 /opt/mqm/bin/amqrrmfa -m MQ.QM1 -t2332800 -s2592000 -p2592000 -g5184000 -c3600
mqm 6434 6418 0 12:22 ? 00:00:00 /opt/mqm/bin/amqzdmaa -m MQ.QM1
mqm 6436 6418 0 12:22 ? 00:00:00 /opt/mqm/bin/amqzmgr0 -m MQ.QM1
mqm 6449 6418 0 12:22 ? 00:00:00 amqzlaa0 -mMQ.QM1 -fip0
mqm 6450 6436 0 12:22 ? 00:00:00 /opt/mqm/bin/runmqchi -m MQ.QM1 -r
mqm 6452 6436 0 12:22 ? 00:00:00 /opt/mqm/bin/amqpcsea MQ.QM1
mqm 13218 7791 0 13:34 pts/1 00:00:00 grep -i qm1

pid 6418 is the parent pid for all these process.
kill -9 6418 :)

Yeah,
[mqm@localhost mqm]$ ps -ef | grep mqm | grep -i qm1
mqm 13397 7791 0 13:39 pts/1 00:00:00 grep -i qm1

So, good to go now, start queue manager now

[mqm@localhost mqm]$ strmqm
There are 90 days left in the trial period for this copy of WebSphere MQ.
WebSphere MQ queue manager 'MQ.QM1' starting.
17 log records accessed on queue manager 'MQ.QM1' during the log replay phase.
Log replay for queue manager 'MQ.QM1' complete.
Transaction manager state recovered for queue manager 'MQ.QM1'.
WebSphere MQ queue manager 'MQ.QM1' started.

I have not mentioned the FQQMN (Fully Qualified Queue Manager Name), it picked the MQ.QM1 as default and start the manager.
Now, lets check runmqsc
:):)
[mqm@localhost mqm]$ runmqsc
5724-H72 (C) Copyright IBM Corp. 1994, 2005. ALL RIGHTS RESERVED.
Starting MQSC for queue manager MQ.QM1.




Its waiting for my interactive command.
:):)


__ a. Display all the attributes of the queue manager.
DISPLAY QMGMR
1 : DISPLAY QMGMR
AMQ8405: Syntax error detected at or near end of command segment below:-
DISPLAY QMG

AMQ8427: Valid syntax for the MQSC command:

DISPLAY QMODEL(generic_q_name)

[ WHERE( filter_keyword operator filter_value ) ]

[ ALL ] [ ALTDATE ] [ ALTTIME ] [ BOTHRESH ] [ BOQNAME ]
[ CRDATE ] [ CRTIME ] [ DEFPRTY ] [ DEFPSIST ] [ DEFSOPT ]
[ DEFTYPE ] [ DESCR ] [ DISTL ] [ GET ] [ HARDENBO ]
[ INITQ ] [ MAXDEPTH ] [ MAXMSGL ] [ MSGDLVSQ ] [ PROCESS ]
[ PUT ] [ QDEPTHHI ] [ QDEPTHLO ] [ QDPHIEV ] [ QDPLOEV ]
[ QDPMAXEV ] [ QSVCIEV ] [ QSVCINT ] [ QTYPE ] [ RETINTVL ]
[ SHARE ] [ TRIGDATA ] [ TRIGDPTH ] [ TRIGGER ] [ TRIGMPRI ]
[ TRIGTYPE ] [ TYPE ] [ USAGE ] [ NPMCLASS ] [ MONQ ]
[ ACCTQ ] [ STATQ ]
DISPLAY Q
2 : DISPLAY Q
AMQ8405: Syntax error detected at or near end of command segment below:-
DISPLAY Q

AMQ8427: Valid syntax for the MQSC command:

DISPLAY QUEUE(generic_q_name)

[ WHERE( filter_keyword operator filter_value ) ]

[ CLUSTER(generic_cluster_name) ] [ CLUSNL(generic_namelist_name) ]
[ TYPE( QALIAS | QCLUSTER | QLOCAL | QMODEL | QREMOTE ) ]
[ ALL ] [ ALTDATE ] [ ALTTIME ] [ BOTHRESH ]
[ BOQNAME ] [ CLUSDATE ] [ CLUSINFO ] [ CLUSNL ] [ CLUSQMGR ]
[ CLUSQT ] [ CLUSTER ] [ CLUSTIME ] [ CRDATE ] [ CRTIME ]
[ CURDEPTH ] [ DEFBIND ] [ DEFPRTY ] [ DEFPSIST ] [ DEFSOPT ]
[ DEFTYPE ] [ DESCR ] [ DISTL ] [ GET ] [ HARDENBO ]
[ INITQ ] [ IPPROCS ] [ MAXDEPTH ] [ MAXMSGL ] [ MSGDLVSQ ]
[ OPPROCS ] [ PROCESS ] [ PUT ] [ QDEPTHHI ] [ QDEPTHLO ]
[ QDPHIEV ] [ QDPLOEV ] [ QDPMAXEV ] [ QMID ] [ QSVCIEV ]
[ QSVCINT ] [ QTYPE ] [ RETINTVL ] [ RNAME ] [ RQMNAME ]
[ SCOPE ] [ SHARE ] [ TARGQ ] [ TRIGDATA ] [ TRIGDPTH ]
[ TRIGGER ] [ TRIGMPRI ] [ TRIGTYPE ] [ TYPE ] [ USAGE ]
[ XMITQ ] [ MONQ ] [ CLWLRANK ] [ CLWLPRTY ] [ CLWLUSEQ ]


__ b. List the names of all the queues whose names begin with the characters
"SYSTEM".
DISPLAY Q(SYSTEM*)
3 : DISPLAY Q(SYSTEM*)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.ADMIN.ACCOUNTING.QUEUE) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.ADMIN.ACTIVITY.QUEUE) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.ADMIN.CHANNEL.EVENT) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.ADMIN.COMMAND.QUEUE) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.ADMIN.LOGGER.EVENT) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.ADMIN.PERFM.EVENT) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.ADMIN.QMGR.EVENT) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.ADMIN.STATISTICS.QUEUE) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.ADMIN.TRACE.ROUTE.QUEUE) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.AUTH.DATA.QUEUE) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.CHANNEL.INITQ) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.CHANNEL.SYNCQ) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.CICS.INITIATION.QUEUE) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.CLUSTER.COMMAND.QUEUE) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.CLUSTER.REPOSITORY.QUEUE)
TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.CLUSTER.TRANSMIT.QUEUE) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.DEAD.LETTER.QUEUE) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.DEFAULT.ALIAS.QUEUE) TYPE(QALIAS)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.DEFAULT.INITIATION.QUEUE)
TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.DEFAULT.LOCAL.QUEUE) TYPE(QLOCAL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.DEFAULT.MODEL.QUEUE) TYPE(QMODEL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.DEFAULT.REMOTE.QUEUE) TYPE(QREMOTE)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.MQEXPLORER.REPLY.MODEL) TYPE(QMODEL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.MQSC.REPLY.QUEUE) TYPE(QMODEL)
AMQ8409: Display Queue details.
QUEUE(SYSTEM.PENDING.DATA.QUEUE) TYPE(QLOCAL)


__ c. Create a local queue QL.A. Its definitions should include a text description.

DEFINE QL(QL.A)
4 : DEFINE QL(QL.A)
AMQ8006: WebSphere MQ queue created.
I forgot to add description. What to do?
ALTER QL(QL.A) DESCR ('QL.A QUEUE A BLAH')
6 : ALTER QL(QL.A) DESCR ('QL.A QUEUE A BLAH')
AMQ8008: WebSphere MQ queue changed.

__ d. Display all the attributes of the queue.

DISPLAY QL(QL.A)
9 : DISPLAY QL(QL.A)
AMQ8409: Display Queue details.
QUEUE(QL.A) TYPE(QLOCAL)
ACCTQ(QMGR) ALTDATE(2010-08-18)
ALTTIME(13.52.49) BOQNAME( )
BOTHRESH(0) CLUSNL( )
CLUSTER( ) CLWLPRTY(0)
CLWLRANK(0) CLWLUSEQ(QMGR)
CRDATE(2010-08-18) CRTIME(13.50.05)
CURDEPTH(0) DEFBIND(OPEN)
DEFPRTY(0) DEFPSIST(NO)
DEFSOPT(SHARED) DEFTYPE(PREDEFINED)
DESCR(QL.A QUEUE A BLAH) DISTL(NO)
GET(ENABLED) HARDENBO
INITQ( ) IPPROCS(0)
MAXDEPTH(5000) MAXMSGL(4194304)
MONQ(QMGR) MSGDLVSQ(PRIORITY)
NOTRIGGER NPMCLASS(NORMAL)
OPPROCS(0) PROCESS( )
PUT(ENABLED) QDEPTHHI(80)
QDEPTHLO(20) QDPHIEV(DISABLED)
QDPLOEV(DISABLED) QDPMAXEV(ENABLED)
QSVCIEV(NONE) QSVCINT(999999999)
RETINTVL(999999999) SCOPE(QMGR)
SHARE STATQ(QMGR)
TRIGDATA( ) TRIGDPTH(1)
TRIGMPRI(0) TRIGTYPE(FIRST)
USAGE(NORMAL)

__ e. Change the maximum number of messages allowed on the queue to 1000.

We need to change the maximum number of messages allowed to 1000.
MAXIMUM NUMBER OF MESSAGES is nothing but maxdepth

ALTER QL(QL.A) MAXDEPTH(1000)
10 : ALTER QL(QL.A) MAXDEPTH(1000)
AMQ8008: WebSphere MQ queue changed.

In the above maxdepth is MAXDEPTH(5000)

__ f. Again display the queue attributes. Was the modification successful and is the
queue description unchanged?
• DISPLAY QL(QL.A)
DISPLAY QL(QL.A)
1 : DISPLAY QL(QL.A)
AMQ8409: Display Queue details.
QUEUE(QL.A) TYPE(QLOCAL)
ACCTQ(QMGR) ALTDATE(2010-08-18)
ALTTIME(13.55.59) BOQNAME( )
BOTHRESH(0) CLUSNL( )
CLUSTER( ) CLWLPRTY(0)
CLWLRANK(0) CLWLUSEQ(QMGR)
CRDATE(2010-08-18) CRTIME(13.50.05)
CURDEPTH(0) DEFBIND(OPEN)
DEFPRTY(0) DEFPSIST(NO)
DEFSOPT(SHARED) DEFTYPE(PREDEFINED)
DESCR(QL.A QUEUE A BLAH) DISTL(NO)
GET(ENABLED) HARDENBO
INITQ( ) IPPROCS(0)
MAXDEPTH(1000) MAXMSGL(4194304)
MONQ(QMGR) MSGDLVSQ(PRIORITY)
NOTRIGGER NPMCLASS(NORMAL)
OPPROCS(0) PROCESS( )
PUT(ENABLED) QDEPTHHI(80)
QDEPTHLO(20) QDPHIEV(DISABLED)
QDPLOEV(DISABLED) QDPMAXEV(ENABLED)
QSVCIEV(NONE) QSVCINT(999999999)
RETINTVL(999999999) SCOPE(QMGR)
SHARE STATQ(QMGR)
TRIGDATA( ) TRIGDPTH(1)
TRIGMPRI(0) TRIGTYPE(FIRST)
USAGE(NORMAL)


__ g. Define a second local queue QL.B with a text description.

DEFINE QL(QL.B)
5 : DEFINE QL(QL.B)
AMQ8006: WebSphere MQ queue created.

__ h. Display all the attributes of the queue.
• DISPLAY QL(QL.B)
DISPLAY QL(QL.B)
3 : DISPLAY QL(QL.B)
AMQ8409: Display Queue details.
QUEUE(QL.B) TYPE(QLOCAL)
ACCTQ(QMGR) ALTDATE(2010-08-18)
ALTTIME(13.58.55) BOQNAME( )
BOTHRESH(0) CLUSNL( )
CLUSTER( ) CLWLPRTY(0)
CLWLRANK(0) CLWLUSEQ(QMGR)
CRDATE(2010-08-18) CRTIME(13.50.16)
CURDEPTH(0) DEFBIND(OPEN)
DEFPRTY(0) DEFPSIST(NO)
DEFSOPT(SHARED) DEFTYPE(PREDEFINED)
DESCR(QL.B B QUEUE BLAH) DISTL(NO)
GET(ENABLED) HARDENBO
INITQ( ) IPPROCS(0)
MAXDEPTH(5000) MAXMSGL(4194304)
MONQ(QMGR) MSGDLVSQ(PRIORITY)
NOTRIGGER NPMCLASS(NORMAL)
OPPROCS(0) PROCESS( )
PUT(ENABLED) QDEPTHHI(80)
QDEPTHLO(20) QDPHIEV(DISABLED)
QDPLOEV(DISABLED) QDPMAXEV(ENABLED)
QSVCIEV(NONE) QSVCINT(999999999)
RETINTVL(999999999) SCOPE(QMGR)
SHARE STATQ(QMGR)
TRIGDATA( ) TRIGDPTH(1)
TRIGMPRI(0) TRIGTYPE(FIRST)
USAGE(NORMAL)

__ i. Change the maximum number of messages allowed on the queue to 2000 this
time using -DEFINE with REPLACE- instead of the -ALTER- command.
DEFINE QL(QL.B) REPLACE MAXDEPTH(2000)
4 : DEFINE QL(QL.B) REPLACE MAXDEPTH(2000)
AMQ8006: WebSphere MQ queue created.


__ j. Display again the queue attributes of QL.B. Was the creation of the queue
successful and is there a queue description?

DISPLAY QL(QL.B)
5 : DISPLAY QL(QL.B)
AMQ8409: Display Queue details.
QUEUE(QL.B) TYPE(QLOCAL)
ACCTQ(QMGR) ALTDATE(2010-08-18)
ALTTIME(14.12.18) BOQNAME( )
BOTHRESH(0) CLUSNL( )
CLUSTER( ) CLWLPRTY(0)
CLWLRANK(0) CLWLUSEQ(QMGR)
CRDATE(2010-08-18) CRTIME(13.50.16)
CURDEPTH(0) DEFBIND(OPEN)
DEFPRTY(0) DEFPSIST(NO)
DEFSOPT(SHARED) DEFTYPE(PREDEFINED)
DESCR( ) DISTL(NO)
GET(ENABLED) HARDENBO
INITQ( ) IPPROCS(0)
MAXDEPTH(2000) MAXMSGL(4194304)
MONQ(QMGR) MSGDLVSQ(PRIORITY)
NOTRIGGER NPMCLASS(NORMAL)
OPPROCS(0) PROCESS( )
PUT(ENABLED) QDEPTHHI(80)
QDEPTHLO(20) QDPHIEV(DISABLED)
QDPLOEV(DISABLED) QDPMAXEV(ENABLED)
QSVCIEV(NONE) QSVCINT(999999999)
RETINTVL(999999999) SCOPE(QMGR)
SHARE STATQ(QMGR)
TRIGDATA( ) TRIGDPTH(1)
TRIGMPRI(0) TRIGTYPE(FIRST)
USAGE(NORMAL)
__ 4. Exit the runmqsc mode

END is the command to exit the runmqsc.

5/26/10

major minor version errors

These types of errors are caused by a Java version mismatch between the compiled proxies and your runtime.

"bad class file. class file has wrong version 50.0, should be 48.0."

Unsupported major.minor version 50.0
JSPG0091E: An error occurred at line: 2 in the file: /login.jsp
JSPG0093E: Generated servlet error from file: /login.jsp

Below are a list of some of the version numbers and their corresponding Java runtimes:
Version 50.0 = Java 1.6.x
Version 49.0 = Java 1.5.x
Version 48.0 = Java 1.4.x

The server is expecting 48.0 version of the code, meaning, code built with 1.4.x version of jvm, but, the supplied code was built against version 50.0 meaning 1.6.x version of the jvm.

What one can do to solve this is, if you use RAD kind of tools to build the code, configure build path to have appropriate JRE, clean your builds and re build.


uptime

uptime is a measure of the time a machine has up been.
This is pretty useful command.

To know since when the system is up one can do like this at the terminal prompt
$uptime
11:10:27 up 9 mins, 2 users, Load average: 0.02, 0.24, 0.18


Determining system uptime in windows -

1.
C:\> systeminfo | find "Time:"
System Up Time: 0 Days, 8 Hours, 7 Minutes, 19 Seconds

Note: Windows Vista Business 64-bit and Windows 7 do not return a "System Up Time" but "System Boot Time" instead.

2.
C:\> net statistics server | find "since"
Server Statistics for \\COMPUTERNAME

Statistics since 8/31/2009 8:52:29 PM

4/22/10

remove directory

If you need to remove a directory, or files and or folders under a directory, in say, Solaris you do like this,
say to remove cache under wstemp
rm -r wstemp/*
which removes files folders under wstemp recursively.
rm test.txt
deletes test.txt file
rm -i wstemp/*
inquires and prompts yes or no for each file
In Linux
rm -f - force removes a file
rm -fr - force removes directory

In DOS -
rmdir is the command to remove a directory.
rmdir dSample
removes if dSample dir is empty.
To force remove
rmdir /S dSample
removes dSample directory but inquires
rmdir /S /Q dSample
removes dSample directory and its sub directories quietly.

Enjoy your day.

4/12/10

Administrative console throws error 500 with java.lang.NullPointerExcetion

Last Sunday, one of my friend got this problem.

Admin Console, when accessed, throws error 500 with java.lang.NullPointerExcetion.
SystemOut.log has the following entries

5ea42ee7 WebGroup I SRVE0180I: [adminconsole] [/admin] [Servlet.LOG]: /secure/logon.jsp: init
5ea42ee7 WebGroup I SRVE0180I: [adminconsole] [/admin] [Servlet.LOG]: /secure/layouts/browser_detection.jsp: init
5ea02ee7 WebGroup I SRVE0180I: [adminconsole] [/admin] [Servlet.LOG]: /secure/console.jsp: init
5ea02ee7 WebGroup E SRVE0026E: [Servlet Error]-[]: java.lang.NullPointerException
at org.apache.jsp._console._jspService(_console.java:172)

I found this technote http://www-01.ibm.com/support/docview.wss?rs=180&uid=swg21177893 regarding NullPointerException, which states -
Resolving the problem
To resolve this issue:

1. Clean up the disk space problem.
2. Delete the /wstemp//preferences.xml file.
3. Try to login to administrative console. This should build a new preferences.xml with the correct data and should allow the user to login to administrative console.

My friend followed these steps and resolved the problem.

3/10/10

Installation Issues

Mr.X installed WAS like this on Win 08 server-

Started to launcher.
Selected WAS installer.
The installer had successfully passed OS verification.
Then selected Cell Topology. WAS 6.1 and above gives you an option to install a Cell. Meaning, installer installs Dmgr, installs an appserver, and federates that to dmgr.
Now, with all the needed inputs, the installer started to install binaries, installed successfully dmgr, appserver and even successfully federated everything.

Now, as this guy didnt configured security at the time of installation, wants to do it in the post installation.

He did like this -
After immediately installing, he ran the ivt (installation verification test).
Then went to admin console, kicked in security setup process.

WHAT IS HE MISSING?

The error what he got was - after configuring security, he wanted to bounce the services, bounce dmgr, bounce node agent, bounce server.
server was failing to start.
dmgr cannot recognize server.

What to do?ADMR0111E is one of the errors.

3/9/10

WASService command

Today one of colleague was trying to add a jvm to Windows Service.
This is the syntax for the command -
WASService.exe -add service_name
-serverName server_name
-profilePath server_profile_directory
[-wasHome
app_server_root]
[-configRoot configuration_repository_directory]
[-startArgs additional_start_arguments]
[-stopArgs additional_stop_arguments]
[-userid user_id -password password]
[-logFile service_log_file]
[-logRoot server_log_directory]
[-restart true | false]
[-startType automatic | manual | disabled]

This guy is fighting with some set of parameters. He is executing, command runs, he goes to the services, he finds that specific jvm in the services, but when he starts it, it simply says *started*, upon right clicking on the service, he sees only start option, remaining faded out.

So, whats the problem?
Go through the command options properly -
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/com.ibm.websphere.base.doc/info/aes/ae/rins_wasservice.html
He was trying to add jvm to win services like this -
WASService.exe add blabla -logFile path/to/a/location/server.log -logRoot path/to/a/location/

yata yata yata

The problem is - one should pass SERVER LOG FILE as logFile and SERVER_LOG_LOCATION not to another location.
The WASService command looks for a file named server_name .pid to determine if the server is running.

So, if you want to add a jvm, by name server1 to Win services, you need to pass server1 log location.

Have Fun

2/27/10

WAS ND 7 Hypervisor Edition





This is vmware on Windows 7 64 bit.

2/4/10

RAD7.0 Failure on Vista

You have installed RAD on Vista Pista.
But, somehow, when you try to load or open up ur RAD IDE, you got the following error -

eclipse.buildId=unknown
java.fullversion=J2RE 1.5.0 IBM J9 2.3 Windows 2000 x86-32 j9vmwi3223-20061001 (JIT enabled)
J9VM - 20060915_08260_lHdSMR
JIT - 20060908_1811_r8
GC - 20060906_AA
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Framework arguments: -product com.ibm.rational.rad.product.ide
Command-line arguments: -os win32 -ws win32 -arch x86 -product com.ibm.rational.rad.product.ide

!ENTRY org.eclipse.osgi 4 0 2010-02-04 00:36:38.094
!MESSAGE Application error
!STACK 1
java.lang.UnsatisfiedLinkError: swt-win32-3235 (Not found in java.library.path)
at java.lang.ClassLoader.loadLibraryWithPath(Unknown Source)
at java.lang.ClassLoader.loadLibraryWithClassLoader(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
at org.eclipse.swt.internal.win32.OS.(Unknown Source)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(Unknown Source)
at org.eclipse.swt.widgets.Display.(Unknown Source)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(Unknown Source)
at org.eclipse.ui.internal.Workbench.createDisplay(Unknown Source)
at org.eclipse.ui.PlatformUI.createDisplay(Unknown Source)
at org.eclipse.ui.internal.ide.IDEApplication.createDisplay(Unknown Source)
at org.eclipse.ui.internal.ide.IDEApplication.run(Unknown Source)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(Unknown Source)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(Unknown Source)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(Unknown Source)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown Source)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.invokeFramework(Unknown Source)
at org.eclipse.core.launcher.Main.basicRun(Unknown Source)
at org.eclipse.core.launcher.Main.run(Unknown Source)
at org.eclipse.core.launcher.Main.main(Unknown Source)



Solution - Simple
Goto RAD inst directory, c:\program files\IBM\SDP70\
Right click on eclipse.exe, select run as Administrator

:):)
Enjoy

1/31/10

WebSphere Hypervisor Setup

Well, Lets see what we need to for this.
WebSphere Hypervisor version 7. Follow this URL http://www-01.ibm.com/software/webservers/appserv/hypervisor/
You need to download the following



When searched in infocenter for hypervisor, it gave me very clear instructions. Here are those links
http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=/com.ibm.websphere.virtualimages.doc/info/ae/ae/welcome_virtual.html
http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=/com.ibm.websphere.virtualimages.doc/info/ae/ae/tins_virt_install_vmware_esx.html

So, you those files from IBM. Whatelse you need?

1. SLES 10, sp3.
Goto novell.com, get SuSE Linux Enterprise Edition.

2. VirtualBox -
http://www.virtualbox.org/
Download virtualbox, install it, create a suse virtual machine.

3. Get cygwin.
http://www.cygwin.com/

4. Before you begin, you need to mount these tgz files to cygwin.
When cygwin is installed it creates directories like this
Directory Structure

Cygwin attempts to duplicate the directory structure of a Linux System within the "c:\cygwin" folder:


To not waste time on mounting another directory into cygwin, simply copy those tgz files to c:\cygwin\tmp, which are avaliable thru cygwin shell.

5. Now, openup a cygwin shell.
You have downloaded tgz file. A tgz file is a gunzip file. To uncompress it, in general, one can use gunzip command.
gunzip filename.tgz
is an example.
Or, on linux platforms, tar gives a switch *z* to uncompress gz, tgz files
Now, at the cygwin prompt -
cd /tmp
tar xvzf filename.tgz
Use the above command and replace filename.tgz with all those four files.
This uncompresses tgz file to a tar file and tar file will be uncomplressed.
6. Above command creates files like
vmdk, vmx files.
7. For ease of use, I have created another directory say, c:\vmdk_files
and copied all these files into that directory. These are the files -


8. So, we have vmdk files, and virtual machine. By the way, what is a vmdk file? :)
vmdk = virtual machine disk.
When we create a virtual machine, it will create a hdd readable by it. virtualbox by default creates vdi file. vmdk is another kind of such virtual disk file. Now, we need to add that virtual disk to the virtual machine as a secondary disk.

9. This is how you do it -
Open ur virtualbox
point to the virtual machine

As pointed in the above, I have selected suse, under that, select *Storage*.
10.

As shown above, hit on that *Add Attachment*, it gives two options, add hard disk or cd/dvd/. Select, obviously, disk.
11.
So, we mounted these vmdsiks to our virtual machine. Lets start and see -
12. These 4 are the mounted disks -

1/30/10

tar

was.7005.nd.linux.vmware.esx.sles.os.tgz is big file, 2.33GB. When uncompress, its 12GB.


$tar xvfz was.7005.nd.linux.vmware.esx.sles.os.tgz
SLES10SP2-32-flat.vmdk
tar: SLES10SP2-32-flat.vmdk: Wrote only 4607 of 10240 bytes
SLES10SP2-32.vmdk
tar: Exiting with failure status due to previous errors


What to do??

1/29/10

vmdk disks

While I was going through Dileep Kumar's Blogpost WebSphere Hypervisor Edition and VirtualBox, Hypervisor version attracted me a lot. So, I wanted to tryout installation the Hypervisor version 7.0.0.5 on my VirtualBox.

I have lot to share on this and tomorrow I will publish that.

1/28/10

InfoCenter 6.1

Today, InfoCenter URL is spitting with this message

Proxy Error

The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /infocenter/wasinfo/v6r1/advanced/searchView.jsp.

Reason: Error reading from remote server

IBM_HTTP_Server/6.0.2.13 Apache/2.0.47 (Unix) Server at publib.boulder.ibm.com Port 80

According to IBM Technote http://www-01.ibm.com/support/docview.wss?rs=177&context=SSEQTJ&dc=DB560&dc=DB520&uid=swg21316599&loc=en_US&cs=UTF-8&lang=en&rss=ct177websphere

Problem(Abstract)
A Proxy Error in IBM® HTTP Server (IHS) causes a 502 error response in the browser.

Symptom
The user sees a 502 Proxy Error in the browser that says:

The proxy server received an invalid response from an upstream server. The proxy server could not handle the request ....

The IBM HTTP Server error log displays errors similar to:

proxy: Error reading from remote server returned by ....


Cause
The most common cause of this problem is when the back-end web server is either not using KeepAlive, or is using too low of a value for KeepAlive.

Environment
IBM HTTP Server is configured as a proxy or reverseproxy in front of some other back-end web server.

Resolving the problem
There are two possible solutions to this problem:

1) Disable KeepAlive in IBM HTTP Server, by adding these directives into your IBM HTTP Server config (httpd.conf):

SetEnv force-proxy-request-1.0 1
SetEnv proxy-nokeepalive 1

OR

2) Increase the KeepAlive value in the back-end web server. The KeepAlive value for the back-end web server should be at least double or triple whatever IBM HTTP Server is using for KeepAlive. The default KeepAlive for IBM HTTP Server is 15 seconds. So the back-end web server should be configured to use KeepAlive of 30 or 45 seconds.
-------------------------------------


Here the question is, who is going set those values on the IBM remote servers? :):)

1/27/10

Migration Notes #2

The migration tools are used as part of a four-step migration process:
1. Run WASPreUpgrade on the existing WebSphere Application Server configuration.
2. Uninstall the existing version of WebSphere Application Server.
3. Install the new version of WebSphere Application Server.
4. Run WASPostUpgrade on the new version.
In the second step, it is recommended that rather than uninstalling the existing version, it be made dormant. By keeping the existing software installed on the machine, it will be much easier to back out of the migration should unexpected problems arise.

The fully automated migration includes the following steps:
1. Migrate the existing Version 5.x deployment manager to Version 6.0 using the migration
tools.
2. Migrate the HTTP servers and HTTP server plug-ins on all Web tier nodes.
3. Individually migrate the application server nodes using the migration tools.

The WASPreUpgrade and WASPostUpgrade tools effectively move the existing configuration into WebSphere Application Server Version 6.0.

1/26/10

Ideal WAS Environment

Migration Notes #1

Why to migrate?
Two important things to my understanding.
For new features.
For maintenance support.
-> New Features
Again two views. Developer view and support view.
ex., My developer called me one day, said, struts framework x.xx version is throwing error on the development. I paid a look into the log and search for the errors in the IBM. Found that, that version of JVM donot support this version of struts. So, what to do? Its the developers call to have the latest copy the JVM which can support this version of struts and apps.
This is what is developer initiated migration.
Admin initiated migration -
Admin may initiate the migration too. Some of the app server errors must have been addressed in the new version of the application server and so the need for migration.
-> Support
If the product is end of the support, there is a need to migrate to supported version.

While migrating, one should need to understand inconsistencies and deprecations between the target and source environments.
In considering the incompatibilities and deprecations, we look at these major areas:
* J2EE differences
* J2SE/JDK differences
* Application Server runtime differences
* Programming Model Extension differences
* Third Party Library differences

-> J2EE Differences
Java Code, as we all know, is forward compatible. Meaning that, code compiled in JDK 1.3.0 runs on 1.4.0, but, may throw some deprecation warnings.
Its a good practice for the developers to address those deprecations in the code. So, when one plans to migrate from x version to y version, the development team should plan to revisit their code.