#
# pmrep(1) configuration file - see pmrep.conf(5)
#


# Compact metric specifications are of form (see pmrep(1)):
#pcp.metric.name = label,instances,unit/scale,type,width,precision,limit


#
# Mimic assorted collectl(1) reports
#
[collectl-dm-sD]
header = yes
unitinfo = no
globals = no
timestamp = yes
precision = 2
delimiter = " "
colxrow = "  Mapped Device"
hinv.map.dmname     = DM,,,,6
disk.dm.read_bytes  = rkB/s,,KB,,7
disk.dm.read_merge  = rrqm/s,,,,6
disk.dm.read        = r/s,,,,7
disk.dm.r_avg_rqsz  = rareq-sz,,,,8
r_await             = r_await,,,,7
r_await.formula     = delta(disk.dm.read_rawactive) / delta(disk.dm.read)
disk.dm.write_bytes = wkB/s,,KB,,9
disk.dm.write_merge = wrqm/s,,,,8
disk.dm.write       = w/s,,,,7
disk.dm.w_avg_rqsz  = wareq-sz,,,,8
w_await             = w_await,,,,7
w_await.formula     = delta(disk.dm.write_rawactive) / delta(disk.dm.write)
wait                = wait,,,,7
wait.formula        = delta(disk.dm.total_rawactive) / delta(disk.dm.total)
disk.dm.avg_qlen    = aqu-sz,,,,6
svctm               = svctm,,,,6
svctm.formula       = 1000 * rate(disk.dm.avactive) / rate(disk.dm.total)
disk.dm.util        = %%util,,,,6

[collectl-sc]
header = yes
unitinfo = no
globals = no
timestamp = yes
precision = 2
delimiter = " "
cpu                = %%cpu,,,,5
cpu.label          = cpu
cpu.formula        = 100 * (kernel.all.cpu.user + kernel.all.cpu.nice) / hinv.ncpu
cpu.unit           = s
sys                = %%sys,,,,5
sys.label          = sys
sys.formula        = 100 * rate(kernel.all.cpu.sys) / hinv.ncpu
kernel.all.intr    = intr/s,,,,7
kernel.all.pswitch = cswch/s,,,,8

[collectl-sd]
disk.all.read_bytes  = KBRead,,KB,,6
disk.all.read        = Reads,,,,6
disk.all.write_bytes = KBWrite,,KB,,6
disk.all.write       = Writes,,,,6

[collectl-sD]
header = yes
unitinfo = no
globals = no
timestamp = yes
precision = 2
delimiter = " "
colxrow = "      Device"
disk.dev.read_bytes  = rkB/s,,KB,,9
disk.dev.read_merge  = rrqm/s,,,,8
disk.dev.read        = r/s,,,,7
disk.dev.r_avg_rqsz  = rareq-sz,,,,8
r_await              = r_await,,,,7
r_await.formula      = delta(disk.dev.read_rawactive) / delta(disk.dev.read)
disk.dev.write_bytes = wkB/s,,KB,,9
disk.dev.write_merge = wrqm/s,,,,8
disk.dev.write       = w/s,,,,7
disk.dev.w_avg_rqsz  = wareq-sz,,,,8
w_await              = w_await,,,,7
w_await.formula      = delta(disk.dev.write_rawactive) / delta(disk.dev.write)
wait                 = wait,,,,7
wait.formula         = delta(disk.dev.total_rawactive) / delta(disk.dev.total)
disk.dev.avg_qlen    = aqu-sz,,,,6
svctm                = svctm,,,,6
svctm.formula        = 1000 * rate(disk.dev.avactive) / rate(disk.dev.total)
disk.dev.util        = %%util,,,,6

[collectl-sm]
mem.freemem       = Free,,GB,,5
mem.util.bufmem   = Buff,,GB,,5
mem.util.cached   = Cach,,GB,,5
mem.util.inactive = Inac,,GB,,5
mem.util.slab     = Slab,,GB,,5
mem.util.mapped   = Map,,GB,,5

[collectl-sn]
kbin           = KBIn,,KB,,6
kbin.formula   = sum(network.interface.in.bytes)
pktin          = PktIn,,,,6
pktin.formula  = sum(network.interface.in.packets)
kbout          = KBOut,,KB,,6
kbout.formula  = sum(network.interface.out.bytes)
pktout         = PktOut,,,,6
pktout.formula = sum(network.interface.out.packets)
