ATS metric query
proxy.node.cache_hit_mem_ratio
proxy.node.cache_hit_mem_ratio_avg_10s #查询当前内存命中率 proxy.node.cache_hit_ratio
proxy.node.cache_hit_ratio_avg_10s #查询当前缓存(cache.db)命中率 proxy.node.bandwidth_hit_ratio
proxy.node.bandwidth_hit_ratio_avg_10s #查询当前带宽命中率 proxy.node.current_cache_connections #前端用户到cache.db链接数 proxy.node.cache.percent_free #Cache Percent Free(cache.db空闲空间百分比) proxy.node.current_client_connections #前端用户到ATS的连接数 proxy.node.current_server_connections #到后端源站的连接数 proxy.node.user_agent_xacts_per_second #平均每秒处理的客户端并发数 proxy.node.client_throughput_out #当前ATS输出到前端的带宽流量(单位Mbps) proxy.node.current_cache_connections 等价于 proxy.node.http.cache_current_connections_count proxy.node.current_client_connections 等价于 proxy.node.http.user_agent_current_connections_count proxy.node.current_server_connections 等价于 proxy.node.http.origin_server_current_connections_count
关于带宽命中率参考: Bandwidth and Transfer
proxy.node.bandwidth_hit_ratio
The difference of proxy.node.user_agent_total_bytes and proxy.node.origin_server_total_bytes, divided by proxy.node.user_agent_total_bytes.
Represents the ratio of bytes served to user agents which were satisfied by cache hits, since statistics collection began.
proxy.node.bandwidth_hit_ratio_avg_10s
The difference of proxy.node.user_agent_total_bytes_avg_10s and proxy.node.origin_server_total_bytes_avg_10s, divided by proxy.node.user_agent_total_bytes_avg_10s.
Represents the ratio of bytes served to user agents which were satisfied by cache hits, over the previous 10 seconds.
带宽命中率可由下面计算得来:
[root@~]# /opt/soft/ats/bin/traffic_ctl metric match total_bytes_avg_10s
proxy.node.user_agent_total_bytes_avg_10s 2161301760.000000
proxy.node.origin_server_total_bytes_avg_10s 176160640.000000
proxy.cluster.user_agent_total_bytes_avg_10s 1325454080.000000
proxy.cluster.origin_server_total_bytes_avg_10s 1294467072.000000
[root@~]#
[root@~]# /opt/soft/ats/bin/traffic_ctl metric get proxy.node.bandwidth_hit_ratio_avg_10s
proxy.node.bandwidth_hit_ratio_avg_10s 0.918493
[root@~]#
[root@~]# awk 'BEGIN{print (2161301760-176160640)/2161301760}'
0.918493
[root@~]#
关于ATS向前端输出的带宽值
proxy.node.http.throughput
proxy.node.http.throughput
Collection: global
Type: gauge
Units: bytes
Datatype: integer
The throughput of responses to user agents over the previous 10 seconds, in bytes.
proxy.node.client_throughput_out
proxy.node.client_throughput_out
Collection: global
Type: gauge
Units: mbits
Datatype: float
The value of proxy.node.http.throughput represented in megabits.
Code:
integer 'proxy.node.http.throughput' [[
local self = ... return rate_of_10s(self,
function() return proxy.node.http.user_agent_total_response_bytes end
)
]]