stats_instance_reset()
The stats_instance_reset() operator resets the per-instance resource statistics. Available only in the Enterprise Edition.
SynopsisÂ
stats_instance_reset()
Reset SciDB's per-instance counters.
Library
The stats_instance_reset() operator resides in the monitor library. Run the following query to load this library:
Â
iquery -aq "load_library('monitor');"
Summary
The stats_instance_reset() operator resets SciDB's counters to the default value so they begin counting again.Â
Example
In this example, the following statistics were gathered using stats_instance().
$ iquery -aq "stats_instance();" {inst,n} host_name,ip_address,process_id,time_since_start_ms,time_since_reset_ms,time_cpu_active_ms,net_send_bytes,net_recv_bytes,mem_available_bytes,mem_allocated_bytes,mem_allocations,mem_peak_usage_bytes,num_active_queries,cache_used_mem_size,cache_swap_bytes,cache_swap_num,cache_load_bytes,cache_load_num,cache_drop_bytes,cache_drop_num,time_cache_write_ms,time_cache_read_ms,num_db_wr,bytes_compr_db_wr,bytes_decomp_db_wr,num_db_rd,bytes_compr_db_rd,bytes_decomp_db_rd,time_catalog_access_ms {0,0} 'goofy.example.com','0.0.0.0',13174,30522,30522,20,1478,7482,1152921504606846975,67117080,1,201334840,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4 {1,0} 'goofy.example.com','0.0.0.0',13173,30523,30523,11,432,9390,1152921504606846975,67117080,1,67117080,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3 {2,0} 'goofy.example.com','0.0.0.0',13177,30521,30521,8,432,9404,1152921504606846975,67117080,1,67117080,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2 {3,0} 'goofy.example.com','0.0.0.0',13175,30522,30522,9,432,9390,1152921504606846975,67117080,1,67117080,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4
To reset the statistics instance, run:
$ iquery -aq "stats_instance_reset();"
The output is:
Query was executed successfully
Â
To confirm that the statistics reset, run:
$ iquery -aq "stats_instance();"
Â
The output is:
{inst,n} host_name,ip_address,process_id,time_since_start_ms,time_since_reset_ms,time_cpu_active_ms,net_send_bytes,net_recv_bytes,mem_available_bytes,mem_allocated_bytes,mem_allocations,mem_peak_usage_bytes,num_active_queries,cache_used_mem_size,cache_swap_bytes,cache_swap_num,cache_load_bytes,cache_load_num,cache_drop_bytes,cache_drop_num,time_cache_write_ms,time_cache_read_ms,num_db_wr,bytes_compr_db_wr,bytes_decomp_db_wr,num_db_rd,bytes_compr_db_rd,bytes_decomp_db_rd,time_catalog_access_ms {0,0} 'goofy.example.com','0.0.0.0',13174,154763,4529,1,288,1254,1152921504606846975,67117080,1,201334840,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 {1,0} 'goofy.example.com','0.0.0.0',13173,154764,4529,1,96,2878,1152921504606846975,67117080,1,67117080,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 {2,0} 'goofy.example.com','0.0.0.0',13177,154761,4528,2,96,2878,1152921504606846975,67117080,1,67117080,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 {3,0} 'goofy.example.com','0.0.0.0',13175,154762,4529,1,96,2878,1152921504606846975,67117080,1,67117080,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
After the stats_instance_reset() executed on instance 0, the time_since_reset_ms (4529) is less than the time_since_start_ms (154763). On reset, all counters reset to their default value (usually zero) and begin counting again.
Â