Skip to content

Instantly share code, notes, and snippets.

@ylacancellera
Created September 28, 2022 08:49
Show Gist options
  • Save ylacancellera/bf1aa906926405da9ef3ddf49668cf21 to your computer and use it in GitHub Desktop.
Save ylacancellera/bf1aa906926405da9ef3ddf49668cf21 to your computer and use it in GitHub Desktop.
cat << 'EOF' > /tmp/ptstalk_trigger_fc_active.sh
#!/bin/bash
trg_plugin() {
mysql $EXT_ARGV -sN -e "select case when variable_value = 'false' then 0 else 1 end from information_schema.global_status where variable_name ='wsrep_flow_control_active';"
}
EOF
chmod +x /tmp/ptstalk_trigger_fc_active.sh
sudo ./pt-stalk --stalk --function=/tmp/ptstalk_trigger_fc_active.sh --threshold=0 --cycles=1 --dest="${PTDEST}" -- --user=root --password=<mysql-root-pass>; &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment