DBPMDA(1) General Commands Manual DBPMDA(1) (NAME) dbpmda - PMDA Performance Co-Pilot (SYNOPSIS) dbpmda [-D debug] [-efiv?] [-n pmnsfile] [-q timeout] [-U username] (DESCRIPTION) dbpmda (PMDA(3)) (pmcd(1)) . PMDA . dbpmda (PDU) pmcd(1) . dbpmda help . dbpmda PMDA . PMDA .dbpmdarc dbpmda . .dbpmdarc (echoing) .dbpmdarc ( -i -e ). -f .dbpmdarc ( ) . readline(3) tty . dbpmda ( pmcd(1)) (timeout) PMDA PMDA dbpmda gdb(1) PMDA ..SH " (OPTIONS)" : -e, --echo-input stdout. . -f, --norc .dbpmdarc. -i, --interactive tty . -n pmnsfile, --namespace=pmnsfile (PMNS(5)) pmnsfile. -q timeout, --creds-timeout=timeout pmcd ( PCP 2.0 - ) dbpmda . PCP 2.0 . -q ( ) . . -U username, --username=username dbpmda . -v, --valgrind dbpmda valgrind(1) DSO PMDA . -v dbpmda dlclose(3) valgrind(1) DSO PMDA . -?, --help . (EXAMPLES) dbpmda PMDA simple . .dbpmdarc PMDA : $ cat .dbpmdarc debug libpmda open dso pmda_simple.so simple_init 253 status dbpmda .dbpmdarc : $ dbpmda .dbpmdarc> debug libpmda .dbpmdarc> open dso pmda_simple.so simple_init 253 [Fri Sep 19 10:19:55] dbpmda(11651) Debug: pmdaInit: PMDA simple DSO: Metric 0.0.1(1) matched to indom 253.0(0) [Fri Sep 19 10:19:55] dbpmda(11651) Debug: pmdaInit: PMDA simple DSO: help file $PCP_PMDAS_DIR/simple/help opened [Fri Sep 19 10:19:55] dbpmda(11651) Info: name = simple DSO [Fri Sep 19 10:19:55] dbpmda(11651) Info: domain = 253 [Fri Sep 19 10:19:55] dbpmda(11651) Info: num metrics = 4 [Fri Sep 19 10:19:55] dbpmda(11651) Info: num indom = 1 [Fri Sep 19 10:19:55] dbpmda(11651) Info: direct map = 1 .dbpmdarc> status Namespace: (default) PMDA: ./pmda_simple.so Connection: dso DSO Interface Version: 7 PMDA PMAPI Version: 2 Debug options: libpmda Timer: off Getdesc: off Getiname: off Dump Instance Profile state=INCLUDE, 0 profiles .dbpmdarc> desc instance . <<>> PMID . <<>> . : dbpmda> desc 253.0.0 PMID: 253.0.0 Data Type: 32-bit unsigned int InDom: PM_INDOM_NULL 0xffffffff Semantics: instant Units: none dbpmda> instance instance indom# [ number | name | "name" ] dbpmda> instance 253.0 pmInDom: 253.0 [ 0] inst: 0 name: "red" [ 1] inst: 1 name: "green" [ 2] inst: 2 name: "blue" PMDA fetch PMDA . fetch timer : dbpmda> timer on dbpmda> fetch simple.numfetch 253.0.1 PMID(s): 253.0.0 253.0.1 pmResult dump from 0x100078e0 timestamp: 0.000000 11:00:00.000 numpmid: 2 253.0.0 (simple.numfetch): numval: 1 valfmt: 0 vlist[]: value 1 1.4012985e-45 0x1 253.0.1 (simple.color): numval: 3 valfmt: 0 vlist[]: inst [0 or ???] value 1 1 1.4012985e-45 0x1 inst [1 or ???] value 101 1.4153114e-43 0x65 inst [2 or ???] value 201 2.8166099e-43 0xc9 Timer: 0.003921 seconds dbpmda> timer off getdesc off () pmResult . getdesc on ( pmDesc) ..PP getiname . off () . on <<>> ??? PMDA : dbpmda> getiname on dbpmda> fetch simple.color PMID(s): 253.0.1 pmResult dump from 0x100078e0 timestamp: 0.000000 11:00:00.000 numpmid: 1 253.0.1 (simple.color): numval: 3 valfmt: 0 vlist[]: inst [0 or "red"] value 4 inst [1 or "green"] value 104 inst [2 or "blue"] value 204 getiname on getdesc on . getdesc getiname on fetch PMDA . PMDA off . PMDA simple store fetch : dbpmda> store simple.numfetch "42" PMID: 253.0.0 Getting description... Getting Result Structure... 253.0.0: 2 -> 42 dbpmda> fetch simple.numfetch PMID(s): 253.0.0 pmResult dump from 0x100078e0 timestamp: 0.000000 11:00:00.000 numpmid: 1 253.0.0 (simple.numfetch): numval: 1 valfmt: 0 vlist[]: value 43 store (') (") . profile : dbpmda> help profile profile indom# [ all | none ] profile indom# [ add | delete ] number For the instance domain specified, the profile may be changed to include 'all' instances, no instances, add an instance or delete an instance. dbpmda> profile 253.0 none dbpmda> getdesc on dbpmda> fetch 253.0.1 PMID(s): 253.0.1 pmResult dump from 0x100078e0 timestamp: 0.000000 11:00:00.000 numpmid: 1 253.0.1 (simple.color): No values returned! dbpmda> profile 253.0 add 2 dbpmda> fetch 253.0.1 PMID(s): 253.0.1 pmResult dump from 0x100078e0 timestamp: 0.000000 11:00:00.000 numpmid: 1 253.0.1 (simple.color): numval: 1 valfmt: 0 vlist[]: value 202 dbpmda> profile 253.0 add 0 dbpmda> fetch 253.0.1 PMID(s): 253.0.1 pmResult dump from 0x100078e0 timestamp: 0.000000 11:00:00.000 numpmid: 1 253.0.1 (simple.color): numval: 2 valfmt: 0 vlist[]: inst [0 or ???] value 2 inst [2 or ???] value 203 dbpmda> status Namespace: (default) PMDA: ./pmda_simple.so Connection: dso DSO Interface Version: 7 PMDA PMAPI Version: 2 Debug options: (none) Timer: off Getdesc: off Getiname: off Dump Instance Profile state=INCLUDE, 1 profiles Profile [0] indom=1061158913 [253.0] state=EXCLUDE 2 instances Instances: [2] [0] dbpmda> quit watch (: watch filename ) xterm (tail) . . wait sleep(1) ( ) . PMNS PMDA_INTERFACE_4 libpcp_pmda dbpmda PMNS . PMDA sample . $ dbpmda dbpmda> open pipe /var/lib/pcp/pmdas/sample/pmdasample -d 29 Start pmdasample PMDA: /var/lib/pcp/pmdas/sample/pmdasample -d 29 dbpmda> children sample.secret Metric: sample.secret non-leaf foo leaf bar dbpmda> traverse sample.secret.foo Metric: sample.secret.foo sample.secret.foo.bar.max.redirect sample.secret.foo.one sample.secret.foo.two sample.secret.foo.bar.three sample.secret.foo.bar.four sample.secret.foo.bar.grunt.five sample.secret.foo.bar.grunt.snort.six sample.secret.foo.bar.grunt.snort.huff.puff.seven dbpmda> pmid sample.secret.foo.bar.four Metric: sample.secret.foo.bar.four 29.0.1004 dbpmda> name 29.0.1006 PMID: 29.0.1006 sample.secret.foo.bar.grunt.snort.six children PMNS . traverse PMNS PMNS . name pmid PMID ( ) PMNS . children traverse pmid name PMDA PMDA_INTERFACE_4 PMNS PMDA (PM_ERR_NAME PM_ERR_PMID) ( PMNS pmcd(1) PMDA ). PMCS ( ) PMDA . PMDA PMDA_INTERFACE_6 libpcp_pmda <> . dbpmda . PMDA sample . $ dbpmda dbpmda> open pipe pmdasample -D AUTH -l logfile Start pmdasample PMDA: pmdasample -D AUTH -l logfile dbpmda> attr "username" "tanya" Attribute: username=tanya Success dbpmda> attr 11 "0" Attribute: userid=0 Success dbpmda> attr ( PCP_ATTR_XXXX) PMCD PMDA . dbpmda (client context identifier) . AUTH PMDA (attribute callback) logfile . PMDA PMCD PMDA . debug . PCP PMDA (link) . <<->> . -l pmdbg(1) / -ol pmdbg(1) . <<>> none <<>> all ..SH " (CAVEATS)" PM_TYPE_AGGREGATE PM_TYPE_EVENT . dbpmda fork(2) exec(2) PMDA . dbpmda PMDA PMDA . PMDA PMDA . (FILES) ./.dbpmdarc . PCP (PCP ENVIRONMENT) PCP_ PCP . /etc/pcp.conf . $PCP_CONF pcp.conf(5) . PCP pmGetOptions(3) . (DEBUGGING OPTIONS) -D --debug stderr . debug pmdbg(1) -l . (SEE ALSO) gdb(1), pmcd(1), pmdbg(1), exec(2), fork(2), PMAPI(3), PMDA(3), pcp.conf(5), pcp.env(5) PMNS(5). Performance Co-Pilot PCP DBPMDA(1)