pcp
[Top] [All Lists]

Derived Metrics with rate()

To: pcp developers <pcp@xxxxxxxxxxx>
Subject: Derived Metrics with rate()
From: Marko Myllynen <myllynen@xxxxxxxxxx>
Date: Thu, 25 Jun 2015 10:23:50 +0300
Delivered-to: pcp@xxxxxxxxxxx
Organization: Red Hat
Reply-to: myllynen@xxxxxxxxxx
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0
Hi all,

thanks to Ken, the new rate() keyword is now available in 3.10.5 so I
tried to write derived metrics for the three sar metrics not provided by
default by PCP (since they are, well, derived).

With sar -d 1 and with each of PCP_DERIVED_CONFIG=./metrics.conf pmval
-t 1s -f 3 disk.dev.{avrqsz,avqsz,await} I'm getting similar results
with these calculations:

disk.dev.avrqsz = ((rate(disk.dev.read_bytes) +
rate(disk.dev.write_bytes)) / (rate(disk.dev.read) +
rate(disk.dev.write))) * 2

disk.dev.avqsz = disk.dev.read_rawactive + disk.dev.write_rawactive

disk.dev.await = 1000 * (rate(disk.dev.read_rawactive) +
rate(disk.dev.write_rawactive)) / (rate(disk.dev.read) +
rate(disk.dev.write))

Before starting to write any other derived metrics (*) I wanted to check
how does this look like to you, are they what you'd expect or would you
write any of them somehow differently? Any other comments or suggestions?

*) I'll concentrate more on some derived metrics metrics from custom
PMDAs so nothing to share but if the earlier idea of default derived
metrics "library" provided PCP sounded something that could be done, the
three derived metrics above could be included there.

Thanks,

-- 
Marko Myllynen

<Prev in Thread] Current Thread [Next in Thread>