.
contact contact


fwdump utility

» Usage | Examples
 
.
  The fwdump utility may be used to evaluate the contents of the fwlog files. Please note that this is a contributed utility that is unsupported.

Usage

usage: fwdump [options] fwlog
options:
 -help       - show usage (this list)
 -v          - display details
 -n id       - filter records for specific node#
 -t f:t      - filter records from:to time (specified in seconds)
 -s f:t      - filter records from:to sequence id
 -x f:t      - filter records from:to transaction id
 -r rec      - filter records by specific record number
 -p num      - filter records for physical page (implies -a)
 -o pattern  - filter records by opcode pattern (implies -a)
 -a          - display all entry types (by default only IMAGE like
               operations are displayed)
 -A          - display audit entries if -a not specified
 -M file     - specifies file name of node name map (dbdumpcat -nt20)
The fwdump utility reads and decodes the forward-log file specified on the command line.

Examples

$ fwdump /path/to/fw32-1

This outputs all image related activities from the specified fwlog file. When the -v option is present, additional details (such as contents of updated records) is output (if -v is specified twice causes outputs additional details, three times causes output of large data chunks untruncated).

Below is an example output. At the beginning is a description of the fwlog file then an UPDATE operation. Please note that UPDATE operations do not necessarily indicate a DBUPDATE intrinsic and may be caused implicitly through changing a related detail (in case of a master data set).

File: /data/db2/fwlog/32-2.log
volume set id: 0x13704a
volume generation: 32
file sequence: 2

sequence = 1
timestamp = 2004-02-24 21:58:05 (1077656285)
 transaction_id: 112898
 txn state: TXN (5)
 node_id: #158
  recno = 2
  opcode = UPDATE (1)
  data = 57 bytes
000: 45 64 76 61 72 64 20 47 72 69 65 67 00 76 65 6e |Edvard Grieg.ven|
010: 31 38 34 33 00 00 00 00 00 00 00 00 00 00 00 00 |1843............|
020: 31 39 30 37 00 00 00 00 00 00 00 00 00 00 00 00 |1907............|
030: 00 00 0f 0e 00 00 00 17 00                      |.........       |
Each logged activity has its own sequence number that is increasing in the fwlog file. Also a timestamp (seconds since the UNIX epoch) is present.
All records in the same transaction (i.e. DBXBEGIN/DBXEND) share the same unique transaction_id. The txn state field specifies if the operation was the first / last / in the middle of a transaction. The node_id specifies the data set, recno, opcode and data are pretty much obvious (data is only output when the -v option is present and also holds some off-record data).

Filtering the output:
The most effective is to specify the data set you are interested in. This is done with the -n option. It takes a id# as the argument that could be retrieved from dbdumpcat.

For example:

$ dbdumpcat -s8202 -t1 music

-------------------------------------------------------------------------
#1 systables (16 entries)
-------------------------------------------------------------------------
|tableid|uid |name                |type|flags   |ncols|npath|nidx|nodeid|
-------------------------------------------------------------------------
|1      |0   |systables           |0   |00000000|9    |0    |0   |145   |
...
|100    |0   |ALBUMS              |1   |00000001|7    |2    |0   |156   |
|101    |0   |COMPOSERS           |1   |00000001|3    |1    |0   |158   |
|102    |0   |SELECTIONS-A        |1   |00000003|1    |2    |0   |160   |
|103    |0   |SELECTIONS          |1   |00000000|6    |3    |0   |162   |
|104    |0   |LOG                 |1   |00000000|5    |2    |0   |163   |
-------------------------------------------------------------------------
This returns the files specific to the music database (maintained by the server listening to port 8202). The 2nd column specifies the data set and the last column the respective id#.

To limit the output to transactions affecting the data set COMPOSERS, the following statement would be appropriate:

$ fwdump -n 158 /path/to/fw32-1
Additional filters are available for sequence numbers (-s option), transaction id (-x option) and timestamp (-t option) of the event. The following option would limit the output to the time frame "2004-02-24 21:58:05".

$ fwdump -n 158 -t 1077656285:1077656285 /path/to/fw32-1
The 1077656285 is the number of seconds since the epoch as output by fwdump.

fwdump also supports outputting symbolic names for a node if a map file is specified with the -M option. The map file may be created with the dbdumpcat command.

$ dbdumpcat -nt20 > mapfile
$ fwdump -n 158 -M mapfile /path/to/fw32-1
When a map file is specified, the output includes the database, dataset and index (as appropriate) names. For example:
sequence = 3096
timestamp = 2003-11-10 13:24:50 (1068467090)
 transaction_id: 58
 node_id: MUSIC.COMPOSERS (#375)
  recno = 1
  opcode = PUT (3)
  data = 60 bytes
000: 4c 75 64 77 69 67 20 42 65 65 74 68 6f 76 65 6e |Ludwig Beethoven|
010: 31 37 37 30 00 00 00 00 00 00 00 00 00 00 00 00 |1770............|
020: 31 38 32 37 00 00 00 00 00 00 00 00 00 00 00 00 |1827............|
030: 00 00 00 00 00 00 00 00 00 00 00 00             |............    |


 
 
 
  Privacy | GDPR / DSGVO | Webmaster | Terms of use | Impressum Revision: 2009-05-05  
  Copyright © 1995-2024 Marxmeier Software AG