BIND 10 trac2297, updated. 0aa3d59397af2c127758616bdd93c22d3176d28b [2297] Merge branch 'trac2297' of ssh://git.bind10.isc.org/var/bind10/git/bind10 into trac2297
BIND 10 source code commits
bind10-changes at lists.isc.org
Thu Oct 25 00:16:25 UTC 2012
The branch, trac2297 has been updated
via 0aa3d59397af2c127758616bdd93c22d3176d28b (commit)
via 07085635d4c12c77ac979ea9755d38a2a40f77b4 (commit)
from a4560fb5f2093d4619fb159d77501dd7e6978d35 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 0aa3d59397af2c127758616bdd93c22d3176d28b
Merge: 0708563 a4560fb
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Wed Oct 24 17:16:23 2012 -0700
[2297] Merge branch 'trac2297' of ssh://git.bind10.isc.org/var/bind10/git/bind10 into trac2297
commit 07085635d4c12c77ac979ea9755d38a2a40f77b4
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Wed Oct 24 16:08:02 2012 -0700
[2297] use the size of free-list to identify free memory for FreeBSD
total - active-VM isn't reliable as the former is physical while the latter
is virtual, and sometimes results in a negative value.
-----------------------------------------------------------------------
Summary of changes:
src/lib/python/isc/sysinfo/sysinfo.py | 4 ++--
src/lib/python/isc/sysinfo/tests/sysinfo_test.py | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/python/isc/sysinfo/sysinfo.py b/src/lib/python/isc/sysinfo/sysinfo.py
index fd457ea..d9934f1 100644
--- a/src/lib/python/isc/sysinfo/sysinfo.py
+++ b/src/lib/python/isc/sysinfo/sysinfo.py
@@ -426,11 +426,11 @@ class SysInfoFreeBSD(SysInfoFreeBSDOSX):
pass
try:
+ # We use the size of free-list from the vmstat result.
s = subprocess.check_output(['vmstat', '-H'])
lines = s.decode('utf-8').split('\n')
v = re.split('\s+', lines[2])
- used = int(v[4]) * 1024
- self._mem_free = self._mem_total - used
+ self._mem_free = int(v[5]) * 1024
except (subprocess.CalledProcessError, OSError):
pass
diff --git a/src/lib/python/isc/sysinfo/tests/sysinfo_test.py b/src/lib/python/isc/sysinfo/tests/sysinfo_test.py
index f776053..aa65987 100644
--- a/src/lib/python/isc/sysinfo/tests/sysinfo_test.py
+++ b/src/lib/python/isc/sysinfo/tests/sysinfo_test.py
@@ -427,7 +427,7 @@ class SysInfoTest(unittest.TestCase):
self.assertEqual((0.2, 0.4, 0.6), s.get_loadavg())
self.assertEqual(543214321, s.get_mem_total())
- self.assertEqual(543214321 - (343434 * 1024), s.get_mem_free())
+ self.assertEqual(123456 * 1024, s.get_mem_free())
self.assertEqual(1037533184, s.get_mem_swap_total())
self.assertEqual(1037533184, s.get_mem_swap_free())
More information about the bind10-changes
mailing list