Details
-
Bug
-
Status: Done
-
High
-
Resolution: Fixed
-
None
-
None
-
Yes
-
Yes
-
1
Description
User impact:
- Data about memory provided by pt-summary are not reliable and this complicates and confuses troubleshooting
Original reports:
**Reported in Launchpad by Tibor Korocz last update 22-11-2016 19:38:12
Hi,
On a server with 256G memory pt-summary reports 2.5G of memory. See results below:
- free -m
total used free shared buffers cached
Mem: 258207 256696 1510 383 463 32271
-/+ buffers/cache: 223961 34245
Swap: 16383 39 16344
- free -mh
total used free shared buffers cached
Mem: 252G 251G 1.0G 505M 463M 31G
-/+ buffers/cache: 218G 33G
Swap: 15G 39M 15G
- cat /proc/meminfo
MemTotal: 264404376 kB
MemFree: 1231712 kB
Buffers: 474832 kB
Cached: 33537260 kB
SwapCached: 2824 kB
Active: 225141140 kB
Inactive: 34971456 kB
Pt-summary:
- Memory #####################################################
Total | 2.5G
Free | 1.7G
Used | physical = 2.5G, swap allocated = 1.6G, swap used = 39.9M, virtual = 2.5G
Shared | 244.0k
Buffers | 436.0M
Caches | 3.1G
Checking the code :
https://github.com/percona/percona-toolkit/blob/2.2/bin/pt-summary#L1171
We can see pt-summary use `free -b`:
free -b
total used free shared buffers cached
Mem: 2707500810 2700511313 698949632 233472 486223872 3480769740
-/+ buffers/cache: 2347572101 3599287091
Swap: 1717986508 41594880 1713827020
And here we are:
2707500810 bytes is 2.5G.
Not sure this is a bug in the tool or not, but we might can check `meminfo`
results also and if they are not the same, show a warning or something.
Thanks,
Tibi