PMCPP(1) General Commands Manual PMCPP(1) (NAME) pmcpp - Performance Co-Pilot (SYNOPSIS) pmcpp [-Prs?] [-D name[=value] ...] [-I dir ...] [[infile] [outfile]] (DESCRIPTION) pmcpp (PMNS) Performance Co-Pilot (PCP) (include) (in-line) . () PMNS pmLoadNameSpace(3) pmLoadASCIINameSpace(3) pmlogger(1) . infile ( infile ) outfile ( outfile ) . C /* ... */ . pmcpp -D name value #define . pmcpp ( cpp(1)): o #include "filename" #include filename filename infile ( ) -I $PCP_VAR_DIR/pmns ( pmcpp pmLoadASCIINameSpace(3) ). #include . o #shell "command" #shell 'command' command pmcpp . #include command . #shell #define #undef command . o #define name value #define name "value" #define name 'value' name C . value ( ). (escape) value ( ) . o #undef name name . o #ifdef name ... #endif #ifndef name ... #endif name . o #else #ifdef #ifndef #else <> . ( ) . ..PP . : # lineno "filename" lineno filename . (OPTIONS) : -D name[=value], --define=name[=value] . -I dir, --include=dir include. -P (linemarker) . -s, --shell C ( # ). pmcpp : o # % %include #include %ifdef #ifdef . o C . -r, --restrict - #name #{name} -s %name %{name} . name ( #ifdef) name ( << (EXAMPLES)>> ). -?, --help . cpp(1) pmcpp : o - pmcpp . o #if expr ... #endif o #ifdef #ifndef. o ++C // comment. o - pmcpp . o cpp(1) -o -W -U -x. +---------------------------------------------+ |: pmcpp | | +-----------------------+---------------------+ | | | +-----------------------+---------------------+ | | # 1 "" | |#define MYDOMAIN 27 | | | | | |root { | root { | | foo MYDOMAIN:0:0 | foo 27:0:0 | |} | } | +-----------------------+---------------------+ frequencies : %define dk_freq 1minute %define cpu_freq '15 sec' +-------------------------------------------------------------------+ |: pmcpp -rs | | +----------------------------------+--------------------------------+ | | | +----------------------------------+--------------------------------+ |# get logging frequencies | # get logging frequencies | |# e.g. dk_freq macro | # e.g. dk_freq macro | |%include "frequencies" | | | | | |log mandatory on %dk_freq { | log mandatory on 1minute { | | disk.dev | disk.dev | |} | } | | | | |# note no %want_cpu here | # note no %want_cpu here | |%ifdef want_cpu | | |%define cpu_pfx 'kernel.all.cpu.' | | |log mandatory on %cpu_freq { | | | %{cpu_pfx}user | | | %{cpu_pfx}sys | | |} | | |%endif | | +----------------------------------+--------------------------------+ +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ |: pmcpp -rs -D want_cpu | | +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------+ | | | +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------+ |# get logging frequencies | # get logging frequencies | |# e.g. dk_freq macro | # e.g. dk_freq macro | |%include "frequencies" | | | | | |log mandatory on %dk_freq { | log mandatory on 1min { | | disk.dev | disk.dev | |} | } | | | | |# note no %want_cpu here | # note no %want_cpu here | |%ifdef want_cpu | | |%define cpu_pfx 'kernel.all.cpu.' | | |log mandatory on %cpu_freq { | log mandatory on 15 sec { | | %{cpu_pfx}user | kernel.all.cpu.user | | %{cpu_pfx}sys | kernel.all.cpu.sys | |} | } | |%endif | | |" PCP (PCP ENVIRONMENT)" | | | PCP_ PCP . | | | /etc/pcp.conf . | | | $PCP_CONF pcp.conf(5) . | | | | | | PCP pmGetOptions(3) . | | |" (SEE ALSO)" | | |cpp (1), | | |pmLoadASCIINameSpace (3), | | |pmLoadNameSpace (3), | | |pcp.conf (5), | | |pcp.env (5) | | | | | |PMNS (5). | | | | | +-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------+ Performance Co-Pilot PMCPP(1)