Skip to main content

Table Reference

This section lists the statistics database tables that are related to each performance metric.

The table below lists the base name for the tables that contain each type of metric. In the AMPS statistics database, static properties (such as the client name of a connection) are stored in a STATIC table, while statistics that are captured at each interval are stored in a DYNAMIC table.

The amps-sqlite3 script automatically handles the join from STATIC tables to DYNAMIC tables to allow you to query using the base table name directly.

For queries that use other tools, include a join between the corresponding STATIC and DYNAMIC table static_id fields. For example, to query information for clients, join ICLIENTS_STATIC and ICLIENTS_DYNAMIC on ICLIENTS_STATIC.static_id = ICLIENTS_DYNAMIC.static_id.

Host Metrics

Metric CategoryBase Table Names
cpus (host level)HCPUS (instance info in ICPUS)
disk capacity and activityHDISKS
memory (host level)HMEMORY (instance info in IMEMORY)
network activityHNET

Instance Metrics

Metric CategoryBase Table Names
api (embedded client)IGLOBALS
clientsICLIENTS
conflated topicsICONFLATEDTOPICS (info also in ISOW)
cpu (instance)ICPUS (host level info in HCPUS)
loggingICONSOLE_LOGGERS, IFILE_LOGGERS, ISYSLOG_LOGGERS
memory (instance)IMEMORY, IMEMORY_CACHES, IPAGINATIONS
message processorsIPROCESSORS
queriesIGLOBALS
queuesIQUEUES (info also in ISOW)
replicationIREPLICATIONS
sow (including information on views, conflated topics, queues)ISOW
statisticsISTATISTICS
subscriptionsISUBSCRIPTIONS
timestampIGLOBALS
transaction logITRANSACTION_LOG, ITRANSACTION_LOG_WRITE_LATENCY, ITRANSACTION_LOG_WRITE_SIZE
transportsITRANSPORTS
viewsIVIEWS

Computed Metrics​

Some metrics available through the administrative interface are calculated when queried and are not stored as columns in the physical SQLite tables. When querying those tables directly, calculate the values from the stored columns using the expressions below.

Admin metricSource tablesSQL expression
/amps/host/memory/in_useHMEMORY_STATIC joined to HMEMORY_DYNAMIC on static_idIFNULL(total - free - buffers - cached, 0)
/amps/instance/cpu/total_percentICPUS_DYNAMICIFNULL(user_percent + system_percent, 0)
/amps/instance/statistics/time_per_sampleISTATISTICS_DYNAMIC1.0 * total_time / total_samples
/amps/instance/statistics/disk_per_sampleISTATISTICS_DYNAMIC1.0 * file_size / total_samples

For example, to calculate time_per_sample directly from the statistics database:

SELECT timestamp, 1.0 * total_time / total_samples AS time_per_sample
FROM ISTATISTICS_DYNAMIC
ORDER BY timestamp;