pt-summary reports wrong memory size

Bug #1641635 reported by Tibor Korocz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
Triaged
Medium
Carlos Salguero

Bug Description

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

Tags: pt-summary
Changed in percona-toolkit:
assignee: nobody → Carlos Salguero (carlos-salguero)
importance: Undecided → Medium
status: New → Triaged
milestone: none → 2.2.21
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PT-716

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.