RE: query to dsx1Intervaltable always kills the subagent
Malathi Panyam <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
I am sorry if I am not clear about my question..
1) Dsx1IntervalTable has two indexes dsx1IntervalIndex and dsx1IntevalNumber
2) I am assigning them to the row request context as we do with other tables
for (int dsx1Index = 1, dsx1IntIndex = 1; dsx1Index <= lMaxIndex, dsx1IntIndex <= 96; dsx1Index++, dsx1IntIndex++){
rowreq_ctx = dsx1IntervalTable_allocate_rowreq_ctx(NULL);
if (NULL == rowreq_ctx) {
log(pSNMPLogger, "memory allocation failed\n");
return MFD_RESOURCE_UNAVAILABLE;
}
if(MFD_SUCCESS != dsx1IntervalTable_indexes_set(rowreq_ctx
, dsx1Index
, dsx1IntIndex
)) {
log(pSNMPLogger,"error setting index while loading "
"dsx1IntervalTable data.");
dsx1IntervalTable_release_rowreq_ctx(rowreq_ctx);
continue;
}
}
Where lMaxIndex will provide the number of DS1's.
3) I need to assign the 96 intervals(for the past 24 hours, 15 min each interval).
4) I have a function call to make from dsx1IntervalTable_row_prep() in dsx1IntervalTable_data_access.c
Now I have started seeing a core file which has the trace pointing to the line where we retrieve the index from row request
#0 dsx1IntervalTable_Extract_Row (rowreq_ctx=0x18b3518) at dsx1IntervalTable_custom.cpp:115
115 long ds1Index = rowreq_ctx->tbl_idx.dsx1IntervalIndex - 1;
(gdb) where
#0 dsx1IntervalTable_Extract_Row (rowreq_ctx=0x18b3518) at dsx1IntervalTable_custom.cpp:115
I have been using the similar code for all my tables and I never faced this, except that I am using a two index table for the first time.
What am I doing wrong here?
Thanks for your help
Regards,
Malathi
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Dave Shield
Sent: Friday, March 25, 2011 6:24 AM
To: Malathi Panyam
Cc: [email protected]
Subject: Re: query to dsx1Intervaltable always kills the subagent
On 25 March 2011 03:57, Malathi Panyam <[email protected]> wrote:
> We are trying to support DS1 MIB(RFC4805) on our device. We use NetSNMP
> 5.4.2.1 and use the mib2c generated code for tables.
>
> Our subagent for dsx1IntervaTable always getting killed when queried. I
> don't find any core file though.
You haven't really given much information about exactly what code
you're working with, or what might be causing the crash. So there's
a limit to how much assistance we can be based on this report.
I'd draw your attention to the project Wiki page
http://net-snmp.sourceforge.net/wiki/index.php/Debugger
which might help you pinpoint the cause of the problem.
Dave
------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself;
WebMatrix provides all the features you need to develop and publish
your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________
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