假设您的 GC 日志文件位于:(./my-app-gc.log,)
然后使用这个在线插件来调用 API:
curl -X POST --data-binary @./my-app-gc.log http://api.gceasy.io/analyzeGC?apiKey= --header "Content-Type:text"
或者使用第三个软件[PostMan]
本软件支持:
..................................................... ....
| • - 电脑下载:here |
| • - 浏览器下载:here |
..................................................... ....
PostMan 插件输出示例:
{
{
"isProblem": true,
"problem": [
"122 times threads were stopped for more than 5 seconds"
],
"jvmHeapSize": {
"youngGen": {
"allocatedSize": "7.5 gb",
"peakSize": "6 gb"
},
"oldGen": {
"allocatedSize": "22.5 gb",
"peakSize": "22.5 gb"
},
"metaSpace": {
"allocatedSize": "1.04 gb",
"peakSize": "48.52 mb"
},
"total": {
"allocatedSize": "30 gb",
"peakSize": "28.5 gb"
}
},
"gcStatistics": {
"totalCreatedBytes": "249.49 gb",
这个输出为你提供了一个有用的 Json 格式的数据,以后可以使用。