批量关闭oracle进程:
kill -9 `ps -ef|grep oracle|awk ‘{print $2}’`
内存检测:
valgrind --leak-check=full ./WriteOff -e 4595 -s 4919
swap在一定的程度上会影响linux服务器的性能。所以,每次出销账之前,清理swap数据。清理方式:关闭swap,开启swap。关闭命令:swapoff -a开启命令:swapon -a一关一开,就把swap数据清理了。关闭和开启swap不会影响其他用户和程序。
C++调试
gdb -c core.5822 appsms3singlestopdatecalc
进入之后用bt打印堆栈
WriteOffAtom.cpp 914行越界,gdb看账单变量:
(gdb) p (*pBill).m_pBill
$10 = (Bill *) 0xa7be830
(gdb) p *((*pBill).m_pBill)
$11 = {
m_BillData = {
m_billId = 165610777,
m_customerId = 3702,
m_subscriberId = 2688910,
m_accountId = 3702,
m_rateclassSourceId = 1,
m_rateclassId = 1058,
m_invoicecycId = 266,
m_operwayId = 1 '\001',
m_origionFeeId = 10000,
m_discountFeeId = 0,
m_factFeeId = 10000,
m_billStatusId = 0 '\000',
m_writeoffStatusId = 0 '\000',
m_ifauditId = 1 '\001',
m_ifacctokId = 1 '\001',
m_acctTypeId = 1 '\001',
m_oweObjectStatusId = 0 '\000',
m_commicollId = 0,
m_billingStartDt = "20201123000000",
m_billingEndDt = "20201222235959",
m_billingTaskId = 0,
m_oweObjectId = 0,
m_instanceId = 14073682,
m_operitemId = 1326,
m_productId = 2011,
m_priceiInstanceId = 13497303,
m_priceplanId = 7652,
m_rateId = 1544,
m_packageInstanceId = 0,
m_refundstate = 0 '\000'
},
m_writeoffId = 0x0,
m_noteId = 0,
m_paymentId = 0,
m_payMethodId = 0,
m_pCustomer = 0x627b9c0,
m_pSubscriber = 0x7f70e00,
m_pRateClass = 0x2fbe7e0,
m_pAccount = 0x341bbd0,
m_this = 27280,
static m_pVm = 0x7fff97add5d0,
static m_nBillSize = 248,
static m_nCustomerOffset = 216,
static m_nSubscriberOffset = 224,
static m_nRateClassOffset = 232,
static m_nAccountOffset = 240,
m_discountUseLogList = empty std::list
}