Preparation 
  Connect to the desired database
    db2 connect to <dbname>
  Create stored procedures and snapshot storage tables
    db2 -td@ -f db2perf_utils.db2
    db2 -td@ -f db2perf_snapdiff.db2
  Turn on monitoring by default with DFT_MON_xxx database manager configuration switches

Use
  Connect to the desired database
    db2 connect to <dbname>
  Call stored procedure (the easy way, with one parameter)
    db2 call db2perf_snapdiff(<operation>)
        start	- collect 'start of interval' snapshot from table function and store it in one of our tables
        stop	- collect 'end of interval' snapshot and store it in snapshot storage table
        diff	- compare two rows in the snapshot tables and report what's different
        list	- show what snapshot interval data has been collected
        delete	- delete all snapshot interval data from storage tables

  Typical sequence of operations:
    Get the first interval of data
	db2 "call db2perf_snapdiff('start')"
	sleep(30)
	db2 "call db2perf_snapdiff('stop')"
    Sometime later, get another interval of data
	db2 "call db2perf_snapdiff('start')"
	sleep(30)
	db2 "call db2perf_snapdiff('stop')"
    List the intervals we've got
	db2 "call db2perf_snapdiff('list')"
    Compare the latest 2 intervals
	db2 "call db2perf_snapdiff('compare')"


For more information, see db2perf.pdf
