Mailinglist Archive: opensuse-bugs (13227 mails)
| < Previous | Next > |
[Bug 405246] New: Free memory reported by free, vmstat and top is wrong.
- From: bugzilla_noreply@xxxxxxxxxx
- Date: Tue, 1 Jul 2008 00:19:31 -0600 (MDT)
- Message-id: <bug-405246-21960@xxxxxxxxxxxxxxxxxxxxxxxxx/>
https://bugzilla.novell.com/show_bug.cgi?id=405246
Summary: Free memory reported by free, vmstat and top is wrong.
Product: openSUSE 11.0
Version: Final
Platform: x86-64
OS/Version: openSUSE 11.0
Status: NEW
Severity: Major
Priority: P5 - None
Component: Basesystem
AssignedTo: bnc-team-screening@xxxxxxxxxxxxxxxxxxxxxx
ReportedBy: bart.vanassche@xxxxxxxxx
QAContact: qa@xxxxxxx
Found By: Customer
The "free memory -/+ buffers/cache" value as displayed by the free, vmstat and
top tools is wrong because these tools do not take the most recently introduced
fields of /proc/meminfo into account. An example of the output of free:
$ free
total used free shared buffers cached
Mem: 2060680 566836 1493844 0 16048 265784
-/+ buffers/cache: 285004 1775676
Swap: 2104472 0 2104472
The correct values are on the test system are:
$ /usr/bin/awk </proc/meminfo
'/^MemTotal/{t=$2}/^MemFree/{f=$2}/^Buffers:/{b=$2}/^Cached:/{c=$2}/^SwapCached:/{sc=$2}/^SReclaimable:/{sr=$2}'\
'END{print "Total: " t " KB, in use: " t-f-b-c-sc-sr ", free: " f+b+c+sc+sr "
KB."}'
Total: 2060680 KB, in use: 270548, free: 1790132 KB.
For a patch which fixes all three tools at once, see also:
http://marc.info/?l=linux-mm&m=120496901605830&w=2
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
Summary: Free memory reported by free, vmstat and top is wrong.
Product: openSUSE 11.0
Version: Final
Platform: x86-64
OS/Version: openSUSE 11.0
Status: NEW
Severity: Major
Priority: P5 - None
Component: Basesystem
AssignedTo: bnc-team-screening@xxxxxxxxxxxxxxxxxxxxxx
ReportedBy: bart.vanassche@xxxxxxxxx
QAContact: qa@xxxxxxx
Found By: Customer
The "free memory -/+ buffers/cache" value as displayed by the free, vmstat and
top tools is wrong because these tools do not take the most recently introduced
fields of /proc/meminfo into account. An example of the output of free:
$ free
total used free shared buffers cached
Mem: 2060680 566836 1493844 0 16048 265784
-/+ buffers/cache: 285004 1775676
Swap: 2104472 0 2104472
The correct values are on the test system are:
$ /usr/bin/awk </proc/meminfo
'/^MemTotal/{t=$2}/^MemFree/{f=$2}/^Buffers:/{b=$2}/^Cached:/{c=$2}/^SwapCached:/{sc=$2}/^SReclaimable:/{sr=$2}'\
'END{print "Total: " t " KB, in use: " t-f-b-c-sc-sr ", free: " f+b+c+sc+sr "
KB."}'
Total: 2060680 KB, in use: 270548, free: 1790132 KB.
For a patch which fixes all three tools at once, see also:
http://marc.info/?l=linux-mm&m=120496901605830&w=2
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
| < Previous | Next > |