| 113 | } |
| 114 | |
| 115 | func (i *info) dumpServer(buf *bytes.Buffer) { |
| 116 | buf.WriteString("# Server\r\n") |
| 117 | |
| 118 | threadNum, _ := runtime.ThreadCreateProfile(nil) |
| 119 | i.dumpPairs(buf, |
| 120 | infoPair{"os", i.Server.OS}, |
| 121 | infoPair{"arch", runtime.GOARCH}, |
| 122 | infoPair{"process_id", i.Server.ProceessID}, |
| 123 | infoPair{"addr", conf.Addr}, |
| 124 | infoPair{"http_addr", ldsCfg.HttpAddr}, |
| 125 | infoPair{"readonly", ldsCfg.Readonly}, |
| 126 | infoPair{"goroutine_num", runtime.NumGoroutine()}, |
| 127 | infoPair{"gomaxprocs", runtime.GOMAXPROCS(0)}, |
| 128 | infoPair{"thread_num", threadNum}, |
| 129 | infoPair{"cgo_call_num", runtime.NumCgoCall()}, |
| 130 | infoPair{"resp_client_num", atomic.LoadInt64(&respClientNum)}, |
| 131 | infoPair{"ledisdb_version", ledis.Version}, |
| 132 | ) |
| 133 | } |
| 134 | |
| 135 | func (i *info) dumpMem(buf *bytes.Buffer) { |
| 136 | buf.WriteString("# Mem\r\n") |