{ "info": { "author": "Mike Miller", "author_email": "mixmastamyk@bitbucket.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Win32 (MS Windows)", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)", "Operating System :: Microsoft :: Windows :: Windows 7", "Operating System :: Microsoft :: Windows :: Windows XP", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.5", "Topic :: Software Development :: Libraries", "Topic :: System :: Hardware", "Topic :: System :: Monitoring", "Topic :: System :: Systems Administration" ], "description": "\n\nWindows Stats\n===============\n\nA simple Windows status retrieval module with no additional\ndependencies. Wraps common system status queries from Windows' ugly C-API:\n\n* Memory stats\n* Performance stats\n* Disk info, types, and stats\n* Performance Data Counters (aka PerfMon)\n\nSupports Python 2.6 and above; WindowsXP and above.\n\n*Note:* Relicensed as LGPL v3 (or later).\n\n\nInstall\n-------------\n\n::\n\n D:\\> pip install winstats\n\n\nUse\n-----\n\n**Setup**::\n\n import winstats\n\n # optional\n import locale\n locale.setlocale(locale.LC_ALL, '')\n fmt = lambda n: locale.format('%d', n, True)\n\n**Memory Stats**::\n\n meminfo = winstats.get_mem_info()\n print ' Total: %s b' % fmt(meminfo.TotalPhys)\n print ' usage: %s%%' % fmt(meminfo.MemoryLoad)\n print\n\n**Performance Stats**::\n\n pinfo = winstats.get_perf_info()\n print ' Cache: %s p' % fmt(pinfo.SystemCache)\n print ' Cache: %s b' % fmt(pinfo.SystemCacheBytes)\n print\n\n**Disk Stats**::\n\n drives = winstats.get_drives()\n drive = drives[0]\n fsinfo = winstats.get_fs_usage(drive)\n vinfo = winstats.get_vol_info(drive)\n\n print ' Disks:', ', '.join(drives)\n print ' %s:\\\\' % drive\n print ' Name:', vinfo.name\n print ' Type:', vinfo.fstype\n print ' Total:', fmt(fsinfo.total)\n print ' Used: ', fmt(fsinfo.used)\n print ' Free: ', fmt(fsinfo.free)\n print\n\n**Perfmon - Performance Counters**::\n\n # take a second snapshot 100ms after the first:\n usage = winstats.get_perf_data(r'\\Processor(_Total)\\% Processor Time',\n fmt='double', delay=100)\n print ' CPU Usage: %.02f %%' % usage\n\n # query multiple at once:\n counters = [ r'\\Paging File(_Total)\\% Usage', r'\\Memory\\Available MBytes']\n results = winstats.get_perf_data(counters, fmts='double large'.split())\n print ' Pagefile Usage: %.2f %%, Mem Avail: %s MB' % results\n\n\nResults\n---------\n\nThe examples above are built into the module, and double as a minimal test\nsuite::\n\n D:\\> python.exe -m winstats\n\n Memory Stats:\n Total: 536,330,240 b\n usage: 31%\n\n Performance Stats:\n Cache: 35,921 p\n Cache: 147,132,416 b\n\n Disk Stats:\n Disks: C, D, O\n C:\\\n Name: System\n Type: NTFS\n Total: 10,725,732,352\n Used: 3,160,956,928\n Free: 7,564,775,424\n\n PerfMon queries:\n CPU Usage: 10.00 %\n Pagefile Usage: 0.55 %, Mem Avail: 347 MB\n\nAnd more ...\n", "description_content_type": null, "docs_url": null, "download_url": "https://bitbucket.org/mixmastamyk/winstats/get/default.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/mixmastamyk/winstats", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "winstats", "package_url": "https://pypi.org/project/winstats/", "platform": "", "project_url": "https://pypi.org/project/winstats/", "project_urls": { "Download": "https://bitbucket.org/mixmastamyk/winstats/get/default.tar.gz", "Homepage": "https://bitbucket.org/mixmastamyk/winstats" }, "release_url": "https://pypi.org/project/winstats/0.70/", "requires_dist": null, "requires_python": "", "summary": "A simple Windows status retrieval module with no additional dependencies.", "version": "0.70" }, "last_serial": 3314008, "releases": { "0.61": [ { "comment_text": "", "digests": { "md5": "2c2e6a353c472f7dd38d62ee4529828a", "sha256": "dd4b027b69b4f6b37fc19e84aba426e4d907875a856d5c867a347cc6adb9bf5e" }, "downloads": -1, "filename": "winstats-0.61.tar.gz", "has_sig": false, "md5_digest": "2c2e6a353c472f7dd38d62ee4529828a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5545, "upload_time": "2013-01-24T22:48:28", "url": "https://files.pythonhosted.org/packages/46/26/b67b272bd6a2d5b1a7e483356938a94e74f3bf162d5e2a1d9308cbdca548/winstats-0.61.tar.gz" } ], "0.64": [ { "comment_text": "", "digests": { "md5": "1340968594aa39be6e4aeac39b49e312", "sha256": "a437969cb37d4ea9876b6db49c42f0b40ea2cc5e9f088469be2deb7de252152d" }, "downloads": -1, "filename": "winstats-0.64.tar.gz", "has_sig": false, "md5_digest": "1340968594aa39be6e4aeac39b49e312", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5602, "upload_time": "2013-08-12T21:09:11", "url": "https://files.pythonhosted.org/packages/ef/f5/b486da861184dbbd9733ca97162fbee40445bcfe480903606abd7d03ccbb/winstats-0.64.tar.gz" } ], "0.65": [ { "comment_text": "", "digests": { "md5": "b5f15404aaf1efd897a95ef819246f04", "sha256": "aec8cd2709838d5f9c13c3433bb88a26b3fbe656b8278b7dcbdac2acfc40d342" }, "downloads": -1, "filename": "winstats-0.65.tar.gz", "has_sig": false, "md5_digest": "b5f15404aaf1efd897a95ef819246f04", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5613, "upload_time": "2016-09-23T16:41:01", "url": "https://files.pythonhosted.org/packages/8b/9e/1c266d95e26961afcc189521889f5056e150f5ce358d6f1cb3ffd5cec1fe/winstats-0.65.tar.gz" } ], "0.70": [ { "comment_text": "", "digests": { "md5": "9c7baed48c8b95b0c7b0b0a3478b1a68", "sha256": "427f9390582b7137ddeed2c381246a8a688246c3bc7e9f36d015b470d6b7877a" }, "downloads": -1, "filename": "winstats-0.70.tar.gz", "has_sig": false, "md5_digest": "9c7baed48c8b95b0c7b0b0a3478b1a68", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5729, "upload_time": "2017-11-07T22:06:02", "url": "https://files.pythonhosted.org/packages/d2/31/01b74d4f854fafc8e728f40bebd5a337d483506000ca09f1852e0af48815/winstats-0.70.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9c7baed48c8b95b0c7b0b0a3478b1a68", "sha256": "427f9390582b7137ddeed2c381246a8a688246c3bc7e9f36d015b470d6b7877a" }, "downloads": -1, "filename": "winstats-0.70.tar.gz", "has_sig": false, "md5_digest": "9c7baed48c8b95b0c7b0b0a3478b1a68", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5729, "upload_time": "2017-11-07T22:06:02", "url": "https://files.pythonhosted.org/packages/d2/31/01b74d4f854fafc8e728f40bebd5a337d483506000ca09f1852e0af48815/winstats-0.70.tar.gz" } ] }