Object ::rrd::plugin::dbstats (public)
::rrd::Plugin ::rrd::plugin::dbstats
Defined in packages/rrd-tool/tcl/rrd-procs.tcl
- pool1-statementsC
- pool3-gethandlesC
- pool3-statementsC
- pool1-waittimeC
- pool3-waittimeC
- pool1-sqltimeC
- pool2-gethandlesC
- pool2-sqltimeC
- pool2-statementsC
- pool3-sqltimeC
- ::rrd::plugin::dbstats update
- pool2-waittimeC
- pool1-gethandlesC
- ::rrd::plugin::dbstats updateDataSource /varName/ /value/
- ::rrd::plugin::dbstats datasources
- ::rrd::plugin::dbstats datasource /varName/
- ::rrd::plugin::dbstats baseResolution
- Testcases:
- No testcase defined.
Source code: namespace eval ::rrd::plugin {} ::nsf::object::alloc ::rrd::Plugin ::rrd::plugin::dbstats {set :baseResolution 300 set :durations { "5 min" "2 days" "30 min" "9 days" "2 hours" "45 days" "1 day" "450 days" } set :name dbstats set :rrdPath /var/www/openacs.org/www/rrd/localhost.localdomain_dbstats set :rrdRoot /var/www/openacs.org/www/rrd/localhost.localdomain set :type DERIVE set :vars { pool1-statements pool1-gethandles pool1-sqltime pool1-waittime pool2-statements pool2-gethandles pool2-sqltime pool2-waittime pool3-statements pool3-gethandles pool3-sqltime pool3-waittime }} ::rrd::plugin::dbstats public object method update {} { # # Get db-statistics from [ns_db stats] # set pairs [ns_db stats] foreach {p values} $pairs { foreach {key value} $values { set varName $p-$key if {$varName ni ${:vars}} continue if {![string is integer -strict $value]} { # assume floating point number in secs, compute ms set value [expr {round ($value*1000)}] } :updateDataSource $varName $value } } } ::nsf::object::alloc ::rrd::DataSource ::rrd::plugin::dbstats::pool2-waittime {set :baseResolution 300 set :name pool2-waittime set :rrdFile /var/www/openacs.org/www/rrd/localhost.localdomain_dbstats_pool2-waittime-d.rrd set :type DERIVE} ::nsf::object::alloc ::rrd::DataSource ::rrd::plugin::dbstats::pool1-gethandles {set :baseResolution 300 set :name pool1-gethandles set :rrdFile /var/www/openacs.org/www/rrd/localhost.localdomain_dbstats_pool1-gethandles-d.rrd set :type DERIVE} ::nsf::object::alloc ::rrd::DataSource ::rrd::plugin::dbstats::pool1-statements {set :baseResolution 300 set :name pool1-statements set :rrdFile /var/www/openacs.org/www/rrd/localhost.localdomain_dbstats_pool1-statements-d.rrd set :type DERIVE} ::nsf::object::alloc ::rrd::DataSource ::rrd::plugin::dbstats::pool3-gethandles {set :baseResolution 300 set :name pool3-gethandles set :rrdFile /var/www/openacs.org/www/rrd/localhost.localdomain_dbstats_pool3-gethandles-d.rrd set :type DERIVE} ::nsf::object::alloc ::rrd::DataSource ::rrd::plugin::dbstats::pool3-statements {set :baseResolution 300 set :name pool3-statements set :rrdFile /var/www/openacs.org/www/rrd/localhost.localdomain_dbstats_pool3-statements-d.rrd set :type DERIVE} ::nsf::object::alloc ::rrd::DataSource ::rrd::plugin::dbstats::pool1-waittime {set :baseResolution 300 set :name pool1-waittime set :rrdFile /var/www/openacs.org/www/rrd/localhost.localdomain_dbstats_pool1-waittime-d.rrd set :type DERIVE} ::nsf::object::alloc ::rrd::DataSource ::rrd::plugin::dbstats::pool3-waittime {set :baseResolution 300 set :name pool3-waittime set :rrdFile /var/www/openacs.org/www/rrd/localhost.localdomain_dbstats_pool3-waittime-d.rrd set :type DERIVE} ::nsf::object::alloc ::rrd::DataSource ::rrd::plugin::dbstats::pool1-sqltime {set :baseResolution 300 set :name pool1-sqltime set :rrdFile /var/www/openacs.org/www/rrd/localhost.localdomain_dbstats_pool1-sqltime-d.rrd set :type DERIVE} ::nsf::object::alloc ::rrd::DataSource ::rrd::plugin::dbstats::pool2-gethandles {set :baseResolution 300 set :name pool2-gethandles set :rrdFile /var/www/openacs.org/www/rrd/localhost.localdomain_dbstats_pool2-gethandles-d.rrd set :type DERIVE} ::nsf::object::alloc ::rrd::DataSource ::rrd::plugin::dbstats::pool2-sqltime {set :baseResolution 300 set :name pool2-sqltime set :rrdFile /var/www/openacs.org/www/rrd/localhost.localdomain_dbstats_pool2-sqltime-d.rrd set :type DERIVE} ::nsf::object::alloc ::rrd::DataSource ::rrd::plugin::dbstats::pool2-statements {set :baseResolution 300 set :name pool2-statements set :rrdFile /var/www/openacs.org/www/rrd/localhost.localdomain_dbstats_pool2-statements-d.rrd set :type DERIVE} ::nsf::object::alloc ::rrd::DataSource ::rrd::plugin::dbstats::pool3-sqltime {set :baseResolution 300 set :name pool3-sqltime set :rrdFile /var/www/openacs.org/www/rrd/localhost.localdomain_dbstats_pool3-sqltime-d.rrd set :type DERIVE}XQL Not present: Generic, PostgreSQL, Oracle