{ "info": { "author": "Marc Herndon", "author_email": "Herndon.MarcT@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "===========\npySMART\n===========\nCopyright (C) 2015 Marc Herndon\n\npySMART is a simple Python wrapper for the ``smartctl`` component of\n``smartmontools``. It is officially compatible with Linux, Windows and FreeBSD,\nas long as smartctl is on the system path. Running with administrative rights\nis strongly recommended, as smartctl cannot accurately detect all device types\nor parse all SMART information 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\nAdditionally I would like to thank iXsystems, Inc., the team behind the amazing\nFreeNAS and TrueNAS products. Several years ago that team approached me with an\ninterest in pySMART, though I have no other affiliation with the company. At\ntheir request I made a simple change to allow pySMART to run on FreeBSD and\nchanged the license from GPL to LGPL to allow them to build upon my work and\nincorporate it into their products. They began hosting the code on their github,\nand in the intervening years they've taken the project to all new heights.\nBecause of their work the code is now Python 3 compatible, supports NVME hardware\ndevices, and has several other improvements and bug fixes.\n\nThis version 1.0 is simply a download and repackaging for PyPI of the code on\nthe FreeNAS github, found at https://github.com/freenas/py-SMART, as of 9 Aug, 2019.\nThis will almost surely be the last version of pySMART on pyPI, as neither I nor\nthe iXsystems team have worked on this project in over a year.\n\nFinal Note on Licensing\n=======================\nAt the request of several companies seeking to use this code in their products,\nthe license has been changed from GPL to the slightly more permissive LGPL.\nThis should allow you to call into pySMART as a library as use it as-is in your\nown project without fear of \"GPL contamination\". If you are reading this and\nthinking that the license is still too restrictive, please contact me. I am very\nwilling to make the code available privately under a more permissive license,\nincluding for some corporate or commercial uses. I'd just like for you to say hello\nfirst, and tell me a bit about your project and how pySMART could fit into it. \n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/freenas/py-SMART", "keywords": "", "license": "GNU LGPLv2.1.html", "maintainer": "", "maintainer_email": "", "name": "pySMART", "package_url": "https://pypi.org/project/pySMART/", "platform": "", "project_url": "https://pypi.org/project/pySMART/", "project_urls": { "Homepage": "https://github.com/freenas/py-SMART" }, "release_url": "https://pypi.org/project/pySMART/1.0/", "requires_dist": null, "requires_python": "", "summary": "Wrapper for smartctl (smartmontools)", "version": "1.0" }, "last_serial": 5657458, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "5eca88b45261dc8fbae2ac813f5562f4", "sha256": "172c9ce8317cde2c6bcb449d96a6b5c98696db70a3f44be5f65368efc6299404" }, "downloads": -1, "filename": "pySMART-0.1.zip", "has_sig": false, "md5_digest": "5eca88b45261dc8fbae2ac813f5562f4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 100785, "upload_time": "2014-12-25T05:59:37", "url": "https://files.pythonhosted.org/packages/dd/23/070630369375bcb492547a5c6bab0f8a95c17bdc9c8ea5c6a8ec51f41968/pySMART-0.1.zip" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "2049302179747bb8a21601106abc3461", "sha256": "966ca08e864f95bb4b410fc92c02683ce66fc0acff02e5debff1499a60383636" }, "downloads": -1, "filename": "pySMART-0.2.zip", "has_sig": false, "md5_digest": "2049302179747bb8a21601106abc3461", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 116880, "upload_time": "2015-01-14T01:47:16", "url": "https://files.pythonhosted.org/packages/cd/ec/c843bdcc1ea1a899db405295d68ff3bc3ef8eaf0c7394941a30d5037e33e/pySMART-0.2.zip" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "7e5c7ba3ae9d79d1c5ce60f16b03f24f", "sha256": "d4a13d4facc23d8878358994cd355398836a616acc78e285a40d626cecd0817f" }, "downloads": -1, "filename": "pySMART-0.3.zip", "has_sig": false, "md5_digest": "7e5c7ba3ae9d79d1c5ce60f16b03f24f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 117798, "upload_time": "2015-06-11T04:48:25", "url": "https://files.pythonhosted.org/packages/ea/68/bdfdd6cbe8368d493faa7351f3aad5ee7e2792480090738804ca54352ea6/pySMART-0.3.zip" } ], "1.0": [ { "comment_text": "", "digests": { "md5": "6fd107e5a28f4281c5f5184a70053d13", "sha256": "92b3ad1d85e4b9fbb7ab315788b3160bd379fcf542bdff64510a1de38864d541" }, "downloads": -1, "filename": "pySMART-1.0.tar.gz", "has_sig": false, "md5_digest": "6fd107e5a28f4281c5f5184a70053d13", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 92802, "upload_time": "2019-08-09T19:18:27", "url": "https://files.pythonhosted.org/packages/6d/f1/99f5fea186a472525f3b680fc0a01a75cc8d4444343917bcf5cc9ac09e6f/pySMART-1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6fd107e5a28f4281c5f5184a70053d13", "sha256": "92b3ad1d85e4b9fbb7ab315788b3160bd379fcf542bdff64510a1de38864d541" }, "downloads": -1, "filename": "pySMART-1.0.tar.gz", "has_sig": false, "md5_digest": "6fd107e5a28f4281c5f5184a70053d13", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 92802, "upload_time": "2019-08-09T19:18:27", "url": "https://files.pythonhosted.org/packages/6d/f1/99f5fea186a472525f3b680fc0a01a75cc8d4444343917bcf5cc9ac09e6f/pySMART-1.0.tar.gz" } ] }