{ "info": { "author": "Corey Goldberg", "author_email": "corey@goldb.org", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.1", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: System :: Monitoring" ], "description": "=============\nlinux-metrics\n=============\n\n*System Metrics/Stats Library for Linux*\n\n* 2010-2013 `Corey Goldberg `_\n* Dev Home: https://github.com/cgoldberg/linux-metrics\n* PyPI: http://pypi.python.org/pypi/linux-metrics\n* Free Open Source : `MIT License `_\n\n.. image:: https://travis-ci.org/cgoldberg/linux-metrics.png\n :target: https://travis-ci.org/cgoldberg/linux-metrics \n\n----\n\n-----------\nDescription\n-----------\n\n`linux-metrics` is a Python package containing modules for getting OS metrics on systems running the Linux kernel. It is a pure python library with no external dependencies.\n\nBasic stats for major subsystems are provided (Processor/CPU, Disk, Memory, Network).\n\n-----------------\nInstall from PyPI\n-----------------\n\n* `pip install linux-metrics`\n \n------------\nRequirements\n------------\n\n* Python 2.6/2.7/3.1/3.2/3.3/PyPy\n* Linux 2.6+\n\n-------------\nExample Usage\n-------------\n\nprint number of processes running::\n\n from linux_metrics import cpu_stat\n\n print cpu_stat.procs_running()\n\nprint CPU utilization every 5 secs::\n\n >>> from linux_metrics import cpu_stat\n >>> \n >>> while True:\n ... cpu_pcts = cpu_stat.cpu_percents(5)\n ... print 'cpu utilization: %.2f%%' % (100 - cpu_pcts['idle'])\n ... \n cpu utilization: 0.70%\n cpu utilization: 0.50%\n cpu utilization: 24.80%\n cpu utilization: 20.89%\n cpu utilization: 40.04%\n\n---\nAPI\n---\n\n::\n\n * linux_metrics\n * cpu_stat\n * cpu_times()\n * cpu_percents(sample_duration=1)\n * procs_running()\n * procs_blocked()\n * load_avg()\n * cpu_info()\n * disk_stat\n * disk_busy(device, sample_duration=1)\n * disk_reads_writes(device)\n * disk_usage(path)\n * disk_reads_writes_persec(device, sample_duration=1)\n * mem_stat\n * mem_stats()\n * net_stat\n * rx_tx_bytes(interface)\n * rx_tx_bits(interface)\n * rx_tx_dump(interface)\n\n-------\nExample\n-------\n\n`linux-metrics` package contains an example script:\n\n* `example.py `_\n\n----------\nUnit Tests\n----------\n\nYou can run the included unit tests and verify all cases pass in your environment:\n\n::\n\n $ nosetests\n\nNote: you may need to adjust the configuration of the unit tests to match your environment. They are set by default to use:\n\n::\n\n DISK_DEVICE = 'sda1'\n \n NETWORK_INTERFACE = 'eth0'", "description_content_type": null, "docs_url": null, "download_url": "http://pypi.python.org/pypi/linux-metrics", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/cgoldberg/linux-metrics", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "linux-metrics", "package_url": "https://pypi.org/project/linux-metrics/", "platform": "Linux", "project_url": "https://pypi.org/project/linux-metrics/", "project_urls": { "Download": "http://pypi.python.org/pypi/linux-metrics", "Homepage": "https://github.com/cgoldberg/linux-metrics" }, "release_url": "https://pypi.org/project/linux-metrics/0.1.4/", "requires_dist": null, "requires_python": null, "summary": "linux-metrics - System Metrics/Stats Library for Linux", "version": "0.1.4" }, "last_serial": 563346, "releases": { "0.1.2": [ { "comment_text": "", "digests": { "md5": "f9ab0d8490dd51e5b2fab3d886b3241c", "sha256": "07d58bbb4bfcf7604831967617b89e4c072a372caf864ff5d02ad7c2a36c564c" }, "downloads": -1, "filename": "linux-metrics-0.1.2.tar.gz", "has_sig": false, "md5_digest": "f9ab0d8490dd51e5b2fab3d886b3241c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5342, "upload_time": "2011-03-21T20:29:06", "url": "https://files.pythonhosted.org/packages/21/c8/c82268bb14e484b3847661d613f9997657d74a85290c9d96a086c3d9365b/linux-metrics-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "42b48b1e7a9d0ab2f455eca6bc6b1205", "sha256": "8089a55e49da467a21bf3fa24ea30405e0b1daa3f578eab6511bf0c2309570a6" }, "downloads": -1, "filename": "linux-metrics-0.1.3.tar.gz", "has_sig": false, "md5_digest": "42b48b1e7a9d0ab2f455eca6bc6b1205", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6200, "upload_time": "2012-04-02T14:06:04", "url": "https://files.pythonhosted.org/packages/5f/ab/a87c6daa45239fd95a54ea70bf5be8bc64255753f4c4f9df3691696fcbcf/linux-metrics-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "ede729393b2fc54d926be8f521c2e082", "sha256": "fc952dcd919447ccdf03b8024ddac750ff7bbf69d246137c4081b015e10c1e86" }, "downloads": -1, "filename": "linux-metrics-0.1.4.tar.gz", "has_sig": false, "md5_digest": "ede729393b2fc54d926be8f521c2e082", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5911, "upload_time": "2013-02-12T15:57:17", "url": "https://files.pythonhosted.org/packages/e5/da/93ef218532c0ce0e72f99ae819af6b8e0ec277c5ce9267c4061b07cde254/linux-metrics-0.1.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ede729393b2fc54d926be8f521c2e082", "sha256": "fc952dcd919447ccdf03b8024ddac750ff7bbf69d246137c4081b015e10c1e86" }, "downloads": -1, "filename": "linux-metrics-0.1.4.tar.gz", "has_sig": false, "md5_digest": "ede729393b2fc54d926be8f521c2e082", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5911, "upload_time": "2013-02-12T15:57:17", "url": "https://files.pythonhosted.org/packages/e5/da/93ef218532c0ce0e72f99ae819af6b8e0ec277c5ce9267c4061b07cde254/linux-metrics-0.1.4.tar.gz" } ] }