diff options
-rw-r--r-- | docs/index.rst | 8 | ||||
-rw-r--r-- | psutil/_pslinux.py | 2 | ||||
-rwxr-xr-x | scripts/meminfo.py | 1 |
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() |