Hasty Briefsbeta

Bilingual

New Tool: lsds – List All Linux Block Devices and Settings in One Place

a year ago
  • #sysfs
  • #Linux
  • #disk-management
  • The article introduces 'lsds', a Python tool for listing Linux block devices with detailed information.
  • The tool reads directly from sysfs (/sys/class/block/...) instead of executing multiple commands like lsblk, lsscsi, or nvme list.
  • It provides comprehensive disk information including DEVNAME, MAJ:MIN, SIZE, TYPE, SCHED, ROT, MODEL, QDEPTH, NR_RQ, and WCACHE.
  • Additional fields like HWSEC, NVME_QDEPTH, and FUA can be included for more detailed insights.
  • The tool supports customization with options like --pivot for pivoted output and --verbose for source file paths.
  • Examples show outputs for various disk types, including NVMe SSDs, spinning disks, and even USB disks.
  • The tool is part of the 0x.tools toolset for Linux performance and troubleshooting.