EsgynDB 关于收集core信息的小技巧

EsgynDB数据库的使用中有时候会碰到一些mxosrvr的core的情况,此时需要分析core产生的原因。
常规的做法是执行gdb mxosrvr coreName,然后执行t,看一下堆栈的情况。

一些常规的手段可以收集一下client&server的基本信息, 展示如下:
(gdb) bt
#0 0x00007fac59d9368c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1 0x00007fac4ec59558 in SB_Thread::CV::wait (this=0x30b9018) at /home/aven/workspace/esgyndb/core/sqf/export/include/seabed/int/thread.inl:558
#2 0x00007fac4ec595d9 in SB_Thread::CV::wait (this=0x30b9018, pv_lock=true) at /home/aven/workspace/esgyndb/core/sqf/export/include/seabed/int/thread.inl:593
#3 0x00007fac5a4000fe in SB_Ms_Event_Mgr::wait (this=0x30b8f20, pv_us=-1) at mseventmgr.inl:346
#4 0x00007fac5a42078e in XWAIT_com (pv_mask=256, pv_time=-1, pv_residual=true) at pctl.cpp:982
#5 0x00007fac5a42053f in XWAIT (pv_mask=256, pv_time=-1) at pctl.cpp:878
#6 0x00007fac5a68e47a in fs_int_fs_file_awaitiox (pp_filenum=0x7fffa921cc7c, ppp_buf=0x7fffa921cb68, pp_xfercount=0x7fffa921cb54, pp_tag=0x7fffa921cb58,
pv_timeout=-1, pp_segid=0x7fffa921cb66, pv_int=false, pv_ts=false) at fsi.cpp:1428
#7 0x00007fac5a687a8c in BAWAITIOX (pp_filenum=0x7fffa921cc7c, ppp_buf=0x0, pp_xfercount=0x7fffa921cbe8, pp_tag=0x7fffa921cc68, pv_timeout=-1, pp_segid=0x0)
at fs.cpp:564
#8 0x00007fac5a68ab8c in XAWAITIOX (pp_filenum=0x7fffa921cc7c, ppp_buf=0x0, pp_xfercount=0x7fffa921cc72, pp_tag=0x7fffa921cc68, pv_timeout=-1, pp_segid=0x0)
at fs.cpp:1610
#9 0x00000000004e0a9e in CNSKListenerSrvr::runProgram (this=0x2fa5020, TcpProcessName=0x7fffa921e5f0 “KaTeX parse error: Expected 'EOF', got '#' at position 86: …rvr_ps.cpp:672 #̲10 0x0000000000…ZTC0”, portNumber=23402, TransportTrace=0) at SrvrMain.cpp:203
#11 0x00000000005d5910 in main (argc=61, argv=0x7fffa921fec8, envp=0x2e750a0) at SrvrMain.cpp:996
(gdb) p srvrGlobal->ApplicationName
$1 = “TrafCI”, ‘\000’ <repeats 506 times>
(gdb) p srvrGlobal->ClientComputerName
$2 = “esgvm-2.novalocal”, ‘\000’ <repeats 47 times>
(gdb) p srvrGlobal->clipVarchar
$3 = 0
(gdb) p srvrGlobal->IpAddress
$4 = “192.168.0.11”, ‘\000’ <repeats 115 times>
(gdb) p srvrGlobal->HostName
$5 = “esgvm-2.novalocal”, ‘\000’ <repeats 110 times>
(gdb) p srvrGlobal->ClientIpAddress
$6 = “172.31.242.111”, ‘\000’ <repeats 110 times>
(gdb)

更多的打印属性可参见Global.h这个文件,或者输入p srvrGlobal->连续按两次tab键,所有可以属性如下:
(gdb) p srvrGlobal->
Display all 176 possibilities? (y or n)
ASProcessName RoleName estCardinality m_stInternalQueriesInRepo sqlCmds
ASSvc_MonitorProxy SystemCatalog estCost m_statisticsPubType sqlCmdsLen
ASSvc_ifch TraceCollector eventFlag mapOptions sqlPlan
ASSvc_proxy WMSSrvrType execSqlCmds mappedProfileName sqlText
ASTimerHandle WmsNid executeApiType mappedSLAName sqlVersion
ApplicationName affinityNum ext_21036 masterPrty srvrContext
CSObject allocatedResources failOverEnabled maxRowsFetched srvrObjRef
CheckTimerHandle appVersion fetchAhead mds srvrPriority
ClientComputerName asSrvrObjRef fnumAS modeSpecial_1 srvrState
ClientIpAddress bAutoCommitOn goingWMSStatus mute srvrType
ClientPort bAutoCommitSet isShapeLoaded mutex srvrVersion
CreatorAccessId bConfigurationChanged isTraceState neoActiveSegments stmtHandleMap
DSG bMultiTenancyEnabled isoMapping neoODBC stopTypeFlag
DSId bRowsetSupported javaConnIdleTimeout neoSegment sutVer
DSName bSkipASTimer lastCQDAdaptiveSegment neoSegmentMax tenantID
DefaultCatalog bSpjEnableProxy lastCleanupTime nskASProcessInfo tenantName
DefaultSchema bWMS_AdaptiveSegment local_xid nskProcessInfo tenantRedefTime
EnvironmentType bspjTxnJoined m_FetchBufferSize nskQSProcessInfo tfileNum
HostName cleanupByConnection m_NodeId numConnection timeLogger
IpAddress cleanupByTime m_ProcName odbcConnIdleTimeout timeLoggerFlag
MXCS_SCHEMA_Version clientACP m_aggr_exec_interval pASHandle tip_gateway
NskSystemCatalogsTableName clientErrorLCID m_aggr_query_types pQSConnRules traceLogger
ProcessAccessId clientKeepaliveIdletime m_aggr_repos_interval portNumber traf_cluster_id
QSDBUserName clientKeepaliveIntervaltime m_aggr_stats_once process_id traf_cluster_name
QSFileSystem clientKeepaliveRetrycount m_aggr_wms_interval prtyChanged traf_instance_id
QSProcessLen clientKeepaliveStatus m_bNewConnection pxid_url traf_instance_name
QSProcessName clientLCID m_bNewService qsOpen tsdURL
QSRoleName clipVarchar m_bPublishStatsToTSDB receiveThrId useCtrlInferNCHAR
QSRuleName cpu m_bStatisticsEnabled redefTime userID
QSServiceId dcsCurrState m_bstart_aggr_timer resGovernOn userSID
QSServiceName debugFlag m_iAggrInterval resourceStatistics wmsActive
QSUserName defaultSchemaAccessOnly m_iQueryPubThreshold schemaVersion xid_length
QStimestamp dialogueId m_query_name segmentname
QStimestamp_current drvrVersion m_rule_endstats_off sessionId
QStimestamp_loaded enableLongVarchar m_rule_wms_off shmLimit
RSCollector envVariableOn m_service_name spjTxnId

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

数据源的港湾

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值