June 23 2014

How to get the Informix instance IPC shared memory segment base address in Hexadecimal?

Tagged Under : , , ,

(1) Get SERVERNUM value from onconfig:

$ onstat -c | grep SERVERNUM
SERVERNUM 2

(2) Convert SERVERNUM value from Decimal (base10) to Hexadecimal (base16):

Decimal 2 = Hex 2
= 0x2

Note: you may use ms-windows “calc” programmer view.

(3) Apply this fomular with Hexadecimal calculation:

IPC Shared Mem Address = (SERVERNUM_In_Hex * 0x10000) + 0x52564801
= (0x2 * 0x10000) + 0x52564801
= 0x20000 + 0x52564801
= 0x52584801

(4) Therefore, you will get the IPC shared memory address started from 0x52584801..

$ ipcs -m | grep 5258480

key shmid owner perms bytes nattch status
0x52584801 92864520 root 660 2606284800 68 locked
0x52584802 92897299 root 660 2097152000 68 locked
0x52584803 92930070 root 666 561152 68

June 03 2014

Tracing Locks in Table level on informix

Tagged Under :

Tracing Locks in Table level on informix

# Find out the hex partnum number of the table

dbaccess sysmaster –
select hex(partnum),owner from systabnames where tabname=”table_name”;

example
=======

> select hex(partnum),owner,dbsname from systables where tabname=”country”;

(expression) owner dbsname

0x004004E5 grefdev gref420_cit3

1 row(s) retrieved.