mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-11 13:40:07 +00:00
Use printf(%d) to avoid CentOS using floats.
This commit is contained in:
@@ -50,8 +50,8 @@ check_disk_space() {
|
|||||||
local bytes_margin="${4:-0}"
|
local bytes_margin="${4:-0}"
|
||||||
|
|
||||||
# Real/actual bytes used and bytes free.
|
# Real/actual bytes used and bytes free.
|
||||||
local used_bytes=$(cat "$file" | awk '/^\//{print $3 * 1024}');
|
local used_bytes=$(cat "$file" | awk '/^\//{printf("%d",$3 * 1024)}');
|
||||||
local free_bytes=$(cat "$file" | awk '/^\//{print $4 * 1024}');
|
local free_bytes=$(cat "$file" | awk '/^\//{printf("%d",$4 * 1024)}');
|
||||||
local pct_used=$(cat "$file" | awk '/^\//{print $5}' | sed -e 's/%//g');
|
local pct_used=$(cat "$file" | awk '/^\//{print $5}' | sed -e 's/%//g');
|
||||||
local pct_free=$((100 - $pct_used))
|
local pct_free=$((100 - $pct_used))
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user