ATS metric query

ATS metric query

参考ATS metric query

 1 proxy.node.cache_hit_mem_ratio
 2 proxy.node.cache_hit_mem_ratio_avg_10s     #查询当前内存命中率
 3 
 4 proxy.node.cache_hit_ratio
 5 proxy.node.cache_hit_ratio_avg_10s         #查询当前缓存(cache.db)命中率
 6 
 7 proxy.node.bandwidth_hit_ratio
 8 proxy.node.bandwidth_hit_ratio_avg_10s     #查询当前带宽命中率
 9 
10 
11 
12 proxy.node.current_cache_connections       #前端用户到cache.db链接数
13 
14 proxy.node.cache.percent_free              #Cache Percent Free(cache.db空闲空间百分比)
15 
16 proxy.node.current_client_connections      #前端用户到ATS的连接数
17 
18 proxy.node.current_server_connections      #到后端源站的连接数
19 
20 proxy.node.user_agent_xacts_per_second     #平均每秒处理的客户端并发数
21 
22 proxy.node.client_throughput_out           #当前ATS输出到前端的带宽流量(单位Mbps)
23 
24 proxy.node.current_cache_connections 等价于 proxy.node.http.cache_current_connections_count
25
26 proxy.node.current_client_connections 等价于 proxy.node.http.user_agent_current_connections_count
27 
28 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.

带宽命中率可由下面计算得来:

 1 [root@~]# /opt/soft/ats/bin/traffic_ctl metric match total_bytes_avg_10s
 2 proxy.node.user_agent_total_bytes_avg_10s 2161301760.000000
 3 proxy.node.origin_server_total_bytes_avg_10s 176160640.000000
 4 proxy.cluster.user_agent_total_bytes_avg_10s 1325454080.000000
 5 proxy.cluster.origin_server_total_bytes_avg_10s 1294467072.000000
 6 [root@~]# 
 7 [root@~]# /opt/soft/ats/bin/traffic_ctl metric get proxy.node.bandwidth_hit_ratio_avg_10s
 8 proxy.node.bandwidth_hit_ratio_avg_10s 0.918493
 9 [root@~]# 
10 [root@~]# awk 'BEGIN{print (2161301760-176160640)/2161301760}'
11 0.918493
12 [root@~]#

 


关于ATS向前端输出的带宽值

  • proxy.node.http.throughput

10秒内的响应客户端的输出带宽值,单位是 bytes

1 proxy.node.http.throughput
2 Collection:    global
3 Type:    gauge
4 Units:    bytes
5 Datatype:    integer
6 The throughput of responses to user agents over the previous 10 seconds, in bytes.

 

  • proxy.node.client_throughput_out

10秒内的响应客户端的输出带宽值,单位是 megabits

1 proxy.node.client_throughput_out
2 Collection:    global
3 Type:    gauge
4 Units:    mbits
5 Datatype:    float
6 The value of proxy.node.http.throughput represented in megabits.

 

Code:

1 integer 'proxy.node.http.throughput' [[
2   local self = ...
3 
4   return rate_of_10s(self,
5     function() return proxy.node.http.user_agent_total_response_bytes end
6   )
7 ]]


posted @ 2017-05-01 21:19  lixin[at]hitwh  阅读(670)  评论(0编辑  收藏  举报