The following example contains a short [options]
section setting
some locally wanted default values. It then goes on to define
the global metrics kernel.all.sysfork
using the compact form and
mem.util.allcache
using the verbose form of a metricspec. The
latter is a derived metric using the later specified formula.
Both of these metrics will be included in reporting unless
disabled with -G
or globals = no
.
Three different metricsets are also specified: db1
, db2
, and
sar-w
.
The DB sets define a host to be used as the source for the
metrics. Both use the verbose form of a metricspec (as the non-
option key set
does not contain the dot) to include all
postgresql
related metrics.
The sar-w
set is an example how to mimic an existing tool with
pmrep
.
The system default pmrep
configuration files contain many more
examples. Using the tab key on the command line after the colon
can be used to complete available metricsets (with bash and zsh).
[options]
timestamp = yes
interval = 2s
extheader = yes
repeat_header = auto
space_scale = MB
[global]
kernel.all.sysfork = forks,,,,8
allcache = mem.util.allcache
allcache.formula = mem.util.bufmem + mem.util.cached + mem.util.slab
allcache.width = 12
[db1]
source = db-host1.example.com
set = postgresql
[db2]
source = db-host2.example.com
set = postgresql
[sar-w]
header = yes
unitinfo = no
globals = no
timestamp = yes
precision = 2
delimiter = " "
kernel.all.sysfork = proc/s,,,,12
kernel.all.pswitch = cswch/s,,,,9