Skip to content

Instantly share code, notes, and snippets.

@mccun934
Created January 31, 2018 16:05
Show Gist options
  • Save mccun934/9ebd2b7330e7fecff98e2d37f537a4be to your computer and use it in GitHub Desktop.
Save mccun934/9ebd2b7330e7fecff98e2d37f537a4be to your computer and use it in GitHub Desktop.
#!/bin/bash
TABLE_COUNTS="select count(*) as foreman_tasks_tasks from foreman_tasks_tasks;
select count(*) as foreman_tasks_locks from foreman_tasks_locks;
select count(*) as dynflow_execution_plans from dynflow_execution_plans;
select count(*) as dynflow_actions from dynflow_actions;
select count(*) as dynflow_steps from dynflow_steps;"
echo ""
echo "Table counts :"
echo $TABLE_COUNTS | sudo -i -u postgres psql -d foreman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment