mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-12-24 02:01:42 +08:00
Fix mem/file size shortening in pt-summary and pt-mysql-summary.
This commit is contained in:
@@ -902,7 +902,7 @@ section_innodb () {
|
||||
local log_file="$(get_var innodb_log_files_in_group "$variables_file")"
|
||||
local log_total=$(awk "BEGIN {printf \"%.2f\n\", ${log_size}*${log_file}}" )
|
||||
name_val "Log File Size" \
|
||||
"${log_file} * $(shorten ${log_size} 1 1000) = $(shorten ${log_total} 1 1000)"
|
||||
"${log_file} * $(shorten ${log_size} 1) = $(shorten ${log_total} 1)"
|
||||
name_val "Log Buffer Size" \
|
||||
"$(shorten $(get_var innodb_log_buffer_size "$variables_file") 0)"
|
||||
name_val "Flush Method" \
|
||||
|
||||
@@ -183,7 +183,7 @@ parse_memory_sysctl_netbsd() { local PTFUNCNAME=parse_memory_sysctl_netbsd;
|
||||
|
||||
[ -e "$file" -a -e "$swapctl_file" ] || return
|
||||
|
||||
local swap_mem="$(echo "$(awk '{print $2;}' "$swapctl_file")*512" | bc -l)"
|
||||
local swap_mem="$(awk '{print $2*512}' "$swapctl_file")"
|
||||
name_val "Total" $(shorten "$(awk '/hw.physmem /{print $NF}' "$file")" 1)
|
||||
name_val "User" $(shorten "$(awk '/hw.usermem /{print $NF}' "$file")" 1)
|
||||
name_val "Swap" $(shorten ${swap_mem} 1)
|
||||
@@ -198,7 +198,7 @@ parse_memory_sysctl_openbsd() { local PTFUNCNAME=parse_memory_sysctl_openbsd;
|
||||
|
||||
[ -e "$file" -a -e "$swapctl_file" ] || return
|
||||
|
||||
local swap_mem="$(echo "$(awk '{print $2;}' "$swapctl_file")*512" | bc -l)"
|
||||
local swap_mem="$(awk '{print $2*512}' "$swapctl_file")"
|
||||
name_val "Total" $(shorten "$(awk -F= '/hw.physmem/{print $2}' "$file")" 1)
|
||||
name_val "User" $(shorten "$(awk -F= '/hw.usermem/{print $2}' "$file")" 1)
|
||||
name_val "Swap" $(shorten ${swap_mem} 1)
|
||||
|
||||
Reference in New Issue
Block a user