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

sasutils is a set of command-line tools and a Python library to ease the administration of Serial Attached SCSI (SAS) fabrics.

sasutils command-line tools

  • sas_devices
  • sas_discover
  • ses_report

Also, two “zeroconf” udev scripts for use in udev rules that create friendly device aliases using SES-2 subenclosure nicknames.

  • sas_mpath_snic_alias
  • sas_sd_snic_alias

sas_discover

Display SAS topology. By default, sas_discover tries to fold common devices (like disks). Use -v, -vv or -vvv and --addr to display more details.

$ sas_discover -v
oak-io1-s1
|--host35 SAS9300-8e
|  `--8x--expander-35:0 ASTEK
|         |--1x--end_device-35:0:0
|         |      `--enclosure io1-sassw1 ASTEK
|         `--4x--expander-35:1 QCT
|            |-- 60 x end_device -- disk
|            `--  1 x end_device -- enclosure io1-jbod1-0 QCT
`--host36 SAS9300-8e
   `--8x--expander-36:0 ASTEK
          |--1x--end_device-36:0:0
          |      `--enclosure io1-sassw2 ASTEK
          `--4x--expander-36:1 QCT
             |-- 60 x end_device -- disk
             `--  1 x end_device -- enclosure io1-jbod1-1 QCT

sas_devices

Zeroconf tool that scans SAS devices and resolves associated enclosures. Useful to quickly check cabling and hardware setup.

When used with -v, sas_devices will also display all disk devices with serial numbers.

The following example shows a proper detection of a 60-disk JBOD with 2 SIMs (an “enclosure group”).

$ sas_devices
Found 2 SAS hosts
Found 4 SAS expanders
Found 1 enclosure groups
Enclosure group: [io1-jbod1-0][io1-jbod1-1]
NUM         VENDOR        MODEL    REV  PATHS
 60 x      SEAGATE ST8000NM0075   E002      2
Total: 60 block devices in enclosure group

ses_report

SES status and environmental metrics.

Used with -c, this command will find all enclosures and then use SES-2 nicknames and use sg_ses to output results suitable for Carbon/Graphite.

$ ses_report -c --prefix=datacenter.stanford
datacenter.stanford.io1-sassw1.Cooling.Left_Fan.speed_rpm 19560 1476486766
datacenter.stanford.io1-sassw1.Cooling.Right_Fan.speed_rpm 19080 1476486766
datacenter.stanford.io1-sassw1.Cooling.Center_Fan.speed_rpm 19490 1476486766
...

Use -s to get the status of all detected SES Element Descriptors.

# ses_report -s --prefix=datacenter.stanford | grep SIM
datacenter.stanford.io1-jbod1-0.Enclosure_services_controller_electronics.SIM_00 OK
datacenter.stanford.io1-jbod1-0.Enclosure_services_controller_electronics.SIM_01 OK
datacenter.stanford.io1-jbod1-0.SAS_expander.SAS_Expander_SIM_0 OK
datacenter.stanford.io1-jbod1-0.SAS_expander.SAS_Expander_ISIM_2 OK
datacenter.stanford.io1-jbod1-0.SAS_expander.SAS_Expander_ISIM_0 OK
datacenter.stanford.io1-jbod1-1.Enclosure_services_controller_electronics.SIM_00 OK
datacenter.stanford.io1-jbod1-1.Enclosure_services_controller_electronics.SIM_01 OK
datacenter.stanford.io1-jbod1-1.SAS_expander.SAS_Expander_SIM_1 OK
datacenter.stanford.io1-jbod1-1.SAS_expander.SAS_Expander_ISIM_3 OK
datacenter.stanford.io1-jbod1-1.SAS_expander.SAS_Expander_ISIM_1 OK

Warning

ses_report requires a recent version of sg3_utils and won’t work with the version shipped with CentOS 6 for example.

sas_sd_snic_alias

Generate udev aliases using the SES-2 subenclosure nickname and bay identifier of each device.

For example, add the following to your udev rules:

KERNEL=="sd*", PROGRAM="/usr/bin/sas_sd_snic_alias %k", SYMLINK+="%c"

This should generate udev aliases made of the device subenclosure nickname followed by the bay identifier. In the following case, io1-jbod1-0 is the subenclosure nickname (here SIM 0 of JBOD #1).

$ ls -l /dev/io1-jbod1-0-bay26
lrwxrwxrwx 1 root root 4 Oct 14 21:00 /dev/io1-jbod1-0-bay26 -> sdab

Note

Use sg_ses –nickname=… to define SES-2 subenclosure nicknames.

sas_mpath_snic_alias

This utility is very similar to sas_sd_snic_alias but only accepts device-mapper devices. Add the following line to your udev rules:

KERNEL=="dm-[0-9]*", PROGRAM="/usr/bin/sas_mpath_snic_alias %k", SYMLINK+="mapper/%c"

This will result in useful symlinks.

$ ls -l /dev/mapper/io1-jbod1-bay26
lrwxrwxrwx 1 root root 8 Oct 14 21:00 /dev/mapper/io1-jbod1-bay26 -> ../dm-31

Note

For sas_mpath_snic_alias to work with a JBOD having two SIMs, both enclosure nicknames should have a common prefix (eg. “myjbodX-“) that will be automatically used.

sasutils Python library

Documentation will be available on the wiki.

  • the following example will list all SAS hosts (controllers) found in sysfs

    from sasutils.sas import SASHost
    from sasutils.sysfs import sysfs
    
    # sysfs is a helper to walk through sysfs (/sys)
    for node in sysfs.node('class').node('sas_host'):
    
        # Instantiate SASHost with the sas_host sysfs device class
        host = SASHost(node.node('device'))
    
        # To get its sysfs name, use:
        print(host.name)
        # To get attributes from scsi_host, use:
        print('  %s' % host.scsi_host.attrs.host_sas_address)
        print('  %s' % host.scsi_host.attrs.version_fw)
    
  • See also https://github.com/stanford-rc/sasutils/wiki/Code-snippets

Author:Stephane Thiell - Stanford Research Computing Center
Release History

Release History

0.2.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

0.2.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

0.2.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

0.2.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

0.2.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

0.1.7

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

0.1.6

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

0.1.5

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

0.1.4

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

0.1.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

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
sasutils-0.2.4.tar.gz (18.1 kB) Copy SHA256 Checksum SHA256 Source Dec 5, 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