4 HHVM collects stats by time slots. Each time slot is configured as
5 StatsSlotDuration seconds and server internally keeps StatsMaxSlot number
6 of slots. Inside each slot, we keep a set of stats. These stats include
7 one built-in ("hit") and many key-value pairs defined by different parts
22 To query stats aggregated into one list of key value pairs encoded in JSON
23 format, hit admin port with a URL like this,
25 http://[server]:8088/stats.kvp?keys=...&to=[t2]...
27 keys: (optional) comma delimited keys to query, each of which can be decorated
28 [key] just the key's value, e.g. "sql.conn"
29 [key]/hit average per page hit, e.g. "sql.conn/hit"
30 [key]/sec per second rate, e.g. "sql.conn/sec"
31 #[regex]# keys matching the regular expression
32 (omitted) all available keys
34 prefix: (optional) adds a prefix and '.' delimiter to all key names
37 <h2>Available Keys</h2>
43 sql.conn: number of connections newly created
44 sql.reconn_new: number of connections newly created when trying to reconnect
45 sql.reconn_ok: number of connections re-picked up when trying to reconnect
46 sql.reconn_old: number of connections dropped when trying to reconnect
50 sql.query: number of queries executed
51 sql.query.[table].[verb]: per table-verb stats
52 sql.query.[verb]: per verb stats, where [verb] can be one of these:
66 mcc.madd: number of multi_add() calls
67 mcc.madd.count: total count of multi added keys
68 mcc.mreplace: number of multi_replace() calls
69 mcc.mreplace.count: total count of multi replaced keys
70 mcc.set: number of set() calls
71 mcc.add: number of add() calls
72 mcc.decr: number of decr() calls
73 mcc.incr: number of incr() calls
74 mcc.delete: number of delete() calls
75 mcc.delete_details: number of delete_details() calls
76 mcc.get: number of get() calls
77 mcc.mget: number of multi_get() calls
78 mcc.mget.count: total count of multi got keys
79 mcc.replace: number of replace() calls
80 mcc.set: number of set() calls
81 mcc.stats: number of stats() calls
85 apc.miss: number of item misses
86 apc.hit: number of item hits
87 apc.write: number of writes
91 These two stats are only available when Google heap profler is turned on for
94 mem.malloc.peak: peak malloc()-ed memory
95 mem.malloc.leaked: leaked malloc()-ed memory
99 page.wall.[section]: wall time a page section takes
100 page.cpu.[section]: CPU time a page section takes
101 mem.[section]: request-local memory that a page section takes
102 network.uncompressed: total bytes to be sent before compression
103 network.compressed: total bytes sent after compression
105 Section can be one of these:
118 - evhttp.hit used cached connection
119 - evhttp.hit.[address] used cached connection by URL
120 - evhttp.miss no cached connection available
121 - evhttp.miss.[address] no cached connection available by URL
122 - evhttp.close cached connection got closed
123 - evhttp.close.[address] cached connection got closed by URL
124 - evhttp.skip not set to use cached connection
125 - evhttp.skip.[address] not set to use cached connection by URL
127 7. Application Stats:
129 PHP page can collect application-defined stats by calling
131 hphp_stats($key, $count);
133 where $key is arbitrary and $count will be tallied across different calls of
139 load: number of active worker threads
140 idle: number of idle worker threads
145 GET "http://localhost:8088/stats.kvp?prefix=hphp" \
146 "&keys=apc.hit/sec,hit,load,:sql.query..*.select:," \
147 "network.compressed/hit,hit/sec"
149 This URL queries the following data:
152 hit/sec: request per second
153 apc.hit/sec: APC hit per second
154 load: number of active threads currently
155 network.compressed/hit: sent bytes per request
156 :sql.query..*.select: all SELECTs on different tables