IBM Community Hub

IBM Community Hub

The central place for general IBM discussions, knowledge sharing, and community updates. Explore our Topic Group List to find groups dedicated to individual IBM products and services.


#Other


#General(All)
 View Only

Db2ReadLog API sent too mush data

  • 1.  Db2ReadLog API sent too mush data

    Posted 02/15/23 02:51 AM

    Hi,

    I found a feature(?) about db2ReadLog API.

    When I user db2ReadLog API like:

    memset(logBuffer,0x88,logBufferSize);
    
    void* readLogStruct;
    db2V10ReadLogStruct readLogInput;
    
    readLogInput.iCallerAction = DB2READLOG_READ;
    readLogInput.piStartLRI = &sLRI;
    readLogInput.piEndLRI = &eLRI;
    readLogInput.poLogBuffer = logBuffer;
    readLogInput.iLogBufferSize = logBufferSize;//20*1024*1024->20MB
    readLogInput.iFilterOption = DB2READLOG_FILTER_ON;
    readLogInput.poReadLogInfo = &readLogInfo;
    readLogStruct = &readLogInput;
    
    db2ReadLog(Version, readLogStruct, &sqlca);

    There will be a large number of data sent to the network(sent to database, not receive from database).

    The first of the Package as follow:

    Length =1514
    target IP:192.168.34.10
    source IP:192.168.34.5
    TTL & Protocol=40 06
    target port:50005->db2port
    source port:58644
    seq:3814090079
    ack:2435708537

    01 01 08 0A 1D 93 01 E7 53 88 79 E9 00 71 D0 51
    00 01 00 6B 20 0B 00 40 21 13 00 12 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 08
    24 53 51 4C 24 49 4E 58 00 12 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 05 21 05 F1 00 08 21 14 00
    00 FF FF 00 06 21 41 FF FF 00 06 21 40 FF FF 00
    08 21 56 00 00 00 01 00 06 21 38 32 39 00 DC D0
    53 00 01 00 D6 C0 06 08 00 00 00 00 00 04 00 00
    00 00 00 00 00 F1 01 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 18 00 00 00 00 00 00 00 C5
    01 04 B8 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 18 00 00 00 00 00 00 00 C5 01 04 B8 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 80 00 00 00
    00 00 00 95 01 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 04 00 00 00 00 00 00 00 F1 01 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04
    00 00 00 00 00 00 00 F1 01 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 80 00 00 00 00 00 00
    00 C5 01 04 B8 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 01 00 00 00 00 00 00 00 C5 01 04 B8 00
    00 00 00 00 00 00 00 00 00 01 01 D0 53 00 01 00
    FB 24 12 00 25 00 10 1B 76 D0 03 00 04 27 00 18
    27 00 18 C9 80 09 03 00 04 03 00 04 27 00 80 3D
    00 01 06 71 E4 D0 00 01 00 D2 14 7A 00 00 01 00
    00 00 00 01 00 00 00 00 00 00 00 A8 2C 04 00 00
    00 00 00 DF F5 3B 00 00 00 00 00 00 01 00 00 00
    00 00 00 00 A8 2C 04 00 00 00 00 00 DF F5 3B 00
    00 00 00 00 00 02 00 00 00 00 00 00 80 00 00 00
    80 00 00 00 01 00 00 00 00 01 00 00 00 00 00 00
    00 BD D4 03 00 00 00 00 00 23 F8 39 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00
    00 A8 2C 04 00 00 00 00 00 DF F5 3B 00 00 00 00
    00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 2D 8B EC 63 00 00 00 00 00 00 00
    00 DF F5 3B 00 00 00 00 00 FF FF FF D0 03 00 01
    80 08 14 6C 00 00 80 01 00 88 88 88 88 88 88 88

    ...............................................(many 0x88)

    other Packages are as follow:

    Length =1514
    target IP:192.168.34.10
    source IP:192.168.34.5
    TTL & Protocol=40 06
    target port:50005
    source port:58644
    seq:3814091527
    ack:2435708537

    01 01 08 0A 1D 93 01 E7 53 88 79 E9 88 88 88 88

    ...............................................(many 0x88)

    ...............................................(many Packages)

    Such a large amount of invalid data should not be sent When use DB2READLOG_READ instruction.(?)

    It means that half of the network bandwidth is wasted.



    ------------------------------
    BR L
    ------------------------------