{ "info": { "author": "Marc Herndon", "author_email": "Herndon.MarcT@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "This is pySMART-0.3 by Marc Herndon. It has been adapted to work a little better with python3.4 (it wasn't working with\nPopen.communicate() correctly) and has had the work by Maxim Korobko (https://gitlab.beget.ru/LTD-Beget/pySMART) \nreplicated into it as well.\n\n\n===========\npySMART\n===========\nCopyright (C) 2015 Marc Herndon\n\npySMART is a simple Python wrapper for the ``smartctl`` component of\n``smartmontools``. It works under Linux and Windows, as long as smartctl is on\nthe system path. Running with administrative rights is strongly recommended,\nas smartctl cannot accurately detect all device types or parse all SMART\ninformation without these permissions.\n\nWith only a device's name (ie: /dev/sda, pd0), the package will create a\n``Device`` object, populated with all relevant information about that\ndevice. The documented API can then be used to query this object for\ninformation, initiate self-tests, and perform other functions.\n\nUsage\n=====\nThe most common way to use pySMART is to create a logical representation of the\nphysical storage device that you would like to work with, as shown::\n\n >>> from pySMART import Device\n >>> sda = Device('/dev/sda')\n >>> sda\n \n\n``Device`` class members can be accessed directly, and a number of helper methods\nare provided to retrieve information in bulk. Some examples are shown below::\n\n >>> sda.assessment # Query the SMART self-assessment\n 'PASS'\n >>> sda.attributes[9] # Query a single SMART attribute\n \n >>> sda.all_attributes() # Print the entire SMART attribute table\n ID# ATTRIBUTE_NAME CUR WST THR TYPE UPDATED WHEN_FAIL RAW\n 1 Raw_Read_Error_Rate 200 200 051 Pre-fail Always - 0\n 3 Spin_Up_Time 141 140 021 Pre-fail Always - 3908\n 4 Start_Stop_Count 098 098 000 Old_age Always - 2690\n 5 Reallocated_Sector_Ct 200 200 140 Pre-fail Always - 0\n ... # Edited for brevity\n 199 UDMA_CRC_Error_Count 200 200 000 Old_age Always - 0\n 200 Multi_Zone_Error_Rate 200 200 000 Old_age Offline - 0\n >>> sda.tests[0] # Query the most recent self-test result\n \n >>> sda.all_selftests() # Print the entire self-test log\n ID Test_Description Status Left Hours 1st_Error@LBA\n 1 Short offline Completed without error 00% 23734 -\n 2 Short offline Completed without error 00% 23734 -\n ... # Edited for brevity\n 7 Short offline Completed without error 00% 23726 -\n 8 Short offline Completed without error 00% 1 -\n\nAlternatively, the package provides a ``DeviceList`` class. When instantiated,\nthis will auto-detect all local storage devices and create a list containing\none ``Device`` object for each detected storage device::\n\n >>> from pySMART import DeviceList\n >>> devlist = DeviceList()\n >>> devlist\n \n \n \n >\n >>> devlist.devices[0].attributes[5] # Access Device data as above\n \n\nUsing the pySMART wrapper, Python applications be be rapidly developed to take\nadvantage of the powerful features of smartmontools.\n\nInstallation\n============\n``pySMART`` is available on PyPI and installable via ``pip``::\n\n python -m pip install pySMART\n\nThe only external dependency is the ``smartctl`` component of the smartmontools\npackage. This should be pre-installed in most Linux distributions, or it\ncan be obtained through your package manager. Likely one of the following::\n\n apt-get install smartmontools\n or\n yum install smartmontools\n\nOn Windows PC's, smartmontools must be downloaded and installed. The latest\nversion can be obtained from the project's homepage, http://www.smartmontools.org/.\n\nNote that after installing smartmontools on Windows, the directory containing\n``smartctl.exe`` must be added to the system path, if it is not already.\n\nDocumentation\n=============\nAPI documentation for ``pySMART`` was generated using ``pdoc`` and can be\nfound in the /docs folder within the package archive.\n\nAcknowledgements\n================\nI would like to thank the entire team behind smartmontools for creating and\nmaintaining such a fantastic product.\n\nIn particular I want to thank Christian Franke, who maintains the Windows port\nof the software. For several years I have written Windows batch files that\nrely on smartctl.exe to automate evaluation and testing of large pools of\nstorage devices. Without his work, my job would have been significantly\nmore miserable. :)\n\nHaving recently migrated my script development from Batch to Python for Linux\nportabiity, I thought a simple wrapper for smartctl would save time in the\ndevelopment of future automated test tools.\n\nFinal Note on Licensing\n=======================\nIf you are reading this and thinking that you'd love to use pySMART if only\nit weren't \"restricted\" by GPL licensing, please contact me. I am very\nwilling to make the code available privately under a more permissive\nlicense, including for some corporate or commercial uses. I'd just like for\nyou to say hello first, and tell me a bit about your project and how pySMART\ncould fit into it. Odds are I'd be happy to help.\n\nI've been contacted with similar requests a handful of times previously, so\nI decided to add this note in case there are others out there afraid to ask.", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ilyinon/py.SMART", "keywords": "", "license": "GNU GPLv2.htm", "maintainer": "", "maintainer_email": "", "name": "py.SMART", "package_url": "https://pypi.org/project/py.SMART/", "platform": "", "project_url": "https://pypi.org/project/py.SMART/", "project_urls": { "Homepage": "https://github.com/ilyinon/py.SMART" }, "release_url": "https://pypi.org/project/py.SMART/0.31/", "requires_dist": null, "requires_python": "", "summary": "Wrapper for smartctl (smartmontools)", "version": "0.31" }, "last_serial": 3131588, "releases": { "0.31": [ { "comment_text": "", "digests": { "md5": "62483092bd9d979e7d232564d128cd26", "sha256": "a50e98d807166ab47d5fd37633254659a0345acfae6ecc5d75daf9e40d5bea0c" }, "downloads": -1, "filename": "py.SMART-0.31.tar.gz", "has_sig": false, "md5_digest": "62483092bd9d979e7d232564d128cd26", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17973, "upload_time": "2017-08-29T10:15:43", "url": "https://files.pythonhosted.org/packages/62/5e/1177cfe7e13f210be170099f2131297802339f2a08bf05778be894093c3a/py.SMART-0.31.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "62483092bd9d979e7d232564d128cd26", "sha256": "a50e98d807166ab47d5fd37633254659a0345acfae6ecc5d75daf9e40d5bea0c" }, "downloads": -1, "filename": "py.SMART-0.31.tar.gz", "has_sig": false, "md5_digest": "62483092bd9d979e7d232564d128cd26", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17973, "upload_time": "2017-08-29T10:15:43", "url": "https://files.pythonhosted.org/packages/62/5e/1177cfe7e13f210be170099f2131297802339f2a08bf05778be894093c3a/py.SMART-0.31.tar.gz" } ] }