ns::ns_stats method startup (protected)
<instance of ns::ns_stats> startup
Apply the process-wide ns/stats startup configuration once, in the selected server's startup callback. Database modules and pool permissions are available at this point. Reuse the public runtime commands for validation, scheduling and persistence initialization. Configuration is not reapplied by sampling or history callbacks.
- Testcases:
- No testcase defined.
Source code: set section ns/stats set server [ns_config $section server [lindex [ns_info servers] 0]] if {$server ne [ns_info server]} { return } set sampling [ns_config -bool $section sampling false] set pool [ns_config $section historyPool {}] if {!$sampling && $pool eq ""} { return } set interval [ns_baseunit -time [ns_config $section samplingInterval 10s]] if {$sampling && ($interval<1 || $interval>3600)} { error "ns/stats samplingInterval must be 1..3600 seconds" } if {$pool ne ""} { :history configure -pool $pool -retention [ns_config $section historyRetention 24h] -maxBytes [ns_config $section historyMaxBytes 64MiB] } if {$sampling} { :sampling start -interval $interval }XQL Not present: Generic, PostgreSQL, Oracle
![[i]](/resources/acs-subsite/ZoomIn16.gif)