elasticsearch日志的示例格式:[2017-08-30T06:27:19,158][WARN ][o.e.m.j.JvmGcMonitorService] [Glsuj_2] [gc][296816] overhead, spent [1.2s] collecting in the last [1.3s]
你能解释一下这是什么意思吗?当我们观察日志? 请解释一下日志中的每个单词?
o.e.m.j.JvmGcMonitorService
是什么意思?
Glsuj_2
是什么意思?
gc
是什么意思?
296816
是什么意思?
答案 0 :(得分:2)
日志消息由JvmGcMonitorService class组成。 我认为这是查找日志记录语义的最佳位置。要求在github is still open上提供文档的故障单。
这也适用于涉及更多的警告,例如SLOW_GC_LOG_MESSAGE
。
o.e.m.j.JvmGcMonitorService
- 日志记录类的缩写限定名称
Glsuj_2
您的节点名称
gc
- “垃圾收集” - “gc”在日志字符串中被硬编码
296816
- 序列号,在监控gc时递增
但是日志的有趣部分在它之后开始:spent [1.2s] collecting in the last [1.3s]
。同样:括号内的部分由JvmGcMonitorService填充。
答案 1 :(得分:0)
在Tommy的回应之后,日志文件将包含以下详细信息。
[gc][{}][{}][{}] duration [{}], collections [{}]/[{}], total [{}]/[{}], memory [{}]->[{}]/[{}], all_pools {}
使用以下值(按其位置顺序)替换括号。因此,第一个{}从左至右读取,由“名称”的值替换,最后一个由pools.apply(lastJvmStats,currentJvmStats)返回的值替换。
name,
seq,
totalGcCollectionCount,
currentGcCollectionTime,
currentGcCollectionCount,
TimeValue.timeValueMillis(elapsed),
currentGcCollectionTime,
totalGcCollectionTime,
lastJvmStats.getMem().getHeapUsed(),
currentJvmStats.getMem().getHeapUsed(),
maxHeapUsed,
pools.apply(lastJvmStats, currentJvmStats)