Galaxy Usage Statistics Collection
Legacy
The get_stats helper was installed on the Galaxy VMs by the Ansible ornl.tuning role. It is not part of the
Kubernetes Galaxy image, so there is no ready-made way to run it against mickey or speedy. The steps below apply only
to VM-based Galaxy instances (for example galaxy.ornl.gov).
How to Run (VM)
- SSH into the Galaxy VM.
- Switch to the galaxy user:
sudo -iu galaxy
- Activate the Galaxy virtual environment:
source /srv/galaxy/venv/bin/activate
- Run the tool:
get_stats ...
This script generates usage reports for jobs, tools, and workflows. Use get_stats -h for details.
On Kubernetes
Until the script is available in the image, you can query the database directly from the primary galaxy-pg
instance:
kubectl -n ndip exec -it $(kubectl -n ndip get pods -l cnpg.io/cluster=galaxy-pg,cnpg.io/instanceRole=primary -o name) -- psql -U postgres galaxy
For example, jobs per tool in the last 30 days:
SELECT tool_id, count(*) FROM job WHERE create_time > now() - interval '30 days' GROUP BY tool_id ORDER BY 2 DESC;