{"id":19584737,"url":"https://github.com/oracle-samples/scsi-cli","last_synced_at":"2025-06-30T02:04:22.125Z","repository":{"id":236012359,"uuid":"790720993","full_name":"oracle-samples/scsi-cli","owner":"oracle-samples","description":"Command line utility to display various SCSI devices on a system ","archived":false,"fork":false,"pushed_at":"2024-05-07T21:25:34.000Z","size":67,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-23T02:09:08.366Z","etag":null,"topics":["controller","fibrechannel","iscsi","linux","nvme","scsi-devices"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"upl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oracle-samples.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-23T12:07:12.000Z","updated_at":"2025-03-15T09:45:08.000Z","dependencies_parsed_at":"2024-05-07T21:48:16.172Z","dependency_job_id":null,"html_url":"https://github.com/oracle-samples/scsi-cli","commit_stats":null,"previous_names":["oracle-samples/scsi-cli"],"tags_count":0,"template":false,"template_full_name":"oracle/template-repo","purl":"pkg:github/oracle-samples/scsi-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle-samples%2Fscsi-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle-samples%2Fscsi-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle-samples%2Fscsi-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle-samples%2Fscsi-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oracle-samples","download_url":"https://codeload.github.com/oracle-samples/scsi-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle-samples%2Fscsi-cli/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262697249,"owners_count":23349890,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["controller","fibrechannel","iscsi","linux","nvme","scsi-devices"],"created_at":"2024-11-11T07:49:31.064Z","updated_at":"2025-06-30T02:04:21.962Z","avatar_url":"https://github.com/oracle-samples.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# scsi-cli\n\nscsi-cli is a tool for listing and manipulating various Small Computer System Interface (SCSI) devices on a system.\nIt contains basic command to list devices on the system and other commands to\nchange sysfs values of a file to perform action supported by those sysfs file properties.\n\nPlease note, each scsi-cli commands is only supported for block volumes and\ntranspots such as Fibre channel, iSCSI at the moment. In future other transports\nand scsi devices will be added to the tools capabiltiy.\n\n## Getting Started\n\nRequires build tool and make installed on your linux system.\n\n1. Clone the repository\n\n``` sh\ngit clone https://github.com/oracle-samples/scsi-cli.git\n```\n\n2. A simple make comand builds the tool from source\n\n``` sh\nmake all\n```\n\n3. To install this tool issue make command with install option\n\n``` sh\nmake install\n```\nThis command will install this tool at /usr/local/bin\n\n4. to uninstall this tool issue make command with uninstall option\n\n``` sh\nmake uninstall\n```\n\n## Documentation\n\nsee [documentation](doc) for more information on how to use this tool and how to \ncontribute.\n\n## Examples\n\nWhen the tool is build issuing scsi-cli will show all supported command options\n\n``` sh\n# ./scsi-cli\n\n    scsi-cli - v0.1\n\n    Usage:\n    ------\n    scsi-cli \u003ccommand\u003e \u003csub-command\u003e [\u003cdevice\u003e]\n\n    Where:\n    ------\n    The '\u003csub-command\u003e' is command specific options supported by the tool\n    The '\u003cdevice\u003e' may be either\n\n      - A Fibre Channel Device\n\n      - An iSCSI Device\n\n      - One of the\n        - SCSI generic device (ex: /dev/sdX)\n        - SCSI disk device (ex: /dev/sgX)\n        - NVMe Block device (ex: /dev/nvmeXnY)\n        - NVMe generic Block device (ex: /dev/ngX)\n        - Device Mapper stacking device (ex: /dev/dm-X)\n        - RAID Array device (ex: /dev/mdXYZ)\n\n    Following commands are implemented:\n    ----------------------------------------------------------------\n    alias              Create handy alias for disk, adater, controller\n    errors             Show errors for a device\n    list               List all device on this houst\n    online             Change device state to online\n    offline            Change device state to offline\n    reset              Reset a device\n    stats              Show statistics of a device\n    show               Show details\n    scan               Scan a system for device\n\n    See 'scsi-cli help \u003ccommand\u003e' for each command\n```\n\nEach command supports a list of sub-commands which will be displayed when\nyou issue the command with no other options.\n\nfor example, using command `scsi-cli list` will give option for sub-commands\nsupportd by the 'list' command.\n\n``` sh\n# ./scsi-cli list\n\n  Following Sub-Commands are supported for 'list'\n  ----------------------------------------------------------------\n  cd-rom             List CD-ROM devices from the host\n  tape               List Tape devices from the host\n  medium-changer     List Medium Changer devices from the host\n  enclosure          List Enclosure devices from the host\n  fc_hba             List Fiber Channel HBA instlled\n  iscsi              List iSCSI Sessions\n  disk               List disks from the host\n  controller         List disk controllers from the host\n  generic            List generic disk from the host\n  multipath          List multipath disk from the host\n\n```\n\nThis output is followed by list of all the devices present in the system.\n\n``` sh\nDisplaying All Disk Controller devices on the system.\n----------------------------------------------------------------\n\nBUS ID      \tVendor          \tModel           \tRevision\tMajor\tMinor\tDisk Type       \tDisk Name\tDevice Path\n------------\t----------------\t----------------\t--------\t-----\t-----\t----------------\t--------\t------------------------\n[0:0:0:0]\tIET             \tController      \t0001    \t21   \t6    \tStorage Array   \tsg6     \t/sys/class/scsi_generic/sg6\n[0:0:0:0]\tIET             \tController      \t0001    \t21   \t4    \tStorage Array   \tsg4     \t/sys/class/scsi_generic/sg4\n[0:0:0:0]\tIET             \tController      \t0001    \t21   \t2    \tStorage Array   \tsg2     \t/sys/class/scsi_generic/sg2\n[0:0:0:0]\tIET             \tController      \t0001    \t21   \t8    \tStorage Array   \tsg8     \t/sys/class/scsi_generic/sg8\n\nDisplaying All block devices on the system.\n----------------------------------------------------------------\n\nBUS ID      \tVendor          \tModel           \tRevision\tMajor\tMinor\tDisk Type       \tDisk Name\tDevice Path\n------------\t----------------\t----------------\t--------\t-----\t-----\t----------------\t--------\t------------------------\n[6:0:0:1]\tORACLE          \tBlockVolume     \t1.0     \t8    \t80   \tdisk            \tsdf     \t/sys/block/sdf\n[4:0:0:1]\tORACLE          \tBlockVolume     \t1.0     \t8    \t48   \tdisk            \tsdd     \t/sys/block/sdd\n[2:0:1:1]\tORACLE          \tBlockVolume     \t1.0     \t8    \t16   \tdisk            \tsdb     \t/sys/block/sdb\n[5:0:0:1]\tORACLE          \tBlockVolume     \t1.0     \t8    \t64   \tdisk            \tsde     \t/sys/block/sde\n[3:0:0:1]\tORACLE          \tBlockVolume     \t1.0     \t8    \t32   \tdisk            \tsdc     \t/sys/block/sdc\n[2:0:0:1]\tORACLE          \tBlockVolume     \t1.0     \t8    \t0    \tdisk            \tsda     \t/sys/block/sda\n\nDisplaying All nvme-block devices on the system.\n----------------------------------------------------------------\n\nBUS ID      \tModel                           \tRevision    \tMajor\tMinor\tDisk Type       \tDisk Name\tDevice Path\n------------\t--------------------------------\t------------\t-----\t-----\t----------------\t--------\t------------------------\n\nDisplaying All Multipath Devices devices on the system.\n----------------------------------------------------------------\n\nBUS ID      \tMajor\tMinor\tDisk Name\tDevice Path\n------------\t-----\t-----\t--------\t------------------------\n[0:0:0:0]\t252  \t1    \tdm-1    \t/sys/block/dm-1\n[0:0:0:0]\t252  \t0    \tdm-0    \t/sys/block/dm-0\n\nDisplaying All iSCSI devices on the system.\n----------------------------------------------------------------\n\nHost Name   \tTransport\tIP Address      \tPort\tConnection      \tSession         \tTarget Name\n------------\t----------\t----------------\t------\t----------------\t------------\t----------------------------------------------------------------\nhost5       \ttcp     \t169.254.2.7     \t3260\tconnection3:0   \tsession3    \tiqn.2015-12.com.oracleiaas:886afa56-8c9f-4501-8a9a-565d0b4b1c3e\nhost3       \ttcp     \t169.254.2.5     \t3260\tconnection1:0   \tsession1    \tiqn.2015-12.com.oracleiaas:86161095-2195-477e-bc62-613e4f526301\nhost6       \ttcp     \t169.254.2.8     \t3260\tconnection4:0   \tsession4    \tiqn.2015-12.com.oracleiaas:bd6ee62a-f309-4122-8d1b-b7e5eba5dde1\nhost4       \ttcp     \t169.254.2.6     \t3260\tconnection2:0   \tsession2    \tiqn.2015-12.com.oracleiaas:2031e68f-73fc-40e4-8ecd-d325c3feb34b\n\n```\nNote:\tCurrently this tool only supports Disk device, Fibre Channel Devices,\n\tiSCSI devices. Support for other devices and transport will be added\n\tlater in the future release.\n\n## Help\n\nIf you are having trouble using scsi-cli tool, please create a Github [issue](issue), and we'll try to help as best as we can.\n\n## Contributing\n\nscsi-cli welcomes contributions from the community. Before submitting a pull request, please [review our contribution guide](./CONTRIBUTING.md)\n\n## Security\n\nPlease consult the [security guide](./SECURITY.md) for our responsible security vulnerability disclosure process.\n\n## License\n\nCopyright (c) 2024 Oracle and/or its affiliates.\n\nReleased under the Universal Permissive License v1.0 as shown at\n\u003chttps://oss.oracle.com/licenses/upl/\u003e.\n\n[doc]: https://github.com/oracle-samples/scsi-cli/Documentation/development.rst\n[issue]: https://github.com/oracle-samples/scsi-cli/issues\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foracle-samples%2Fscsi-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foracle-samples%2Fscsi-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foracle-samples%2Fscsi-cli/lists"}