The LIXA project supplies a test utility you can use to
perform basic tests on your LIXA environment.
The command is named lixat and is
located in the bin directory; use
--help option to retrieve the list of
the available options:
tiian@ubuntu:~$ /opt/lixa/bin/lixat --help
Usage:
lixat [OPTION...] - LIXA test utility
Help Options:
-?, --help Show help options
Application Options:
-c, --commit Perform a commit transaction
-r, --rollback Perform a rollback transaction
-v, --version Print package info and exit
-b, --benchmark Perform benchmark execution
-o, --open-close Execute tx_open & tx_close for every transaction [benchmark only]
-s, --csv Send result to stdout using CSV format [benchmark only]
-l, --clients Number of clients (threads) will stress the state server [benchmark only]
-d, --medium-delay Medium (random) delay between TX functions [benchmark only]
-D, --delta-delay Delta (random) delay between TX functions [benchmark only]
-p, --medium-processing Medium (random) delay introduced by Resource Managers operations between tx_begin and tx_commit/tx_rollback [benchmark only]
-P, --delta-processing Delta (random) delay introduced by Resource Managers operations between tx_begin and tx_commit/tx_rollback [benchmark only]
The LIXA test utility is a LIXA client program and it
does not need
any special authorization to run because it does not need to write
the content of /opt/lixa/var/ directory.
The lixat command does nothing useful except trying to contact the state server and optionally perform a commit and/or rollback dummy distributed transaction [19]. Below there's the output of a trivial execution: the program connects to the state server, performs tx_open() against all the configured resource managers and performs tx_close() against all the configured resource managers.
tiian@ubuntu:~$ /opt/lixa/bin/lixat
tx_open(): 0
tx_close(): 0
With --commit option the test program performs a
dummy commit against all the configured resource managers too:
tiian@ubuntu:~$ /opt/lixa/bin/lixat --commit
tx_open(): 0
tx_begin(): 0
tx_info(): 1
xid/formatID.gtrid.bqual = 1279875137.080f2b63a3804bfbbdd3347ca7607ba3.ef954655163edff9fee662b12f881c97
tx_commit(): 0
tx_close(): 0
A dummy commit does not damage your data because the program does not contains instructions that modify the content of the resource managers. A dummy rollback can be performed as well:
tiian@ubuntu:~$ /opt/lixa/bin/lixat --rollback
tx_open(): 0
tx_begin(): 0
tx_info(): 1
xid/formatID.gtrid.bqual = 1279875137.c651f0f2efb249bd92f3f2b5a76741a5.ef954655163edff9fee6-62b12f881c97
tx_rollback(): 0
tx_close(): 0
The test utility can be used to:
check the state server is up and running
tiian@ubuntu:~$ /opt/lixa/bin/lixat tx_open(): -7 tiian@ubuntu:~$ echo $? 1
(the state server is not running)
check the content of etc/lixac_conf.xml
is ok
tiian@ubuntu:~$ export LIXA_PROFILE=XXXX tiian@ubuntu:~$ /opt/lixa/bin/lixat tx_open(): -7 tiian@ubuntu:~$ echo $? 1
(the profile “XXXX” does not exist)
try different profiles described inside
etc/lixac_conf.xml
...
You can safely experiment by yourself using lixat command.
[19] lixat can be used “in benchmark mode” as well, but that usage is explained in the section called “A tuning example”