summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2016-09-18 18:04:44 +0200
committerGiampaolo Rodola <g.rodola@gmail.com>2016-09-18 18:04:44 +0200
commitbd36e0b4c4d8f8eb8073e9e164744355a5f06ccf (patch)
tree4e02879e238af3fafaf5c6b00ed13e37756a8543
parent559270e5d7d36707995e2ddf99e3b9b80fba9f85 (diff)
downloadpsutil-bd36e0b4c4d8f8eb8073e9e164744355a5f06ccf.tar.gz
update doc
-rw-r--r--HISTORY.rst4
-rw-r--r--docs/index.rst7
-rw-r--r--psutil/tests/test_linux.py2
3 files changed, 9 insertions, 4 deletions
diff --git a/HISTORY.rst b/HISTORY.rst
index b5775bfd..8104e174 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -1,7 +1,7 @@
Bug tracker at https://github.com/giampaolo/psutil/issues
-4.3.2 - XXXX-XX-XX
+4.4.0 - XXXX-XX-XX
==================
**Bug fixes**
@@ -10,6 +10,8 @@ Bug tracker at https://github.com/giampaolo/psutil/issues
- #880: [Windows] Handle race condition inside psutil_net_connections.
- #885: ValueError is raised if a negative integer is passed to cpu_percent()
functions.
+- #887: [Linux] free, available and used fields are more precise and match
+ "free" cmdline utility.
4.3.1 - 2016-09-01
diff --git a/docs/index.rst b/docs/index.rst
index fa83aefa..d64ab43a 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -178,8 +178,8 @@ Memory
- **available**: the actual amount of available memory that can be given
instantly to processes that request more memory in bytes; this is
calculated by summing different memory values depending on the platform
- (e.g. ``(free + buffers + cached)`` on Linux) and it is supposed to be used
- to monitor actual memory usage in a cross platform fashion.
+ and it is supposed to be used to monitor actual memory usage in a cross
+ platform fashion.
- **percent**: the percentage usage calculated as
``(total - available) / total * 100``.
- **used**: memory used, calculated differently depending on the platform and
@@ -221,6 +221,9 @@ Memory
.. versionchanged:: 4.2.0 added *shared* metrics on Linux.
+ .. versionchanged:: 4.4.0 on Linux, *free*, *available* and *used* fields
+ are more precise and match "free" cmdline utility.
+
.. function:: swap_memory()
Return system swap memory statistics as a namedtuple including the following
diff --git a/psutil/tests/test_linux.py b/psutil/tests/test_linux.py
index 9fa72320..a6b5d3f3 100644
--- a/psutil/tests/test_linux.py
+++ b/psutil/tests/test_linux.py
@@ -159,7 +159,7 @@ class TestSystemVirtualMemory(unittest.TestCase):
# https://gitlab.com/procps-ng/procps/commit/
# 05d751c4f076a2f0118b914c5e51cfbb4762ad8e
@unittest.skipUnless(
- get_free_version_info() >= (3, 3, 12), "old free version")
+ LINUX and get_free_version_info() >= (3, 3, 12), "old free version")
@retry_before_failing()
def test_used(self):
free = free_physmem()