[AGENT++] The agent would be coredump sometime when the manager walk a large Table.(6Col*600row)
qinyd at tom.com
qinyd at tom.com
Wed Aug 4 05:23:20 CEST 2004
Hi Frank and all list members:
I have a problem with Table.
The agent would be coredump sometime when the manager walk a large Table.(6Col*600row)
void equipmentTableEntry::update(Request* req)
{
if (currentRequest == req->get_request_id()) return;
currentRequest = req->get_request_id();
start_synch();
int PerformanceStatus=1,CollectInterval=15,EquipmentStatus=1;
if(collectInterval::instance)
collectInterval::instance->get_value(CollectInterval);
time_t now;
time(&now);
if( now get_value(PerformanceStatus);
if(equipmentStatus::instance)
equipmentStatus::instance->get_value(EquipmentStatus);
clear();
if(PerformanceStatus==1 && EquipmentStatus==1)
{
char buf[1024];
struct tm* dt;
MibTableRow* r;
now -= now%(CollectInterval*60);
for(int i=0;itm_year+1900,dt->tm_mon+1,dt->tm_mday,dt->tm_hour,dt->tm_min);
r = add_row(buf);
r->get_nth(0)->replace_value(new SnmpInt32(rand()));
r->get_nth(1)->replace_value(new SnmpInt32(rand()));
r->get_nth(2)->replace_value(new SnmpInt32(rand()));
r->get_nth(3)->replace_value(new SnmpInt32(rand()));
r->get_nth(4)->replace_value(new SnmpInt32(rand()));
r->get_nth(5)->replace_value(new OctetStr(buf));
now -=CollectInterval*60;
}
}
else
lasttime = 0;
end_synch();
}
Any suggestions would be greatly appreciated.
Daniel
More information about the AGENTPP
mailing list