mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-02 02:34:19 +00:00
Merge pull request #140 from akopytov/2.2
Add CPU cache configuration info to pt-summary.
This commit is contained in:
@@ -238,6 +238,27 @@ parse_dmidecode_mem_devices () { local PTFUNCNAME=parse_dmidecode_mem_devices;
|
||||
| awk -F'|' '{printf(" %-9s %-8s %-17s %-13s %-13s %-8s\n", $4, $2, $7, $3, $5, $6);}'
|
||||
}
|
||||
|
||||
# ##############################################################################
|
||||
# Parse CPU cache from the output of 'dmidecode'.
|
||||
# ##############################################################################
|
||||
parse_dmidecode_cache_info () { local PTFUNCNAME=parse_dmidecode_cache_info;
|
||||
local file="$1"
|
||||
|
||||
[ -e "$file" ] || return
|
||||
|
||||
echo " Designation Configuration Size Associativity"
|
||||
echo " ========================= ============================== ======== ======================"
|
||||
sed -e '/./{H;$!d;}' \
|
||||
-e 'x;/Cache Information\n/!d;' \
|
||||
-e 's/: /:/g' \
|
||||
-e 's/</{/g' \
|
||||
-e 's/>/}/g' \
|
||||
-e 's/[ \t]*\n/\n/g' \
|
||||
"${file}" \
|
||||
| awk -F: '/Socket Designation|Configuration|Installed Size/{printf("|%s", $2)}/^[\t ]+Associativity/{print "|" $2}' \
|
||||
| awk -F'|' '{printf(" %-25s %-30s %-8s %-22s\n", $2, $3, $4, $5);}'
|
||||
}
|
||||
|
||||
# ##############################################################################
|
||||
# Parse the output of 'numactl'.
|
||||
# ##############################################################################
|
||||
@@ -863,6 +884,10 @@ section_Processor () {
|
||||
parse_psrinfo_cpus "$data_dir/psrinfo_minus_v"
|
||||
# TODO: prtconf -v actually prints the CPU model name etc.
|
||||
fi
|
||||
|
||||
if [ -s "$data_dir/dmidecode" ]; then
|
||||
parse_dmidecode_cache_info "$data_dir/dmidecode"
|
||||
fi
|
||||
}
|
||||
|
||||
section_Memory () {
|
||||
|
Reference in New Issue
Block a user