pt-summary is not showing "shared" memory value
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Fix Released
|
Medium
|
Frank Cizmich |
Bug Description
Memory space used by files inside a partition mounted with the tmpfs filesystem is reported in the "shared" section of the output of the "free" command, as explained in the docs (https:/
"Since tmpfs lives completely in the page cache and on swap, all tmpfs
pages will be shown as "Shmem" in /proc/meminfo and "Shared" in
free(1)."
The "parse_
name_val "Total" $(shorten $(awk '/Mem:/{print $2}' "${file}") 1)
name_val "Free" $(shorten $(awk '/Mem:/{print $4}' "${file}") 1)
name_val "Used" "physical = $(shorten ${physical} 1), swap allocated = $(shorten ${swap_alloc} 1), swap used = $(shorten ${swap_used} 1), virtual = ${virtual}"
name_val "Buffers" $(shorten $(awk '/Mem:/{print $6}' "${file}") 1)
name_val "Caches" $(shorten $(awk '/Mem:/{print $7}' "${file}") 1)
name_val "Dirty" "$(awk '/Dirty:/ {print $2, $3}' "${file}")"
Which, based on the free output, is the fifth column:
total used free shared buffers cached
Mem: 2099093504 1454759936 644333568 1036288 37773312 540282880
-/+ buffers/cache: 876703744 1222389760
Swap: 0 0 0
Fix: Add the following line:
name_val "Shared" $(shorten $(awk '/Mem:/{print $5}' "${file}") 1)
Changed in percona-toolkit: | |
status: | New → Confirmed |
status: | Confirmed → Triaged |
Changed in percona-toolkit: | |
status: | Triaged → Fix Committed |
importance: | Undecided → Medium |
assignee: | nobody → Frank Cizmich (frank-cizmich) |
milestone: | none → 2.2.18 |
Changed in percona-toolkit: | |
status: | Fix Committed → Fix Released |
Percona now uses JIRA for bug reports so this bug report is migrated to: https:/ /jira.percona. com/browse/ PT-702