summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2016-09-21 12:45:14 +0200
committerGiampaolo Rodola <g.rodola@gmail.com>2016-09-21 12:45:14 +0200
commite0cea3bc9162d1083c0198d0731c8f734d2eacc0 (patch)
tree53c92201fd08769dc783254d012b387962313b7d
parentb278bf43b76c85560372a567d1af10953b67273f (diff)
downloadpsutil-887-linux-free-mem-standardization.tar.gz
-rw-r--r--docs/index.rst8
-rw-r--r--psutil/_pslinux.py2
-rwxr-xr-xscripts/meminfo.py1
3 files changed, 6 insertions, 5 deletions
diff --git a/docs/index.rst b/docs/index.rst
index 3efc2ccd..76a93558 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -184,12 +184,12 @@ Memory
Other metrics:
- **used**: memory used, calculated differently depending on the platform and
- designed for informational purposes only. ``total - used`` does not
- necessarily match ``available``.
+ designed for informational purposes only. **total - free** does not
+ necessarily match **used**.
- **free**: memory not being used at all (zeroed) that is readily available;
note that this doesn't reflect the actual memory available (use
- ``available`` instead). ``total - free`` does not necessarily match
- ``used``.
+ **available** instead). **total - used** does not necessarily match
+ **free**.
- **active** *(UNIX)*: memory currently in use or very recently used, and so
it is in RAM.
- **inactive** *(UNIX)*: memory that is marked as not used.
diff --git a/psutil/_pslinux.py b/psutil/_pslinux.py
index 4ed20dea..c3750fec 100644
--- a/psutil/_pslinux.py
+++ b/psutil/_pslinux.py
@@ -350,7 +350,7 @@ def virtual_memory():
For reference, procps-ng-3.3.10 is the version available on Ubuntu
16.04.
- Note about "available" memory. Up until psutil 4.3 it was
+ Note about "available" memory: up until psutil 4.3 it was
calculated as "avail = (free + buffers + cached)". Now
"MemAvailable:" column (kernel 3.14) from /proc/meminfo is used as
it's more accurate.
diff --git a/scripts/meminfo.py b/scripts/meminfo.py
index 3546960b..88c3a937 100755
--- a/scripts/meminfo.py
+++ b/scripts/meminfo.py
@@ -64,5 +64,6 @@ def main():
print('\nSWAP\n----')
pprint_ntuple(psutil.swap_memory())
+
if __name__ == '__main__':
main()