{ "info": { "author": "Valentin Lorentz", "author_email": "valentin.lorentz+git@ens-lyon.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 1 - Planning", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3", "Topic :: System :: Monitoring" ], "description": "python-powertop\n===============\n\nA wrapper to use `PowerTOP `__ easily in\nPython.\n\nAlso provides a command to get the results as JSON.\n\nInstall\n-------\n\n- install PowerTOP (e.g. ``sudo aptitude install powertop`` on\n Debian-based distributions)\n- ``sudo python3 -m pip install powertop``\n\nShort example\n-------------\n\nRun as root, in a Python 3 shell:\n\n::\n\n import powertop\n import json\n\n measures = powertop.Powertop().get_measures(time=1)\n\n print(json.dumps(measures['Device Power Report'], indent=4))\n\nOr, as a shell command:\n\n::\n\n sudo python3 -m powertop\n\nOutputs:\n\n::\n\n [\n {\n \"Usage\": \"66.4%\",\n \"Device Name\": \"CPU core\"\n },\n {\n \"Usage\": \"66.4%\",\n \"Device Name\": \"DRAM\"\n },\n {\n \"Usage\": \"66.4%\",\n \"Device Name\": \"CPU misc\"\n },\n {\n \"Usage\": \"18.8 ops/s\",\n \"Device Name\": \"GPU misc\"\n },\n {\n \"Usage\": \"18.8 ops/s\",\n \"Device Name\": \"GPU core\"\n },\n ...\n\nHow to use\n----------\n\nFirst, call PowerTOP:\n\n::\n\n import powertop\n\n measures = powertop.Powertop().get_measures(time=1, iterations=1)\n\nSections\n~~~~~~~~\n\nYou can then access sections. They may vary across systems and PowerTOP\nversions.\n\nOn my computer, they are:\n\n- Top 10 Power Consumers\n- Processor Idle State Report\n- Processor Frequency Report\n- Overview of Software Power Consumers\n- Device Power Report\n- Process Device Activity\n- Software Settings in Need of Tuning\n- Untunable Software Issues\n- Optimal Tuned Software Settings\n\nYou can find yours with this command:\n\n::\n\n sudo python3 -c \"import powertop; measures = powertop.Powertop().get_measures(time=1); print(measures.keys())\"\n\nReading sections\n~~~~~~~~~~~~~~~~\n\nEach section is a list JSON-like data (strings, lists and dicts).\n\nRun ``sudo python3 -m powertop`` to get a taste of what it looks like.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ProgVal/python-powertop", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "powertop", "package_url": "https://pypi.org/project/powertop/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/powertop/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/ProgVal/python-powertop" }, "release_url": "https://pypi.org/project/powertop/0.2.2/", "requires_dist": null, "requires_python": null, "summary": "Small wrapper to use PowerTOP in Python", "version": "0.2.2" }, "last_serial": 2114107, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "4275713c3011d5d5247faaff8947c8a5", "sha256": "209d76992ab7d8dff57b78b9372d4fc6b52a0906b6a00703430c67f454008ab8" }, "downloads": -1, "filename": "powertop-0.1.tar.gz", "has_sig": true, "md5_digest": "4275713c3011d5d5247faaff8947c8a5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1995, "upload_time": "2016-04-12T13:23:58", "url": "https://files.pythonhosted.org/packages/a1/df/a365a6d52282772e6b49d86b219d361d7b5435023022d3286369776fb7e5/powertop-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "aa4e383824029e915cb6ac84dd44a607", "sha256": "154bad67ed57ac5e943c8599d83f50ef83b748f904849207bbe6397ba42b8f9f" }, "downloads": -1, "filename": "powertop-0.1.1.tar.gz", "has_sig": true, "md5_digest": "aa4e383824029e915cb6ac84dd44a607", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2091, "upload_time": "2016-04-13T08:23:54", "url": "https://files.pythonhosted.org/packages/74/4f/f3f7b9d167a17a0a4a172592aa0f820d5a09b7d716ab35f4b65ab5f1f259/powertop-0.1.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "d0dbb21bc817037665a33acefa686aa1", "sha256": "58975a404182bdf38cf7b3aba45b74c7af3dd12a14cbdcb4ab695f1dd631551a" }, "downloads": -1, "filename": "powertop-0.2.tar.gz", "has_sig": true, "md5_digest": "d0dbb21bc817037665a33acefa686aa1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2914, "upload_time": "2016-04-13T10:43:20", "url": "https://files.pythonhosted.org/packages/9e/a1/cff6f5aca6334c4098cadeb45a8f942d2db3c885f44bfb4e6f3033e34d1c/powertop-0.2.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "b726ec3ca84cbeedefa8ec4460412efb", "sha256": "f7c5f40dffc0b12f530fd7c653c48e5f02b1c8953e432f5cea9fb6c0ed171c07" }, "downloads": -1, "filename": "powertop-0.2.1.tar.gz", "has_sig": true, "md5_digest": "b726ec3ca84cbeedefa8ec4460412efb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3164, "upload_time": "2016-04-13T11:25:39", "url": "https://files.pythonhosted.org/packages/6c/9b/52637a6764109ade4c13a8148d6d7c2f8519b935c4103f82470bcee9026c/powertop-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "3e280bb86930ce355699f8d5c3f8437b", "sha256": "40ecca06976d114fdb1ea9316a3c3fe14262e09a7a706fd7fe63175d3680117d" }, "downloads": -1, "filename": "powertop-0.2.2.tar.gz", "has_sig": true, "md5_digest": "3e280bb86930ce355699f8d5c3f8437b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3192, "upload_time": "2016-04-13T11:30:02", "url": "https://files.pythonhosted.org/packages/88/3e/6df31a184daf7cca429f2563fe6903ea2fbeafb363aef3d5a25a32a6bd91/powertop-0.2.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3e280bb86930ce355699f8d5c3f8437b", "sha256": "40ecca06976d114fdb1ea9316a3c3fe14262e09a7a706fd7fe63175d3680117d" }, "downloads": -1, "filename": "powertop-0.2.2.tar.gz", "has_sig": true, "md5_digest": "3e280bb86930ce355699f8d5c3f8437b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3192, "upload_time": "2016-04-13T11:30:02", "url": "https://files.pythonhosted.org/packages/88/3e/6df31a184daf7cca429f2563fe6903ea2fbeafb363aef3d5a25a32a6bd91/powertop-0.2.2.tar.gz" } ] }