如何使用以下值以百分比计算Heroku Postgres DB内存利用率。
原始数据
2013-05-07T17:41:06+00:00
source=HEROKU_POSTGRESQL_VIOLET
addon=postgres-metric-68904
sample#current_transaction=1873
sample#db_size=26219348792bytes
sample#tables=13
sample#active-connections=92
sample#waiting-connections=1
sample#index-cache-hit-rate=0.99723
sample#table-cache-hit-rate=0.99118
sample#load-avg-1m=1.42
sample#load-avg-5m=1.45
sample#load-avg-15m=1.34
sample#read-iops=0
sample#write-iops=2.875
sample#memory-total=1692568kB
sample#memory-free=73876kB
sample#memory-cached=1344128kB
sample#memory-postgres=22388kB
我想使用以下值计算百分比。
sample#memory-total=1692568kB
sample#memory-free=73876kB
sample#memory-cached=1344128kB
sample#memory-postgres=22388kB
答案 0 :(得分:0)
将报告的总内存除以计划特定的RAM数量,然后乘以100得出一个百分比。
({sample#memory-total
/ available mem in kb)* 100