stats_instance()

The stats_instance() operator provides per-instance resource statistics. Available only in the Enterprise Edition.

Synopsis

stats_instance()

Provides per-instance resource statistics.

Library

The stats_instance() operator resides in the monitor library. Run the following query to load this library:

 

AFL% load_library('monitor');

Summary

The stats_instance() operator lets you gather per-instance SciDB resource statistics for diagnostic purposes.  

Attributes

 

AttributeDescription
host_nameNode's hostname
ip_addressNode's Internet Protocol address
process_idThe SciDB process ID
time_since_start_msTime elapsed since the instance started in milliseconds
time_since_reset_msTime since reset occurred (or instance start) in milliseconds
time_cpu_active_msTotal CPU active time since the report was reset (or instance start) in milliseconds
net_send_bytes

Size of chunks sent across the network in bytes

net_recv_bytesSize of chunks received from the network in bytes
mem_available_bytesTotal size of all RAM currently available in bytes
mem_allocated_bytesRAM allocated on behalf of the instance (at this moment) in bytes
mem_allocationsNumber of times RAM was allocated on this instance in bytes
mem_peak_usage_bytesMaximum amount of RAM allocated on this instance in bytes
num_active_queriesNumber of active queries currently running on the instance
cache_used_mem_sizeTotal size of all mem chunks currently in cache in bytes
cache_swap_bytesSize of mem chunks written to disk (cache swap out) in bytes
cache_swap_numNumber of mem chuncks written to disk
cache_load_bytesSize of mem chunks read off disk (due to read cache miss) in bytes
cache_load_numNumber of mem chunks read off disk
cache_drop_bytesSize of mem chunks dropped from cache in bytes
cache_drop_numNumber of mem chunks dropped from cache
time_cache_write_msTime spent waiting on Mem chunk writes in milliseconds
time_cache_read_msTime spent waiting on Mem chunk reads in milliseconds
num_db_wrNumber of DB Chunks Written
bytes_compr_db_wrTotal size of all compressed DB Chunks written to disk in bytes
bytes_decomp_db_wrTotal size of all decompressed DB Chunks written to disk in bytes
num_db_rdNumber of compressed DB Chunks read from disk
bytes_compr_db_rdTotal size of all compressed DB Chunks read from disk in bytes
bytes_decomp_db_rdTotal size of all decompressed DB Chunks read from disk in bytes
time_catalog_access_msTime spent waiting on the execution of system catalogue queries in milliseconds

Some of the attributes are disabled if the resource-monitoring variable set to False in the config.ini.

Examples

Full stats_instance() Statistics

To create the full set of stats_instance() statistics, run the following:

$ 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,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

Subset of stats_instance() Statistics

To create a subset of stats_instance() statistics (this example captures memory statistics), run the following:

$ iquery -aq "project(stats_instance(), mem_available_bytes, mem_allocations, mem_allocated_bytes, mem_peak_usage_bytes);"


The output is:

{inst,n} mem_available_bytes,mem_allocations,mem_allocated_bytes,mem_peak_usage_bytes
{0,0} 1152921504606846975,1,67117080,201334840
{1,0} 1152921504606846975,1,67117080,67117080
{2,0} 1152921504606846975,1,67117080,67117080
{3,0} 1152921504606846975,1,67117080,67117080

Individual stats_instance() Statistic

To view an individual stats_instance() statistic (in this case, the size of chunks sent across the network in bytes), run the following:

$ iquery -aq "project(stats_instance(), net_send_bytes);"


The output is:

{inst,n} net_send_bytes
{0,0} 7004
{1,0} 2160
{2,0} 2160
{3,0} 2160