databasedb2

Take your measuring cup!

How many transaction does your db2 database handle in a day and what is the transaction rate per second ?  Well its not a difficult to answer. Simply take snapshots of your database periodically and viola you have your answer.   I put few scripts together to make it easier for you.  In here I have attached a zipped tar file and a sample excel spreadsheet.   There are four files on the zipped tar file.  I have a shell script(run_transaction_monitor.sh)that kicks off the main process in the background, currently the process continues to run in the background until you kill it. The process wakes up every 10 seconds takes a snapshot of the database and stores it in a table. I have included the ddl for the table as well.  When ever you are ready to extract the data, run the extract script that I have included and it will extract the data in a csv format.  You can import it to the sample excel spreadsheet and it will generate the graphs for you.
The following files are included in the attached transaction_rate_monitor.tar.gz file:
1. database_transaction.ddl                           > ddl for creating the snapshot table
2. extract_transaction_monitor_data.sh    > shell script to extract data to a csv file.
3. transaction_monitor.sh                             > main script that gathers statistics.
4. run_transaction_monitor.sh                    > submits transaction_monitor in background

If you need any help with these or have any comments, as always let me know.