summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2018-09-26 12:59:08 +0200
committerGiampaolo Rodola <g.rodola@gmail.com>2018-09-26 12:59:08 +0200
commit39811bbb989497b04b4bebd927de6c3e806d0e70 (patch)
treeafe51f15cba5749556e5126fc06edba16cf8fe42
parent5e90b0a7f3fccb177445a186cc4fac62cfadb510 (diff)
downloadpsutil-39811bbb989497b04b4bebd927de6c3e806d0e70.tar.gz
fix #1343: document Process.as_dict() attrs values
-rw-r--r--docs/index.rst13
1 files changed, 8 insertions, 5 deletions
diff --git a/docs/index.rst b/docs/index.rst
index 59f76815..a3fca7b5 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -1179,11 +1179,14 @@ Process class
Utility method retrieving multiple process information as a dictionary.
If *attrs* is specified it must be a list of strings reflecting available
- :class:`Process` class's attribute names (e.g. ``['cpu_times', 'name']``),
- else all public (read only) attributes are assumed. *ad_value* is the
- value which gets assigned to a dict key in case :class:`AccessDenied`
- or :class:`ZombieProcess` exception is raised when retrieving that
- particular process information.
+ :class:`Process` class's attribute names. Here's a list of possible string
+ values:
+ ``'cmdline'``, ``'connections'``, ``'cpu_affinity'``, ``'cpu_num'``, ``'cpu_percent'``, ``'cpu_times'``, ``'create_time'``, ``'cwd'``, ``'environ'``, ``'exe'``, ``'gids'``, ``'io_counters'``, ``'ionice'``, ``'memory_full_info'``, ``'memory_info'``, ``'memory_maps'``, ``'memory_percent'``, ``'name'``, ``'nice'``, ``'num_ctx_switches'``, ``'num_fds'``, ``'num_handles'``, ``'num_threads'``, ``'open_files'``, ``'pid'``, ``'ppid'``, ``'status'``, ``'terminal'``, ``'threads'``, ``'uids'``, ``'username'```.
+ If *attrs* argument is not passed all public read only attributes are
+ assumed.
+ *ad_value* is the value which gets assigned to a dict key in case
+ :class:`AccessDenied` or :class:`ZombieProcess` exception is raised when
+ retrieving that particular process information.
Internally, :meth:`as_dict` uses :meth:`oneshot` context manager so
there's no need you use it also.