Skip to content

Instantly share code, notes, and snippets.

@tembleking
Created October 5, 2018 22:43
Show Gist options
  • Save tembleking/71c6d33a3058f5ade89fc31710d7d46c to your computer and use it in GitHub Desktop.
Save tembleking/71c6d33a3058f5ade89fc31710d7d46c to your computer and use it in GitHub Desktop.
Golang Expvar Response Example
$ curl localhost:8080/debug/vars
{
"cmdline": [
"/go-expvar"
],
"memstats": {
"Alloc": 878208,
"TotalAlloc": 878208,
"Sys": 3084288,
"Lookups": 277,
"Mallocs": 6310,
"Frees": 155,
"HeapAlloc": 878208,
"HeapSys": 1703936,
"HeapIdle": 90112,
"HeapInuse": 1613824,
"HeapReleased": 0,
"HeapObjects": 6155,
"StackInuse": 393216,
"StackSys": 393216,
"MSpanInuse": 26600,
"MSpanSys": 32768,
"MCacheInuse": 13888,
"MCacheSys": 16384,
"BuckHashSys": 2671,
"GCSys": 137216,
"OtherSys": 798097,
"NextGC": 4473924,
"LastGC": 0,
"PauseTotalNs": 0,
"PauseNs": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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0,
0
],
"NumGC": 0,
"NumForcedGC": 0,
"GCCPUFraction": 0,
"EnableGC": true,
"DebugGC": false,
"BySize": [
{
"Size": 0,
"Mallocs": 0,
"Frees": 0
},
{
"Size": 8,
"Mallocs": 186,
"Frees": 0
},
{
"Size": 16,
"Mallocs": 608,
"Frees": 0
},
{
"Size": 32,
"Mallocs": 4048,
"Frees": 0
},
{
"Size": 48,
"Mallocs": 155,
"Frees": 0
},
{
"Size": 64,
"Mallocs": 54,
"Frees": 0
},
{
"Size": 80,
"Mallocs": 287,
"Frees": 0
},
{
"Size": 96,
"Mallocs": 17,
"Frees": 0
},
{
"Size": 112,
"Mallocs": 146,
"Frees": 0
},
{
"Size": 128,
"Mallocs": 15,
"Frees": 0
},
{
"Size": 144,
"Mallocs": 6,
"Frees": 0
},
{
"Size": 160,
"Mallocs": 17,
"Frees": 0
},
{
"Size": 176,
"Mallocs": 9,
"Frees": 0
},
{
"Size": 192,
"Mallocs": 2,
"Frees": 0
},
{
"Size": 208,
"Mallocs": 160,
"Frees": 0
},
{
"Size": 224,
"Mallocs": 5,
"Frees": 0
},
{
"Size": 240,
"Mallocs": 0,
"Frees": 0
},
{
"Size": 256,
"Mallocs": 11,
"Frees": 0
},
{
"Size": 288,
"Mallocs": 11,
"Frees": 0
},
{
"Size": 320,
"Mallocs": 2,
"Frees": 0
},
{
"Size": 352,
"Mallocs": 23,
"Frees": 0
},
{
"Size": 384,
"Mallocs": 28,
"Frees": 0
},
{
"Size": 416,
"Mallocs": 9,
"Frees": 0
},
{
"Size": 448,
"Mallocs": 0,
"Frees": 0
},
{
"Size": 480,
"Mallocs": 0,
"Frees": 0
},
{
"Size": 512,
"Mallocs": 132,
"Frees": 0
},
{
"Size": 576,
"Mallocs": 6,
"Frees": 0
},
{
"Size": 640,
"Mallocs": 3,
"Frees": 0
},
{
"Size": 704,
"Mallocs": 2,
"Frees": 0
},
{
"Size": 768,
"Mallocs": 0,
"Frees": 0
},
{
"Size": 896,
"Mallocs": 3,
"Frees": 0
},
{
"Size": 1024,
"Mallocs": 13,
"Frees": 0
},
{
"Size": 1152,
"Mallocs": 6,
"Frees": 0
},
{
"Size": 1280,
"Mallocs": 1,
"Frees": 0
},
{
"Size": 1408,
"Mallocs": 1,
"Frees": 0
},
{
"Size": 1536,
"Mallocs": 132,
"Frees": 0
},
{
"Size": 1792,
"Mallocs": 5,
"Frees": 0
},
{
"Size": 2048,
"Mallocs": 17,
"Frees": 0
},
{
"Size": 2304,
"Mallocs": 5,
"Frees": 0
},
{
"Size": 2688,
"Mallocs": 2,
"Frees": 0
},
{
"Size": 3072,
"Mallocs": 0,
"Frees": 0
},
{
"Size": 3200,
"Mallocs": 0,
"Frees": 0
},
{
"Size": 3456,
"Mallocs": 0,
"Frees": 0
},
{
"Size": 4096,
"Mallocs": 11,
"Frees": 0
},
{
"Size": 4864,
"Mallocs": 1,
"Frees": 0
},
{
"Size": 5376,
"Mallocs": 1,
"Frees": 0
},
{
"Size": 6144,
"Mallocs": 4,
"Frees": 0
},
{
"Size": 6528,
"Mallocs": 0,
"Frees": 0
},
{
"Size": 6784,
"Mallocs": 0,
"Frees": 0
},
{
"Size": 6912,
"Mallocs": 0,
"Frees": 0
},
{
"Size": 8192,
"Mallocs": 1,
"Frees": 0
},
{
"Size": 9472,
"Mallocs": 8,
"Frees": 0
},
{
"Size": 9728,
"Mallocs": 0,
"Frees": 0
},
{
"Size": 10240,
"Mallocs": 0,
"Frees": 0
},
{
"Size": 10880,
"Mallocs": 0,
"Frees": 0
},
{
"Size": 12288,
"Mallocs": 0,
"Frees": 0
},
{
"Size": 13568,
"Mallocs": 0,
"Frees": 0
},
{
"Size": 14336,
"Mallocs": 0,
"Frees": 0
},
{
"Size": 16384,
"Mallocs": 0,
"Frees": 0
},
{
"Size": 18432,
"Mallocs": 0,
"Frees": 0
},
{
"Size": 19072,
"Mallocs": 0,
"Frees": 0
}
]
},
"system.allLoad": {
"Load1": 1.05,
"Load5": 1.35,
"Load15": 1.15
},
"system.lastLoad": 0.88,
"system.numberOfLoginsPerUser": {
"bar": 129,
"foo": 258
},
"system.numberOfSeconds": 129,
"system.programName": "/go-expvar"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment