pt-stalk disk space checks wrong on 32bit platforms
Bug #940503 reported by
Daniel Nichter
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Fix Released
|
Medium
|
Daniel Nichter |
Bug Description
On 64-bit platforms, awk '{printf("%d", 94409664*1024)}' yields 96,675,495,936. On 32-bit platforms it yields 2,147,483,647; i.e. the 32bit signed limit. Therefore, lines like
local free_bytes=$(cat "$file" | awk '/^\//{
in collect.sh return the wrong value because hard drives these days tend to have much more than 2^31 bytes of storage.
Solution: use Perl.
Changed in percona-toolkit: | |
assignee: | nobody → Daniel Nichter (daniel-nichter) |
tags: | added: pt-stalk |
Changed in percona-toolkit: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
This was fixed in lib/bash/ safeguards. sh and merged into 2.0 branch in http:// bazaar. launchpad. net/~percona- toolkit- dev/percona- toolkit/ 2.0/revision/ 189