rrd::DataSource method createRRDfile (protected)
<instance of rrd::DataSource> createRRDfile
Defined in packages/rrd-tool/tcl/rrd-procs.tcl
- Testcases:
- No testcase defined.
Source code: set durations [[:info parent] cget -durations] foreach duration ${durations} { set d [clock scan $duration -timezone :UTC -base 0] set multiple($duration) [expr {$d / ${:baseResolution}}] if {$multiple($duration) * ${:baseResolution} != $d} { error "duration '$duration' is not a multiple of the base resolution ${:baseResolution} secs" } } set RRA {} foreach {res duration} ${durations} { set m [expr {$multiple($duration)/$multiple($res)}] if {$m * $multiple($res) != $multiple($duration)} { error "duration '$duration' is not a multiple of the resolution $res" } #ns_log notice "$multiple($res) [expr {$multiple($duration)/$multiple($res)}]" lappend RRA "RRA:AVERAGE:0.5:$multiple($res):$m" "RRA:MIN:0.5:$multiple($res):$m" "RRA:MAX:0.5:$multiple($res):$m" } ns_log notice "try to create: Rrd::create ${:rrdFile} --step ${:baseResolution} DS:42:DERIVE:10m:0:U {*}$RRA" Rrd::create ${:rrdFile} --step ${:baseResolution} "DS:42:${:type}:10m:0:U" {*}$RRAXQL Not present: Generic, PostgreSQL, Oracle