May be of your concern

Sharad Chandra <[email protected]>
Newsgroups gmane.network.net-snmp.user
Organization NIKSUN
Message-ID <[email protected]>
Hi Guys,

	I have attached 2 files Dump, code generated by mib2c and modified. If i call 
storageStatusTable_cache_load function without using pthread library, 
net-snmp just exit without saying anything and no code dump while travelling 
the table, snmpwalk gives me expected result first TIMEOUT secs but then I am 
able to walk first 2-3 lines then it stops. Some last lines of  Dump (-DAll) 
is attached.

storageStatusTable_cache_load  with pthread libraray (the code within #if 0 to 
#endif) works fine. storageStatusTable_cache_thread_load takes 2-3 secs.

storageStatusTable_cache_thread_load is orignally 
storageStatusTable_cache_load just name changed to use threading.

Its net-snmp-5.3.1_3 on freebsd 6.1 64bit env.

Thanks
Sharad Chandra

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/

_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
Dump (text/plain, 3.7 KB)
trace: agentx_realloc_build_header(): mibgroup/agentx/protocol.c, 610:
dumpv_send:     Command:        18 (Response)
trace: agentx_realloc_build_header(): mibgroup/agentx/protocol.c, 613:
dumpv_send:     Flags:  00
trace: agentx_realloc_build_header(): mibgroup/agentx/protocol.c, 616:
dumph_send:   Session ID
dumpx_send:    19 00 00 00
dumpv_send:      Integer:       25 (0x19)
trace: agentx_realloc_build_header(): mibgroup/agentx/protocol.c, 625:
dumph_send:   Transaction ID
dumpx_send:    E4 24 00 00
dumpv_send:      Integer:       9444 (0x24E4)
trace: agentx_realloc_build_header(): mibgroup/agentx/protocol.c, 634:
dumph_send:   Request ID
dumpx_send:    E5 24 00 00
dumpv_send:      Integer:       9445 (0x24E5)
trace: agentx_realloc_build_header(): mibgroup/agentx/protocol.c, 643:
dumph_send:   Dummy Length :-(
dumpx_send:    00 00 00 00
dumpv_send:      Integer:       0 (0x00)
trace: _agentx_realloc_build(): mibgroup/agentx/protocol.c, 710:
dumph_send: AgentX Payload
dumpx_send:  00 00 00 00
dumpv_send:    Integer: 0 (0x00)
trace: _agentx_realloc_build(): mibgroup/agentx/protocol.c, 897:
dumph_send:   Response
dumpx_send:    00 00 00 00
dumpv_send:      sysUpTime:     0
dumpx_send:  00 00
dumpv_send:    Short:   0 (0x00)
dumpx_send:  00 00
dumpv_send:    Short:   0 (0x00)
trace: _agentx_realloc_build(): mibgroup/agentx/protocol.c, 913:
dumph_send:   Response errors
dumpx_send:    00 00 00 00
dumpv_send:      errstat:       0
trace: _agentx_realloc_build(): mibgroup/agentx/protocol.c, 916:
dumpv_send:       errindex:     0
trace: _agentx_realloc_build(): mibgroup/agentx/protocol.c, 928:
dumph_send:   Get* Variable List
trace: agentx_realloc_build_varbind(): mibgroup/agentx/protocol.c, 394:
dumph_send:     VarBind
trace: agentx_realloc_build_varbind(): mibgroup/agentx/protocol.c, 395:
dumph_send:       type
dumpx_send:        02 00
dumpv_send:          Short:     2 (0x02)
trace: agentx_realloc_build_varbind(): mibgroup/agentx/protocol.c, 441:
dumph_send:       name
trace: agentx_realloc_build_oid(): mibgroup/agentx/protocol.c, 224:
dumpv_send:         OID: SNMPv2-SMI::enterprises.5713.2.10.10.40.1.1.2
trace: agentx_realloc_build_oid(): mibgroup/agentx/protocol.c, 259:
dumph_send:         OID Header
dumpx_send:          09 04 00 00
dumpv_send:            # subids:        9 (0x09)
trace: agentx_realloc_build_oid(): mibgroup/agentx/protocol.c, 263:
dumpv_send:             prefix: 4 (0x04)
trace: agentx_realloc_build_oid(): mibgroup/agentx/protocol.c, 265:
dumpv_send:             inclusive:      0 (0x00)
trace: agentx_realloc_build_oid(): mibgroup/agentx/protocol.c, 269:
dumph_send:         OID Segments
dumpx_send:          01 00 00 00
dumpv_send:            Integer: 1 (0x01)
dumpx_send:          51 16 00 00
dumpv_send:            Integer: 5713 (0x1651)
dumpx_send:          02 00 00 00
dumpv_send:            Integer: 2 (0x02)
dumpx_send:          0A 00 00 00
dumpv_send:            Integer: 10 (0x0A)
dumpx_send:          0A 00 00 00
dumpv_send:            Integer: 10 (0x0A)
dumpx_send:          28 00 00 00
dumpv_send:            Integer: 40 (0x28)
dumpx_send:          01 00 00 00
dumpv_send:            Integer: 1 (0x01)
dumpx_send:          01 00 00 00
dumpv_send:            Integer: 1 (0x01)
dumpx_send:          02 00 00 00
dumpv_send:            Integer: 2 (0x02)
trace: agentx_realloc_build_varbind(): mibgroup/agentx/protocol.c, 450:
dumph_send:       value
dumpx_send:        02 00 00 00
dumpv_send:          Integer:   2 (0x02)
dumpx_send:38 00 00 00
dumpv_send:  Integer:   56 (0x38)
trace: _agentx_realloc_build(): mibgroup/agentx/protocol.c, 1000:
agentx_build: packet built okay
trace: netsnmp_unix_send(): snmpUnixDomain.c, 161:
netsnmp_unix: send 76 bytes to 0x679000 on fd 10
code (text/x-objcsrc, 1.2 KB)
#if 0
int
storageStatusTable_cache_load(netsnmp_container *container)
{
    pthread_t           thread;
    int err = 0, ret;
    static int once=1;
    if (once) {
            once --;
            err = pthread_create (&thread, NULL, &storageStatusTable_cache_value_init, NULL);
            if (err != 0) {
                    DEBUGMSGT((verbose:storageStatusTable:storageStatusTable_cache_load,failed to init storage));
                    return MFD_ERROR;
            }
            pthread_join (thread, NULL);
            ret = storageStatusTable_cache_thread_load (container);
    } else {
        ret = storageStatusTable_cache_thread_load (container);
        if (init_mutex) return ret;
        err = pthread_create (&thread, NULL, &storageStatusTable_cache_value_init, NULL);
        if (err != 0) {
                DEBUGMSGT((verbose:storageStatusTable:storageStatusTable_cache_load,failed to init storage));
                return MFD_ERROR;
        }
    }
    return ret;
}
#endif
int
storageStatusTable_cache_load(netsnmp_container *container)
{
    int ret;
    storageStatusTable_cache_value_init(NULL);
    ret = storageStatusTable_cache_thread_load (container);
    return ret;
}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.