diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2019-02-27 18:48:35 +0100 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2019-02-27 18:48:35 +0100 |
commit | e8bd07f81bc31569a6e1703ed95f3686361017ed (patch) | |
tree | f05559bfc33ea4d2fc35337c230842ccd4c980b6 | |
parent | 84f0d95bf6672d2426caeb1ac66d6dae119a2f5f (diff) | |
download | psutil-e8bd07f81bc31569a6e1703ed95f3686361017ed.tar.gz |
update doc
-rw-r--r-- | DEVGUIDE.rst | 21 | ||||
-rw-r--r-- | INSTALL.rst | 33 | ||||
-rw-r--r-- | README.rst | 26 | ||||
-rw-r--r-- | scripts/internal/print_access_denied.py | 2 | ||||
-rw-r--r-- | scripts/internal/print_api_speed.py | 2 |
5 files changed, 27 insertions, 57 deletions
diff --git a/DEVGUIDE.rst b/DEVGUIDE.rst index 1b056198..1d1baf1f 100644 --- a/DEVGUIDE.rst +++ b/DEVGUIDE.rst @@ -1,4 +1,3 @@ -======================= Setup and running tests ======================= @@ -31,7 +30,6 @@ If you plan on hacking on psutil this is what you're supposed to do first: "edit" mode; also ``make setup-dev-env`` installs deps as a limited user. - use `make help` to see the list of available commands. -============ Coding style ============ @@ -40,7 +38,6 @@ Coding style - C code strictly follows `PEP 7 <https://www.python.org/dev/peps/pep-0007/>`_ styling guides. -======== Makefile ======== @@ -87,7 +84,6 @@ On Windows: set TSCRIPT=foo.py && make test -==================== Adding a new feature ==================== @@ -120,7 +116,6 @@ Typical process occurring when adding a new functionality (API): - update ``README.rst`` (if necessary). - make a pull request. -=================== Make a pull request =================== @@ -130,7 +125,6 @@ Make a pull request - push to the branch (``git push origin my-new-feature``) - create a new pull request -====================== Continuous integration ====================== @@ -175,7 +169,6 @@ An icon in the home page (README) always shows the last coverage percentage: :target: https://coveralls.io/github/giampaolo/psutil?branch=master :alt: Test coverage (coverall.io) -============= Documentation ============= @@ -185,7 +178,6 @@ Documentation - doc can be built with ``make setup-dev-env; cd docs; make html``. - public doc is hosted on http://psutil.readthedocs.io/ -======================= Releasing a new version ======================= @@ -194,16 +186,3 @@ These are notes for myself (Giampaolo): - ``make release`` - post announce (``make print-announce``) on psutil and python-announce mailing lists, twitter, g+, blog. - -============= -FreeBSD notes -============= - -- setup: - -.. code-block:: bash - - pkg install python python3 gcc git vim screen bash - chsh -s /usr/local/bin/bash user # set bash as default shell - -- ``/usr/src`` contains the source codes for all installed CLI tools (grep in it). diff --git a/INSTALL.rst b/INSTALL.rst index aaa1b87f..b2e89414 100644 --- a/INSTALL.rst +++ b/INSTALL.rst @@ -1,9 +1,8 @@ Install pip =========== -pip is the easiest way to install psutil. -It is shipped by default with Python 2.7.9+ and 3.4+. For other Python versions -you can install it manually. +pip is the easiest way to install psutil. It is shipped by default with Python +2.7.9+ and 3.4+. For other Python versions you can install it manually. On Linux or via wget: .. code-block:: bash @@ -74,19 +73,19 @@ first, then: Windows ======= -The easiest way to install psutil on Windows is to just use the pre-compiled -exe/wheel installers hosted on -`PyPI <https://pypi.org/project/psutil/#files>`__ via pip: +Open a cmd.exe shell and run: -.. code-block:: bat +.. code-block:: + + python -m pip install psutil - C:\Python27\python.exe -m pip install psutil +This assumes "python" is in your PATH. If not, specify the full python.exe +path. -If you want to compile psutil from sources you'll need **Visual Studio** -(Mingw32 is no longer supported), which really is a mess. -The VS versions are the onle listed below. +In order to compile psutil from sources you'll need **Visual Studio** (Mingw32 +is not supported). This `blog post <https://blog.ionelmc.ro/2014/12/21/compiling-python-extensions-on-windows/>`__ -provides numerous info on how to properly set up VS (good luck with that). +provides numerous info on how to properly set up VS. The needed VS versions are: * Python 2.6, 2.7: `VS-2008 <http://www.microsoft.com/en-us/download/details.aspx?id=44266>`__ * Python 3.4: `VS-2010 <http://www.visualstudio.com/downloads/download-visual-studio-vs#d-2010-express>`__ @@ -94,14 +93,14 @@ provides numerous info on how to properly set up VS (good luck with that). Compiling 64 bit versions of Python 2.6 and 2.7 with VS 2008 requires `Windows SDK and .NET Framework 3.5 SP1 <https://www.microsoft.com/en-us/download/details.aspx?id=3138>`__. -Once installed run vcvars64.bat, then you can finally compile (see -`here <http://stackoverflow.com/questions/11072521/>`__). -To compile / install psutil from sources on Windows run: +Once installed run `vcvars64.bat` +(see `here <http://stackoverflow.com/questions/11072521/>`__). +Once VS is setup open a cmd.exe shell, cd into psutil directory and run: .. code-block:: bat - make.bat build - make.bat install + python setup.py build + python setup.py install FreeBSD ======= @@ -60,7 +60,7 @@ psutil currently supports the following platforms: - **Linux** - **Windows** -- **macOS**, +- **macOS** - **FreeBSD, OpenBSD**, **NetBSD** - **Sun Solaris** - **AIX** @@ -139,7 +139,7 @@ Example usages This represents pretty much the whole psutil API. CPU -=== +--- .. code-block:: python @@ -182,7 +182,7 @@ CPU >>> Memory -====== +------ .. code-block:: python @@ -193,7 +193,7 @@ Memory >>> Disks -===== +----- .. code-block:: python @@ -209,7 +209,7 @@ Disks >>> Network -======= +------- .. code-block:: python @@ -236,7 +236,7 @@ Network >>> Sensors -======= +------- .. code-block:: python @@ -255,7 +255,7 @@ Sensors >>> Other system info -================= +----------------- .. code-block:: python @@ -269,7 +269,7 @@ Other system info >>> Process management -================== +------------------ .. code-block:: python @@ -405,7 +405,7 @@ Process management >>> Further process APIs -==================== +-------------------- .. code-block:: python @@ -446,7 +446,7 @@ Popen wrapper: >>> Windows services -================ +---------------- .. code-block:: python @@ -466,9 +466,3 @@ Windows services 'start_type': 'manual', 'status': 'stopped', 'username': 'NT AUTHORITY\\LocalService'} - -Other samples -============= - -See `doc recipes <http://psutil.readthedocs.io/#recipes>`__ and -`demo scritps <https://github.com/giampaolo/psutil/tree/master/scripts>`__. diff --git a/scripts/internal/print_access_denied.py b/scripts/internal/print_access_denied.py index a098a72b..1519c94b 100644 --- a/scripts/internal/print_access_denied.py +++ b/scripts/internal/print_access_denied.py @@ -80,8 +80,6 @@ def main(): s = hilite(s, ok=not ads) print(s) print("-" * 50) - # print("total: %s AccessDenied errors (%s total processes)" % ( - # tot_ads, tot_procs)) print("Totals: access-denied=%s, calls=%s, processes=%s" % ( tot_ads, tot_calls, tot_procs)) diff --git a/scripts/internal/print_api_speed.py b/scripts/internal/print_api_speed.py index 12040dcf..a99293c4 100644 --- a/scripts/internal/print_api_speed.py +++ b/scripts/internal/print_api_speed.py @@ -6,7 +6,7 @@ """Benchmark all API calls. -$ python scripts/internal/print_api_speed.py +$ make print_api_speed SYSTEM APIS SECONDS ---------------------------------- boot_time 0.000140 |