14

我正在向 Graphite 发送垃圾收集所花费的时间(通过 jmx 从 jvm 获取)。这是一个增加的计数器。他们是一种让 Graphite 每分钟绘制一次变化的方法,这样我就可以看到一个图表,显示每分钟在 GC 中花费的时间?

4

1 回答 1

21

您应该能够使用 Derivative 函数将计数器变为命中率,然后使用汇总函数将计数器变为您之后的时间范围。

&target=summarize(derivative(java.gc_time), "1min") # time spent per minute

衍生品(系列列表)

This is the opposite of the integral function. This is useful for taking a 
running totalmetric and showing how many requests per minute were handled.

&target=derivative(company.server.application01.ifconfig.TXPackets)

每次运行 ifconfig 时,RX 和 TXPacket 都较高(假设存在网络流量)。通过应用导数函数,您可以了解每分钟发送或接收的数据包,即使您只记录总数。

总结(seriesList,intervalString,func='sum',alignToFrom=False)

Summarize the data into interval buckets of a certain size.
By default, the contents of each interval bucket are summed together. 
This is useful for counters where each increment represents a discrete event and
retrieving a “per X” value requires summing all the events in that interval.

来源: http: //graphite.readthedocs.org/en/0.9.10/functions.html

于 2012-09-08T14:35:49.477 回答