Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding runtime parameters to status hook #242

Open
pbitty opened this issue Sep 23, 2016 · 0 comments
Open

Adding runtime parameters to status hook #242

pbitty opened this issue Sep 23, 2016 · 0 comments

Comments

@pbitty
Copy link
Contributor

pbitty commented Sep 23, 2016

Currently, the gh-ost-on-status hook prints the progress status line that looks like this:

Copy: 1699250189/1690108499 100.5%; Applied: 31743968; Backlog: 7/100; Time: 161h16m29s(total), 161h16m29s(copy); streamer: mysql-bin-changelog.007837:11033033; ETA: Due

When we issue the status command via the control socket, we get much more information:

# Migrating `dbname`.`tablename`; Ghost table is `dbname`.`_tablename_gho`
# Migrating hostname:3306; inspecting hostname:3306; executing on dbname-tablename.tablename-1-test-on-replica-84g2c
# Migration started at Tue Sep 20 15:59:38 +0000 2016
# chunk-size: 10000; max-lag-millis: 1500ms; max-load: Threads_connected=100; critical-load: ; nice-ratio: 1.000000
# throttle-additional-flag-file: /tmp/gh-ost.throttle
# postpone-cut-over-flag-file: /postpone [set]
# Serving on unix socket: /tmp/gh-ost.dbname.tablename.sock
# Serving on TCP port: 8000
Copy: 0/1251261483 0.0%; Applied: 0; Backlog: 8/100; Time: 34s(total), 0s(copy); streamer: mysql-bin-changelog.003710:88661; State: migrating; ETA: N/A

It would be useful to us to have the runtime params like chunk-size, nice-ratio, etc, available in the status hook, so we can track what the settings were at each point in the process. We're using this to submit metrics to our monitoring systems.

I'd be happy to submit a PR once we agree on the format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants