diff options
| author | Giampaolo Rodola <g.rodola@gmail.com> | 2017-01-20 19:16:20 +0100 |
|---|---|---|
| committer | Giampaolo Rodola <g.rodola@gmail.com> | 2017-01-20 19:16:20 +0100 |
| commit | 35e9fdaacb5c4f31edc201ec0e8960ce24a7827e (patch) | |
| tree | bad49b4bc11d1d62c1353a14c5e51b01c20c4796 /docs/index.rst | |
| parent | 17cbdf8b5e6730373a3b8eb9b0d4a8e477a04fee (diff) | |
| download | psutil-35e9fdaacb5c4f31edc201ec0e8960ce24a7827e.tar.gz | |
#941: add doc
Diffstat (limited to 'docs/index.rst')
| -rw-r--r-- | docs/index.rst | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/docs/index.rst b/docs/index.rst index 270124b7..71c0b9c4 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -191,6 +191,32 @@ CPU .. versionadded:: 4.1.0 +.. function:: cpu_freq(percpu=False) + + Return CPU frequency as a nameduple including *current*, *min* and *max* + frequencies expressed in Mhz. + If *percpu* is ``True`` and the system supports per-cpu frequency + retrieval (Linux only) a list of frequencies is returned for each CPU, + if not, a list with a single element is returned. + + Example (Linux): + + .. code-block:: python + + >>> import psutil + >>> psutil.cpu_freq() + scpufreq(current=931.42925, min=800.0, max=3500.0) + >>> psutil.cpu_freq(percpu=True) + [scpufreq(current=2394.945, min=800.0, max=3500.0), + scpufreq(current=2236.812, min=800.0, max=3500.0), + scpufreq(current=1703.609, min=800.0, max=3500.0), + scpufreq(current=1754.289, min=800.0, max=3500.0)] + + Availability: Linux, OSX, Windows + + .. versionadded:: 5.1.0 + + Memory ------ |
