This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

This short library is used to convert your /proc/mdstat file into an object usable in Python. It comes with a short mdjson script that dumps your file in a JSON format.

Requirements

  • Linux (or at least get mdstat files from a Linux machine)
  • Python 2.6+ (or 3.2+)

Example usage

For most use cases, you can simple run mdstat.parse() to get nested dictionaries repesenting your local /proc/mdstat file. If you fetch the file remotely or need to run the parser on a stream, use parse_stream.

$ mdjson
{
    "personalities": [
        "raid10"
    ],
    "unused_devices": [],
    "devices": {
        "md127": {
            "read_only": true,
            "status": {
                "near_copies": 2,
                "blocks": 34359475200,
                "raid_disks": 4,
                "offset_copies": 0,
                "far_copies": 1,
                "synced": [
                    true,
                    true,
                    true,
                    true
                ],
                "chunks": "512K",
                "super": "1.2",
                "non_degraded_disks": 4
            },
            "bitmap": null,
            "resync": null,
            "active": true,
            "disks": {
                "xvdf": {
                    "spare": true,
                    "faulty": false,
                    "write_mostly": false,
                    "number": 4,
                    "replacement": false
                },
                "xvdd": {
                    "spare": false,
                    "faulty": false,
                    "write_mostly": false,
                    "number": 2,
                    "replacement": false
                },
                "xvde": {
                    "spare": false,
                    "faulty": false,
                    "write_mostly": false,
                    "number": 3,
                    "replacement": false
                },
                "xvdb": {
                    "spare": false,
                    "faulty": false,
                    "write_mostly": false,
                    "number": 0,
                    "replacement": false
                },
                "xvdc": {
                    "spare": false,
                    "faulty": false,
                    "write_mostly": false,
                    "number": 1,
                    "replacement": false
                }
            },
            "personality": "raid10"
        }
    }
}

You can also use the python interface to generate a nested dictionary:

>>> import mdstat
>>> mdstat.parse()
{
    "personalities": [
        "raid1",
        "raid5",
        "raid10",
    ],
    "devices": {
        "md0": {
            "active": True,
            [... snip ...]
        }
    }
    "unused_devices": []
}
Release History

Release History

1.0.4

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
mdstat-1.0.4.tar.gz (7.3 kB) Copy SHA256 Checksum SHA256 Source May 13, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting