landscape-sysinfo reports wrong memory utilization

Bug #1075619 reported by Phillip Susi
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Landscape Client
Fix Released
Undecided
Unassigned
landscape-client (Ubuntu)
Fix Released
Medium
Phillip Susi

Bug Description

The reported percentage bears no relationship to actual:

psusi@devserv:~$ landscape-sysinfo
  System load: 0.01 Processes: 105
  Usage of /: 66.1% of 18.33GB Users logged in: 1
  Memory usage: 24% IP address for br0: 10.1.1.4
  Swap usage: 0%

  Graph this data and manage this system at https://landscape.canonical.com/
psusi@devserv:~$ free -m
             total used free shared buffers cached
Mem: 2012 1494 517 0 153 1183
-/+ buffers/cache: 157 1854
Swap: 0 0 0

psusi@devserv:~$ apt-cache policy landscape-common
landscape-common:
  Installed: 12.04.3-0ubuntu1
  Candidate: 12.04.3-0ubuntu1
  Version table:
 *** 12.04.3-0ubuntu1 0
        500 http://us.archive.ubuntu.com/ubuntu/ precise/main i386 Packages
        100 /var/lib/dpkg/status

Related branches

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Can you please paste or attach an up-to-date output of landscape-sysinfo together with the contents of /proc/meminfo?

landscape-sysinfo uses the contents of /proc/meminfo to calculate the memory usage value.

Revision history for this message
John (parasluco) wrote :

Interesting, I just asked about this on AskUbuntu but I tihnk I figured out the issue.

/proc/meminfo reports the same memory info that landscape-sysinfo does.

Here's the thing, 'free' reports a lot of memory info. To get the data supplied by 'free' to match both landscape-sysinfo and /proc/meminfo, the calculation is:

(used - [-/+ buffers/cache]) / total

the -/+ buffers/cache value is the one right below 'used'

Now your % free should match what is reported by landscape-sysinfo

Revision history for this message
Franck (alci) wrote :

So this is not a real bug. It's rather a question, something like "How does memory usage reported by /proc/meminfo or landscape-sysinfo relate to the one provided by the command 'free' "

Changed in landscape-client (Ubuntu):
status: New → Invalid
Revision history for this message
Phillip Susi (psusi) wrote :

That's not what I'm seeing John; the amount reported by landscape-sysinfo does not appear to match either with or without counting buffers/cache.

free also gets its info from /proc/meminfo, but here's the full thing:

MemTotal: 2060368 kB
MemFree: 518948 kB
Buffers: 160748 kB
Cached: 1213604 kB
SwapCached: 0 kB
Active: 498024 kB
Inactive: 940096 kB
Active(anon): 63896 kB
Inactive(anon): 508 kB
Active(file): 434128 kB
Inactive(file): 939588 kB
Unevictable: 0 kB
Mlocked: 0 kB
HighTotal: 1182600 kB
HighFree: 15388 kB
LowTotal: 877768 kB
LowFree: 503560 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 32 kB
Writeback: 0 kB
AnonPages: 63684 kB
Mapped: 13580 kB
Shmem: 636 kB
Slab: 84508 kB
SReclaimable: 74376 kB
SUnreclaim: 10132 kB
KernelStack: 896 kB
PageTables: 2348 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 1030184 kB
Committed_AS: 115740 kB
VmallocTotal: 122880 kB
VmallocUsed: 3916 kB
VmallocChunk: 100752 kB
HardwareCorrupted: 0 kB
AnonHugePages: 0 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
DirectMap4k: 34808 kB
DirectMap2M: 878592 kB

Revision history for this message
John (parasluco) wrote :

Okay, you're right. I was having the same issue but I saw somewhere to do the calculation I gave you and it worked for me. Doesn' t seem to apply to your server. Hopefully, someone familiar with the subject comes along. For now I changed the status of the bug back to confirmed.

Changed in landscape-client (Ubuntu):
status: Invalid → Confirmed
Revision history for this message
Phillip Susi (psusi) wrote :

No, it is a bug, not a question. The value being reported is not correct.

Revision history for this message
Phillip Susi (psusi) wrote :

It appears that ladscape is calculating the amount of free memory by subtracting the active list from the total, which is wildly incorrect. Patching now.

Changed in landscape-client (Ubuntu):
assignee: nobody → Phillip Susi (psusi)
status: Confirmed → In Progress
importance: Undecided → Medium
Changed in landscape-client:
milestone: none → 12.12
milestone: 12.12 → 13.01
Changed in landscape-client:
milestone: 13.01 → 13.02
Phillip Susi (psusi)
Changed in landscape-client:
status: New → Fix Committed
Changed in landscape-client:
status: Fix Committed → Fix Released
David Britton (dpb)
Changed in landscape-client (Ubuntu):
status: In Progress → Fix Released
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.