summaryrefslogtreecommitdiff
path: root/docs/index.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/index.rst')
-rw-r--r--docs/index.rst15
1 files changed, 9 insertions, 6 deletions
diff --git a/docs/index.rst b/docs/index.rst
index dfca444d..2a1c5b6a 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -334,18 +334,20 @@ Memory
.. function:: virtual_memory()
Return statistics about system memory usage as a named tuple including the
- following fields, expressed in bytes. Main metrics:
+ following fields, expressed in bytes.
+
+ Main metrics:
- **total**: total physical memory (exclusive swap).
- **available**: the memory that can be given instantly to processes without
the system going into swap.
- This is calculated by summing different memory values depending on the
- platform and it is supposed to be used to monitor actual memory usage in a
- cross platform fashion.
+ This is calculated by summing different memory metrics that vary depending
+ on the platform. 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``.
Other metrics:
- - **percent**: the percentage usage calculated as ``(total - available) / total * 100``
- **used**: memory used, calculated differently depending on the platform and
designed for informational purposes only. **total - free** does not
necessarily match **used**.
@@ -370,7 +372,8 @@ Memory
human readable form.
.. note:: if you just want to know how much physical memory is left in a
- cross platform fashion simply rely on the **available** field.
+ cross platform fashion simply rely on **available** and **percent**
+ fields.
>>> import psutil
>>> mem = psutil.virtual_memory()