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

Illegal division by zero #423

Closed
vesatoivonen opened this issue Jan 25, 2019 · 6 comments
Closed

Illegal division by zero #423

vesatoivonen opened this issue Jan 25, 2019 · 6 comments

Comments

@vesatoivonen
Copy link

Running freshly cloned repo and mariadb 10.3.12

 Illegal division by zero at mysqltuner.pl line 2573 (#1)
    (F) You tried to divide a number by 0.  Either something was wrong in
    your logic, or you need to put a conditional in to guard against
    meaningless input.
    
Uncaught exception from user code:
    Illegal division by zero at mysqltuner.pl line 2573.
    main::calculations() called at mysqltuner.pl line 6307
@jmrenouard
Copy link
Collaborator

Hi @vesatoivonen

Do you restart your server just before running mysqltuner ?

This expression $mystat{'Uptime'} returns 0.

So, this means that you don't let mariaDb run during enougth time in order to get accurated information.

jmrenouard added a commit that referenced this issue Mar 6, 2019
@jmrenouard
Copy link
Collaborator

Adding a test for uptime = 0 and set up uptime to 1 sec. at least

@vesatoivonen
Copy link
Author

Actually, yes.
I have since lost the command chain used, but it was something like sudo systemctl restart mysql.service && perl mysqltuner.pl

@jmrenouard
Copy link
Collaborator

You should wait at least a complete day to see useful information in your status.

jmrenouard added a commit that referenced this issue Mar 6, 2019
@jmrenouard
Copy link
Collaborator

So, I fixed it.

I also push a notification on README. Don't use mysqltuner on a fresh restarted server and wait at least one day of full production to get accurated results.

@vesatoivonen
Copy link
Author

OK, thanks a lot!

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