Query Statistics Database
For more information on working with the AMPS statistics database, see the section on AMPS Statistics and the descriptions in the AMPS Monitoring Guide.
The AMPS distribution includes a convenience utility, amps-sqlite3
, for easily running queries against a statistics database.
Options and Parameters
The amps-sqlite3
utility takes two parameters, as shown below:
Parameter | Description |
| The sqlite3 database file to query. |
| The query to run. Notice that the query must be enclosed in quotes, since this is a command-line program run by the Linux shell. |
The amps-sqlite3
script joins the STATIC
and DYNAMIC
tables together, making a single table that is easier to query on. For example, the script joins the ICLIENTS_DYNAMIC
and ICLIENTS_STATIC
tables together into a single ICLIENTS
table.
The amps-sqlite3
utility also provides a set of convenience functions that can be included in the query.
Convenience Functions
Option | Description |
| Convert an AMPS statistics |
| Convert an AMPS statistics |
| Convert the provided ISO8601 format |
Usage
To use the amps-sqlite3
utility, simply provide the file name of the database to query and the query to run.
For example, the following query returns the set of samples AMPS has recorded for the system_percent
consumed on each CPU while the instance has been running:
Last updated