ASQL docs / Performance & Operations

Tools

All are in /opt/aios/bin.

aios-asql-console

A SQL prompt. It takes the port, user and password from /etc/aios/asql.conf, so on the server it needs no options (run it with sudo to read the file).

sudo /opt/aios/bin/aios-asql-console
aios-asql-console -h 10.0.0.9 -P 3307 -u app -p secret -d store -e "SELECT COUNT(*) FROM orders"

-S connects to a Unix socket; --no-conf ignores the config file. At the prompt, \h shows help and \q quits.

aios-asql-top

A live view of the server: queries per second and by kind, average and last latency, slow queries (over 50 ms), errors, cache hits, tables and rows, memory, and the statements running now.

sudo /opt/aios/bin/aios-asql-top
aios-asql-top --once                 # one snapshot and exit
aios-asql-top --record stats.jsonl   # also write each sample as a JSON line

-i <ms> sets the interval (default 1000).

asql-check

/opt/aios/bin/asql-check --quick      # service up, connection works, replication lag, Things loaded
/opt/aios/bin/asql-check              # also compares each mirrored table with the source
/opt/aios/bin/asql-check orders       # one table

It exits 0 only if everything passes, so it can run from monitoring. --lag-ok <bytes> sets how far behind counts as fine.

asql-export.sh, asql-import.sh

Backup and restore. See Back up and restore.

aios

The engine itself. Useful commands:

CommandDoes
aios license statustrial days left or the license in use
aios --root /opt/aios/root sql copy ...copy a database in
aios asqlcap attenuate <token> ...narrow a capability token